🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #7329

Bug#1155263: gdnsd: FTBFS: ./029tcp_dso/058dso.t (Wstat: 6 (Signal: ABRT) Tests: 41 Failed: 0)

#7329
From: Faidon Liambotis
Date: Thu, 03 Dec 2026 15:30
64 lines
4372 bytes
Control: retitle -1 perl crashes with use Net::DNS and use threads
Control: reassign -1 libnet-dns-perl 1.58-1
Control: affects -1 src:gdnsd

On Wed, Nov 25, 2026 at 01:03:40PM +0000, Santiago Vila wrote:
> During a rebuild of all packages in unstable, this package failed to build.
>
> [...]
>
> Test Summary Report
> -------------------
> ./029tcp_dso/058dso.t                 (Wstat: 6 (Signal: ABRT) Tests: 41 Failed: 0)
>   Non-zero wait status: 6

Stripping down this particular test incrementally, I got to this minimal
reproducer, that is not gdnsd specific at all:

  $ cat 029tcp_dso/058dso.t
  use strict;
  use warnings;
  use threads;
  use Net::DNS::Packet;  # <- "use Net::DNS::Resolver" <- "use Net::DNS"
  my $client_close_ka = async { };
  $client_close_ka->join();

  $ perl 029tcp_dso/058dso.t
  free(): double free detected in tcache 2
  Aborted                    (core dumped) perl 029tcp_dso/058dso.t

This is new, triggered by the recent libnet-dns-perl 1.58-1 upload, and
is not reproducible with 1.57-1. 

A gdb backtrace reveals:
[...]
#6  malloc_printerr (str=str@entry=0x7f4c58c867b8 "free(): double free detected in tcache 2") at ./malloc/malloc.c:5346
#7  0x00007f4c58b7a59b in tcache_double_free_verify (e=<optimized out>) at ./malloc/malloc.c:3156
#8  0x00007f4c58a169a3 in ?? () from /usr/lib/x86_64-linux-gnu/perl/5.44/auto/Digest/SHA/SHA.so
#9  0x000055a882b065c0 in ?? ()
#10 0x000055a882b92ac6 in Perl_runops_standard ()
#11 0x000055a882a5e9d1 in Perl_call_sv ()
#12 0x000055a882b986cc in ?? ()
[...]

I think this has to do with this line in Net/DNS/Packet.pm, which was
seemingly introduced in 1.58:
  my $hash = HASH ? Digest::SHA->new(256) : undef;

Interestingly, an even more minimal reproducer is this:
  perl -MDigest::SHA -Mthreads -e 'my $sha = Digest::SHA->new(256); async {}->join'

I could not find a documented thread-safety warning in Digest::SHA (a
core perl-modules module), but I also didn't spend much time researching
that. Crashing with a double-free sounds like a core Perl bug
nevertheless though? OTOH I can reproduce it in much older versions of
Perl (I tested as low as 5.28), so perhaps it's not a very common
problem.

TL;DR: Net::DNS 1.58 is now thread-unsafe due to its use of
Digest::SHA->new, causing Perl to SIGABRT. The gdnsd test suite is using
threads and Net::DNS (a reasonable expectation) and crashes, and thus
FTBFS.

Regards,
Faidon
Technical Details
Message-ID: <O6gUV-fLqO-3@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!srl.newsdeef.eu.MISMATCH!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!newsfeed.bofh.team!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news.szaf.org!fu-berlin.de!news.servidellagleba.it!bofh.it!news.nic.it!robomod
References: <O3kV4-e4zH-31@gated-at.bofh.it> <O3kV4-e4zH-31@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srl.newsdeef.eu.MISMATCH!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!newsfeed.bofh.team!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news.szaf.org!fu-berlin.de!news.servidellagleba.it!bofh.it!news.nic.it!robomod
From: Faidon Liambotis <paravoid@debian.org>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1155263: gdnsd: FTBFS: ./029tcp_dso/058dso.t                 (Wstat: 6 (Signal: ABRT) Tests: 41 Failed: 0)
Date: Thu, 03 Dec 2026 16:30:01 +0100
Message-ID: <O6gUV-fLqO-3@gated-at.bofh.it>
References: <O3kV4-e4zH-31@gated-at.bofh.it> <O3kV4-e4zH-31@gated-at.bofh.it>
X-Original-To: 1155263@bugs.debian.org
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Thu Dec  3 15:23:07 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.7
Reply-To: Faidon Liambotis <paravoid@debian.org>, 1155263@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: paravoid@debian.org
X-Debian-Pr-Message: followup 1155263
X-Debian-Pr-Package: src:gdnsd
X-Debian-Pr-Keywords: forky ftbfs sid
X-Debian-Pr-Source: gdnsd
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Debian-User: paravoid
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2006757
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 64
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Cc: Santiago Vila <sanvila@debian.org>
X-Original-Date: Thu, 3 Dec 2026 17:20:17 +0200
X-Original-Message-ID: <axGIsRFRC_g6ISod@tty.gr>
X-Original-References: <E1xWCey-008iAR-2h@paradis.debian.org> <E1xWCey-008iAR-2h@paradis.debian.org>