Bug 924354

Summary: collect2: ld terminated with signal 11
Product: Red Hat Enterprise Linux 5 Reporter: Orion Poplawski <orion>
Component: binutilsAssignee: Jeff Law <law>
Status: CLOSED ERRATA QA Contact: Martin Cermak <mcermak>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.10CC: law, mcermak, mfranc, ohudlick, pfrankli
Target Milestone: rc   
Target Release: ---   
Hardware: ppc   
OS: Linux   
Whiteboard:
Fixed In Version: binutils-2.17.50.0.6-25.el5 Doc Type: Bug Fix
Doc Text:
Cause: The PPC linker did not verify certain pointers were validly non-NULL prior to dereferencing those pointers. Consequence: As a result, under certain circumstances the PPC linker could get a segmentation fault/bus error. Fix: The PPC linker code has been changed to properly check for NULL pointers and take appropriate action. Result: Links no longer segfault or bus error.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-30 22:11:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 928849    
Attachments:
Description Flags
Self-contained test
none
Patch from upstream
none
Testcase for related ppc64 issue none

Description Orion Poplawski 2013-03-21 15:34:53 UTC
Description of problem:

While trying to build thunderbird-lightning for EPEL 5 I'm getting:

/usr/bin/python /builddir/build/BUILD/thunderbird-lightning-1.9.1/comm-esr17/mozilla/config/pythonpath.py -I../../../mozilla/config /builddir/build/BUILD/thunderbird-lightning-1.9.1/comm-esr17/mozilla/config/expandlibs_exec.py --depend .deps/libcalbasecomps.pp --target libcalbasecomps.so --uselist --  c++  -pedantic -Wall -Wpointer-arith -Woverloaded-virtual -Wno-ctor-dtor-privacy -Wno-invalid-offsetof -Wno-variadic-macros -Wcast-align -Wno-long-long -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -fpermissive -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fshort-wchar -pthread -pipe  -DNDEBUG -DTRIMMED -g -Os -freorder-blocks -finline-limit=50 -fomit-frame-pointer -fPIC -shared -Wl,-z,defs -Wl,--gc-sections -Wl,-h,libcalbasecomps.so -o libcalbasecomps.so  calBaseModule.o     -lpthread -Wl,-rpath,/usr/lib/thunderbird-lightning-2   -Wl,-rpath-link,/builddir/build/BUILD/thunderbird-lightning-1.9.1/comm-esr17/objdir-tb/mozilla/dist/bin:/usr/lib:/usr/local/lib:/lib -Wl,-rpath-link,/usr/lib    ../../../calendar/base/src/libcalbase_s.a ../../../calendar/libical/src/libical/libmozical.a  -L/builddir/build/BUILD/thunderbird-lightning-1.9.1/comm-esr17/objdir-tb/mozilla/dist/bin -lxpcom -lmozalloc -lxul  -L../../../mozilla/dist/bin -L../../../mozilla/dist/lib  -L/usr/lib -lplds4 -lplc4 -lnspr4 /builddir/build/BUILD/thunderbird-lightning-1.9.1/comm-esr17/objdir-tb/mozilla/dist/lib/libxpcomglue_s.a -L/builddir/build/BUILD/thunderbird-lightning-1.9.1/comm-esr17/objdir-tb/mozilla/dist/bin -lxpcom -lmozalloc  -Wl,--version-script -Wl,/builddir/build/BUILD/thunderbird-lightning-1.9.1/comm-esr17/mozilla/build/unix/gnu-ld-scripts/components-version-script -Wl,-Bsymbolic -ldl -lm    
collect2: ld terminated with signal 11 [Segmentation fault], core dumped

The build completes fine on i386 and x86_64.

Version-Release number of selected component (if applicable):
2.17.50.0.6-20.el5_8.3

Comment 1 Jeff Law 2013-03-21 19:20:03 UTC
This could well end up being the same bug as 855163.  Both are linker faults that are specific to ppc/ppc64 builds -- and both show up building components of the mozilla/thunderbird suites.

