#976017 gold linker crashing where ld doesn't

Package:
binutils
Source:
binutils
Description:
GNU assembler, linker and binary utilities
Submitter:
Lucas Nussbaum
Date:
2025-08-29 05:33:02 UTC
Severity:
important
Tags:
#976017#5
Date:
2020-11-19 09:33:45 UTC
From:
To:
Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.

Relevant part (hopefully):
http://qa-logs.debian.net/2020/11/19/apt-cacher-ng_3.5-1_unstable.log

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

About the archive rebuild: The rebuild was done on EC2 VM instances from
Amazon Web Services, using a clean, minimal and up-to-date chroot. Every
failed build was retried once to eliminate random failures.

#976017#10
Date:
2020-11-20 19:48:33 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
apt-cacher-ng, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 975137@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Eduard Bloch <blade@debian.org> (supplier of updated apt-cacher-ng package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Fri, 20 Nov 2020 19:15:22 +0100
Source: apt-cacher-ng
Architecture: source
Version: 3.5-2
Distribution: unstable
Urgency: medium
Maintainer: Eduard Bloch <blade@debian.org>
Changed-By: Eduard Bloch <blade@debian.org>
Closes: 975137
Changes:
 apt-cacher-ng (3.5-2) unstable; urgency=medium
 .
   * Disable use of gold linker to avoid linker crash; this has been observed
     on mipsel before and probably also affects amd64 (closes: #975137)
Checksums-Sha1:
 f4fe7f0b896ddbdeb5fb006b2e49557581f43e98 2208 apt-cacher-ng_3.5-2.dsc
 120d1642d6f3144527ec6295ec59af4b44d69f7a 49652 apt-cacher-ng_3.5-2.debian.tar.xz
 3803120c2067e91dfeaab7bcb8bcbb04135d62da 9022 apt-cacher-ng_3.5-2_source.buildinfo
Checksums-Sha256:
 661dea731d47ea8ee35158b90b67e432bbbe2f8a6c8d8f061f58745d25447cc4 2208 apt-cacher-ng_3.5-2.dsc
 c00ad391c7d4358bcf035fd1b7d8c277a11e97c8316d4b024773d236262d66d0 49652 apt-cacher-ng_3.5-2.debian.tar.xz
 7b2d8a84afa52075438e9c6a50d73d67c964e1461250347daf4dbef5079575cc 9022 apt-cacher-ng_3.5-2_source.buildinfo
Files:
 14233658bbb5c982c0eee868dc56f569 2208 net optional apt-cacher-ng_3.5-2.dsc
 5f033f6fba4c30580a40db52fa3e117d 49652 net optional apt-cacher-ng_3.5-2.debian.tar.xz
 c87195738e6066d06152befec0e91ee2 9022 net optional apt-cacher-ng_3.5-2_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEZI3Zj0vEgpAXyw40aXQOXLNf7DwFAl+4GEcACgkQaXQOXLNf
7DxyHRAAqR4Ra/rCyxYWbY6Ee5DveQgIp6zIDQ/gM+KmePy/0+OHKYCz8MCc5ZIc
rgej1gMBqgINTAm8nMrQwyxektqbmJ4Q2Eqlu4ff9ua192apiT4bG5bHYWuU0tIh
1IHbo2xUNdPst95MZOhTRnRFNMl0pyRuPiEa/RBM5JqBtaAyks+ORKDupBsYZ9dA
ganoKfBzLXOV9up93e9JpqSIHw29mrSmtpA8xAsg8IRYqBF932KND/iuFSLxm004
cCzeqorMK+oMzijmrov/UR8wR9/9FL9erZoQV49Ay7FN7mH4qBcQCrugxSdyVqJO
i2No0RDJh1PnLWoVusq4PfTcGudGbt03ubGu5pFikBShfD8GdwO0xHiKs/emqCPe
mEtKN6mLok0bvL58AHyBZZPbOjSjjFwJHdhi6J5NvkW0GRomtz+FCa9kNKXv3Vun
fIDcvDI+mhMUcwRPB5GUbbPlIeL9fCxXjT+ivrbnbQZ7vBUOvUy2OdM+gxIwi+uK
jqHoI2WjUpSMLJOeOuULaz7HPlKsNsydpUoQHfqgCUGeCjvTEKaRMujwSf0CObZw
jLfM1Va2FwOo0k0+n2d+vbnJyLMa5gxCQFwDgCFnA1gSU9/UafJbKZupJkIyTDX+
YclbQ1TmYsmSRfByfPz5P/5DDy5RYaqDNnGZ2LxPl5EJ+4+kLIs=
=+IEv
-----END PGP SIGNATURE-----

#976017#15
Date:
2020-11-21 01:18:07 UTC
From:
To:
reopen 975137
reassign 975137 binutils
thanks

Hi,

first I assumed that it's a GOLD issue but looking at
https://buildd.debian.org/status/package.php?p=apt%2dcacher%2dng
shows the real drama. Half of architecture builds fail due to some
obscure segfault of ld linker.

Please investigate.

Best regards,
Eduard.

#976017#28
Date:
2020-11-21 12:19:15 UTC
From:
To:
Control: retitle 975137 gold linker crashing where ld doesn't

I was mistaken again (shouldn't do real work after 2am).

The issue is apparently with the gold linker, after fixing the actual
package configuration to use ld it seems to build everywhere. The
problem did originally emerge with mipsel (32/64) so I attributed this
to some hardware restriction, but now it hits virtually all buildd
environments. Plain ld works there, gold does not.

#976017#35
Date:
2020-11-21 13:14:29 UTC
From:
To:
Hallo,
* Eduard Bloch [Sat, Nov 21 2020, 01:19:15PM]:

Sorry for the spam but I found a coredump which was overlooked in repro
experiments yesterday. I'd consider this to be the cause but it's
obviously not conclusive, the memory was probably smashed long before,
or this might be some destructor of a global object which does not check
the life time of some data it attempts to manage.

Unfortunately I cannot reproduce this anymore.

Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/bin/ld.gold -plugin /usr/lib/gcc/x86_64-linux-gnu/10/liblto_plugin.so -plu'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __GI___libc_free (mem=0x6ae2191086ea5c6a) at malloc.c:3102
3102	malloc.c: Datei oder Verzeichnis nicht gefunden.
[Current thread is 1 (Thread 0x7f09dbd77740 (LWP 63024))]
(gdb) bt
#0  __GI___libc_free (mem=0x6ae2191086ea5c6a) at malloc.c:3102
#1  0x000055c9e34568c2 in __gnu_cxx::new_allocator<char>::deallocate (__t=<optimized out>, __p=<optimized out>, this=0x7f099403ee10) at /usr/include/c++/10/ext/new_allocator.h:133
#2  std::allocator_traits<std::allocator<char> >::deallocate (__n=<optimized out>, __p=<optimized out>, __a=...) at /usr/include/c++/10/bits/alloc_traits.h:492
#3  std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_destroy (__size=<optimized out>, this=0x7f099403ee10) at /usr/include/c++/10/bits/basic_string.h:237
#4  std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose (this=0x7f099403ee10) at /usr/include/c++/10/bits/basic_string.h:232
#5  std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string (this=0x7f099403ee10, __in_chrg=<optimized out>) at /usr/include/c++/10/bits/basic_string.h:658
#6  std::_Destroy<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > (__pointer=0x7f099403ee10) at /usr/include/c++/10/bits/stl_construct.h:140
#7  std::_Destroy_aux<false>::__destroy<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*> (__last=<optimized out>, __first=0x7f099403ee10) at /usr/include/c++/10/bits/stl_construct.h:152
#8  std::_Destroy<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*> (__last=<optimized out>, __first=<optimized out>) at /usr/include/c++/10/bits/stl_construct.h:185
#9  std::_Destroy<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > (__last=0x7f099403ef30, __first=<optimized out>)
    at /usr/include/c++/10/bits/alloc_traits.h:738
#10 std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::~vector (
    this=0x55c9e35f48a0 <gold::File_read::files_read[abi:cxx11]>, __in_chrg=<optimized out>) at /usr/include/c++/10/bits/stl_vector.h:680
#11 0x00007f09dbefe437 in __run_exit_handlers (status=status@entry=0, listp=0x7f09dc07e718 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:108
#12 0x00007f09dbefe5da in __GI_exit (status=status@entry=0) at exit.c:139
#13 0x000055c9e345b25f in gold::gold_exit (status=gold::GOLD_OK) at ../../gold/gold.cc:71
#14 0x000055c9e340729b in main (argc=<optimized out>, argv=<optimized out>) at ../../gold/main.cc:328

Best regards,
Eduard.

#976017#44
Date:
2020-11-26 15:57:48 UTC
From:
To:
clone 975137 -1
reassign 975137 src:apt-cacher-ng
severity -1 important
thanks

Don't use gold, just use the default linker. gold is becoming unmaintained upstream.