ld hangs indefinitely statically linking binutils on ppc64el

Bug #1516444 reported by Steve Langasek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
binutils
Unknown
Unknown
binutils (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

The latest util-linux upload, 2.27.1-1ubuntu1, reproducibly fails to build on ppc64el because the build hangs indefinitely:

https://launchpad.net/ubuntu/+source/util-linux/2.27.1-1ubuntu1/+build/8230106

The hanging command is:

/usr/bin/ld -plugin /usr/lib/gcc/powerpc64le-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/powerpc64le-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/cce7J0Br.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=/ --build-id --eh-frame-hdr -m elf64lppc --hash-style=gnu --as-needed -dynamic-linker /lib64/ld64.so.2 -z relro -o test_fdisk_ask /usr/lib/gcc/powerpc64le-linux-gnu/5/../../../powerpc64le-linux-gnu/crt1.o /usr/lib/gcc/powerpc64le-linux-gnu/5/../../../powerpc64le-linux-gnu/crti.o /usr/lib/gcc/powerpc64le-linux-gnu/5/crtbegin.o -L/usr/lib/gcc/powerpc64le-linux-gnu/5 -L/usr/lib/gcc/powerpc64le-linux-gnu/5/../../../powerpc64le-linux-gnu -L/usr/lib/gcc/powerpc64le-linux-gnu/5/../../../../lib -L/lib/powerpc64le-linux-gnu -L/lib/../lib -L/usr/lib/powerpc64le-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/powerpc64le-linux-gnu/5/../../.. libfdisk/src/test_fdisk_ask-ask.o ./.libs/libfdisk.a /home/ubuntu/util-linux-2.27.1/.libs/libblkid.a /home/ubuntu/util-linux-2.27.1/.libs/libuuid.a -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/powerpc64le-linux-gnu/5/crtend.o /usr/lib/gcc/powerpc64le-linux-gnu/5/../../../powerpc64le-linux-gnu/crtn.o

strace shows it repeatedly calling brk(), so presumably trying to allocate more memory in very small increments.

It doesn't appear to be lto-related. The symptom is reproducible when calling gcc with -fno-lto.

I do not yet have a useful backtrace from ld for this, because for some reason recent versions of binutils are not getting dbgsym packages in the archive.

Steve Langasek (vorlon)
Changed in binutils (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Steve Langasek (vorlon) wrote :

Rebuilding with nostrip, I get a backtrace that looks like this, with at least partial symbols.
(gdb) bt
#0 0x00003fffb3b8885c in vfprintf () from /lib/powerpc64le-linux-gnu/libc.so.6
#1 0x00003fffb3c714b8 in __vsprintf_chk ()
   from /lib/powerpc64le-linux-gnu/libc.so.6
#2 0x00003fffb3c713ac in __sprintf_chk ()
   from /lib/powerpc64le-linux-gnu/libc.so.6
#3 0x00003fffb3daa338 in ?? ()
#4 0x00003fffb3db963c in ?? ()
#5 0x0000000010032168 in gldelf64lppc_find_exp_assignment (
    exp=<optimized out>) at eelf64lppc.c:1845
#6 0x000000001002824c in ldemul_hll (name=<optimized out>)
    at ../../ld/ldemul.c:39
Backtrace stopped: frame did not save the PC
(gdb)

Matthias Klose (doko)
Changed in binutils (Ubuntu):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package binutils - 2.25.51.20151113-2ubuntu1

---------------
binutils (2.25.51.20151113-2ubuntu1) xenial; urgency=medium

  * Merge with Debian; remaining changes:
    - Build from upstream sources.
    - Build binutils-static and binutils-static-udeb packages.
    - Don't build cross binutils packages for Debian ports architectures.

 -- Matthias Klose <email address hidden> Thu, 19 Nov 2015 14:25:21 +0100

Changed in binutils (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.