Comment 5 Jeff Law 2013-04-11 12:58:53 UTC
Orion,

We need a reasonable way to be able to test this.  I've tried without success to set up an environment where I can build thunderbird-lightning on RHEL 5.

At the minimum this environment needs to allow for installing an updated binutils linker.  That would allow us to test if the fix for 855163 will fix this bug as well.

If you've got a suitable srpm and a koji instance where I can throw builds, that would be a huge step forward.

Comment 6 Orion Poplawski 2013-04-11 16:02:04 UTC
Jeff,

  I'm afraid I don't have any special access to ppc machines, I'm just using the standard Fedora/EPEL builders.  If you have access to the Fedora builders you should be able submit build there.  I've added ExcludeArch: ppc for now to the EL5 build, so you'd need to remove that before building.  You should be able to check out the el5 branch from the Fedora git repo for thunderbird-lightning.

Comment 7 Jeff Law 2013-04-11 21:20:25 UTC
When I try to fire off a ppc koji build, it claims not to know about the epel target.

[law@stumpy thunderbird-lightning]$ ppc-koji build --scratch el5 thunderbird-lightning-1.9.1-1.el5.src.rpm
Usage: koji build [options] target <srpm path or scm url>
(Specify the --help global option for a list of other help options)

koji: error: Unknown build target: el5
[law@stumpy thunderbird-lightning]$ ppc-koji list-targets
Name                           Buildroot                      Destination                   
---------------------------------------------------------------------------------------------
dist-f12                       dist-f12-build                 dist-f12                      
dist-f12-updates-candidate     dist-f12-build                 dist-f12-updates-candidate    
dist-f13-updates-candidate     dist-f13-build                 dist-f13-updates-candidate    
dist-f14                       dist-f14-build                 dist-f14                      
dist-f15                       dist-f15-build                 dist-f15                      
dist-f15-updates-candidate     dist-f15-build                 dist-f15-updates-candidate    
dist-f16                       f16-build                      f16                           
f17                            f17-build                      f17                           
f17-candidate                  f17-build                      f17-updates-candidate         
f18                            f18-build                      f18-updates-candidate         
f18-candidate                  f18-build                      f18-updates-candidate         
f19                            f19-build                      f19-updates-candidate         
f19-candidate                  f19-build                      f19-updates-candidate         
f19-rebuild                    f19-build                      f19-rebuild                   
f20                            f20-build                      f20                           
f20-candidate                  f20-build                      f20                           
rawhide                        f20-build                      f20                           
rawhide-repo-holder            rawhide                        rawhide                       


How precisely are you throwing ppc builds into koji?

Comment 8 Orion Poplawski 2013-04-11 21:24:01 UTC
I would use koji, not ppc-koji

koji build --scratch --arch-override=ppc dist-5E-epel ...

Comment 13 Jeff Law 2013-04-12 13:53:30 UTC
I got it to fail after some hacking late last night.  Right now it appears to be a different problem than was fixed for 855163.  I'll be debugging today.  Hopefully it's something already fixed upstream with an associated testcase :-)

Comment 15 Jeff Law 2013-04-12 19:25:53 UTC
Created attachment 734934 [details]
Self-contained test

Extract on a ppc box.

sh doit

If the test segfaults, then it failed.  Anything else is a pass.

Comment 16 Jeff Law 2013-04-12 19:35:47 UTC
Upstream fix identified.  Doing a full build of lightning with a patched up binutils.

Comment 17 Jeff Law 2013-04-13 03:12:27 UTC
Created attachment 735109 [details]
Patch from upstream

Comment 21 Jeff Law 2013-04-15 15:57:07 UTC
Created attachment 735963 [details]
Testcase for related ppc64 issue

Extract on a ppc64 machine and run ./doit

Segfault is a failure, anything else is a success.

Comment 29 errata-xmlrpc 2013-09-30 22:11:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1306.html