Bug 163599

Summary: /usr/bin/ld: BFD 2.15.92.0.2 20040927 internal error
Product: Red Hat Enterprise Linux 4 Reporter: Chester Hosey <chester.hosey>
Component: binutilsAssignee: Jakub Jelinek <jakub>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-07-21 18:50:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Chester Hosey 2005-07-19 13:00:42 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050512 Red Hat/1.0.4-1.4.1 Firefox/1.0.4

Description of problem:
gcc -shared  tobarchart.lo tochartalarmui.lo tochartmanager.lo tochartsetupui.lo tolegendchart.lo tolinechart.lo tolinechartsetupui.lo topiechart.lo toresultbar.lo toresultline.lo toresultpie.lo  -lpcre -L/usr/lib -L/usr/X11R6/lib -L/usr/lib/qt-3.3//lib -lqt-mt -lpng -lz -lm -ljpeg -lSM -lICE -lXext -lX11 -lSM -lICE -lkparts -lkdeprint -lkdecore -lkdeui -lkio -lkio -lDCOP -lkhtml -lstdc++ -lpthread -L/usr/lib/oracle/10.1.0.4/client/lib -lpcre -lc  -Wl,-soname -Wl,libtochart -o .libs/libtochart
/usr/bin/ld: BFD 2.15.92.0.2 20040927 internal error, aborting at ../../bfd/cache.c line 495 in bfd_cache_lookup_worker

/usr/bin/ld: Please report this bug.

collect2: ld returned 1 exit status

Version-Release number of selected component (if applicable):
binutils-2.15.92.0.2-13

How reproducible:
Couldn't Reproduce

Steps to Reproduce:
1. Download the source to tora from http://easynews.dl.sourceforge.net/sourceforge/tora/tora-1.3.18.tar.gz
2. Install all required dependencies -- qt-devel, zlib-devel, probably others
3. Install oracle-instantclient-basic and oracle-instantclient-devel from http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html
4. Unpack and configure tora with LD_LIBRARY_PATH=/usr/lib/oracle/10.1.0.4/client/lib/ ./configure --with-qt-dir=/usr/lib/qt-3.3/ --prefix=/tmp/meat --with-instant-client
5. Run make -j3
6. Above output resulted

Actual Results:  gcc -shared  tobarchart.lo tochartalarmui.lo tochartmanager.lo tochartsetupui.lo tolegendchart.lo tolinechart.lo tolinechartsetupui.lo topiechart.lo toresultbar.lo toresultline.lo toresultpie.lo  -lpcre -L/usr/lib -L/usr/X11R6/lib -L/usr/lib/qt-3.3//lib -lqt-mt -lpng -lz -lm -ljpeg -lSM -lICE -lXext -lX11 -lSM -lICE -lkparts -lkdeprint -lkdecore -lkdeui -lkio -lkio -lDCOP -lkhtml -lstdc++ -lpthread -L/usr/lib/oracle/10.1.0.4/client/lib -lpcre -lc  -Wl,-soname -Wl,libtochart -o .libs/libtochart
/usr/bin/ld: BFD 2.15.92.0.2 20040927 internal error, aborting at ../../bfd/cache.c line 495 in bfd_cache_lookup_worker

/usr/bin/ld: Please report this bug.

collect2: ld returned 1 exit status

Additional info:

Unfortunately I couldn't reproduce the bug by running make -j3 or make. Also note that I'd failed to include LD_LIBRARY_PATH in the make -j3 invocation. Running make -j3 after hitting the bug resulted in complaints of missing library symbols, which is expected since I'd not included the library path. Running make with the correct library path resulted in a normal compilation.

Comment 1 Jakub Jelinek 2005-07-19 14:20:17 UTC
This can happen if some other process removes or truncates one or more of the
input files (.o objects resp. .a libraries) given to the linker on the command
line between the initial linking phase and the end of the link.

As such, it would be a dependency bug in the makefiles of the project
you are compiling.

Comment 2 Chester Hosey 2005-07-21 17:54:18 UTC
So how about a helpful error message? You're telling me that the bug (or
NOTABUG, despite ld telling me that there was an internal error) is caused by
the input. How about an error message that doesn't explicitly tell me to file a
bug report?

Do you honestly believe that this error message is optimal and provides the user
with the information they need in order to respond to the problem?

If not, isn't that considered a bug somehow?

Comment 3 Jakub Jelinek 2005-07-21 18:50:52 UTC
The linker relies in many places that the input files are not changed
during linking and can result in all sorts of crashes.  The linker does not
load everything into memory, because that would preclude linking really large
binaries or shared libraries.  Yes, it can be considered a bug, but it is
certainly not the only one if you change the input files while linking,
so IMHO not worth doing changing.