Bug 12316 - gold: threading bug before/in Write_sections_task
Summary: gold: threading bug before/in Write_sections_task
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gold (show other bugs)
Version: 2.22
: P2 normal
Target Milestone: ---
Assignee: Ian Lance Taylor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-14 06:54 UTC by Ralf Wildenhues
Modified: 2011-02-10 01:18 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
helgrind output of failing gold link of libgcj (1.47 KB, text/plain)
2010-12-14 06:54 UTC, Ralf Wildenhues
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Wildenhues 2010-12-14 06:54:34 UTC
Created attachment 5157 [details]
helgrind output of failing gold link of libgcj

When linking libgcj.so with 2 or 4 threads, I reliably run into an internal
error that looks like a data race or missing blocker:

/tmp/build/gold/ld-new: internal error in local_symbol, at ../../binutils-gdb/gold/object.h:1631
GNU gold (GNU Binutils 2.21.51.20101208) 1.10

See the verbose log from within helgrind attached.
Comment 1 cvs-commit@gcc.gnu.org 2011-02-10 01:12:40 UTC
CVSROOT:	/cvs/src
Module name:	src
Changes by:	ian@sourceware.org	2011-02-10 01:12:37

Modified files:
	gold           : ChangeLog object.h reloc.cc 

Log message:
	PR gold/12316
	* object.h (class Sized_relobj): Remove clear_local_symbols.
	* reloc.cc (Sized_relobj::do_relocate): Don't call
	clear_local_symbols.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/ChangeLog.diff?cvsroot=src&r1=1.695&r2=1.696
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/object.h.diff?cvsroot=src&r1=1.104&r2=1.105
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/reloc.cc.diff?cvsroot=src&r1=1.62&r2=1.63
Comment 2 cvs-commit@gcc.gnu.org 2011-02-10 01:15:31 UTC
CVSROOT:	/cvs/src
Module name:	src
Branch: 	binutils-2_21-branch
Changes by:	ian@sourceware.org	2011-02-10 01:15:28

Modified files:
	gold           : ChangeLog object.h reloc.cc 

Log message:
	PR gold/12316
	* object.h (class Sized_relobj): Remove clear_local_symbols.
	* reloc.cc (Sized_relobj::do_relocate): Don't call
	clear_local_symbols.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/ChangeLog.diff?cvsroot=src&only_with_tag=binutils-2_21-branch&r1=1.664.2.14&r2=1.664.2.15
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/object.h.diff?cvsroot=src&only_with_tag=binutils-2_21-branch&r1=1.103&r2=1.103.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/reloc.cc.diff?cvsroot=src&only_with_tag=binutils-2_21-branch&r1=1.60&r2=1.60.2.1
Comment 3 Ian Lance Taylor 2011-02-10 01:18:09 UTC
Fixed.  Thanks a lot for the helgrind log.  That made it possible for me to work out the problem from first principles, without having to recreate it.