http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56320
--- Comment #3 from ro at CeBiTec dot Uni-Bielefeld.DE ro at CeBiTec dot
Uni-Bielefeld.DE 2013-02-21 16:23:52 UTC ---
--- Comment #2 from Ian Lance Taylor ian at airs dot com 2013-02-20
19:46:42 UTC ---
Should be fixed now, I hope.
Unfortunately, this is not enough. I had the equivalent of your patch
in my tree when I noticed that I got different results for running the
tests via gotest and manually. This got rid of the runtime_lfstackpush
error, but the failures remain.
panic: runtime error: invalid memory address or nil pointer dereference
[recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x105]
[...]
Running the os test under mdb reveals (in the child process):
mdb: fork1 detected: follow (p)arent or (c)hild? c
mdb: target forked child process 24260 (debugger following child)
mdb: stop on SIGSEGV
mdb: target stopped at:
libc.so.1`close+0x44: addl $0x1,(%rdx)
$c
libc.so.1`close+0x44()
libgo.so.3.0.1`syscall.raw_fcntl.constprop.124+0x13()
libgo.so.3.0.1`syscall.forkExec+0x940()
libgo.so.3.0.1`syscall.StartProcess+0x2f()
os.StartProcess+0x20d()
os_test.exec+0x179()
os_test.TestStartProcess+0x101()
libgo.so.3.0.1`testing.$thunk10+0xd9()
libgo.so.3.0.1`kickoff+0x2e()
libc.so.1`resumecontext()
libgo.so.3.0.1`testing.RunTests+0x41e()
libgo.so.3.0.1`testing.Main+0x3ee()
main.main+0x7d()
libgo.so.3.0.1`runtime_main+0x6a()
libgo.so.3.0.1`kickoff+0x2e()
libc.so.1`resumecontext()
main+0x40()
_start+0x6c()
Under truss, I see this:
24271: fcntl(4, F_DUP2FD, 0x0001) = 1
24271: Incurred fault #6, FLTBOUNDS %pc = 0xFD7FEE350718
24271:siginfo: SIGSEGV SEGV_MAPERR addr=0xC20F9CFEA9
24271: Received signal #11, SIGSEGV [caught]
24271:siginfo: SIGSEGV SEGV_MAPERR addr=0xC20F9CFEA9
I couldn't yet associate this SEGV with the exact source code location.
At least the net/http failure seems related: the test dies with SIGILL
in fcntl:
Program received signal SIGILL, Illegal instruction.
[Switching to Thread 15 (LWP 15)]
0xfd7fee350415 in fcntl () from /lib/64/libc.so.1
(gdb) where
#0 0xfd7fee350415 in fcntl () from /lib/64/libc.so.1
#1 0xfd7feeab085a in syscall.fcntl (fd=fd@entry=38, cmd=cmd@entry=2,
arg=arg@entry=1) at libcalls.go:416
fcntl (38, F_SETFD, FD_CLOEXEC);
#2 0xfd7feeabeb4e in syscall.CloseOnExec (fd=fd@entry=38)
at /vol/gcc/src/hg/trunk/local/libgo/go/syscall/exec_unix.go:130
#3 0xfd7feea7c984 in net.sysSocket (p=optimized out, t=2, f=2)
at /vol/gcc/src/hg/trunk/local/libgo/go/net/sys_cloexec.go:21
#4 net.socket (net=..., f=f@entry=2, t=t@entry=2, p=p@entry=0,
ipv6only=ipv6only@entry=false, ulsa=ulsa@entry=..., ursa=ursa@entry=...,
deadline=..., toAddr=toAddr@entry=0xfd7feea7a920 net.sockaddrToTCP)
at /vol/gcc/src/hg/trunk/local/libgo/go/net/sock_posix.go:20
#5 0xfd7feea7d0ca in net.internetSocket (net=..., laddr=..., raddr=...,
deadline=..., sotype=sotype@entry=2, proto=proto@entry=0, mode=...,
toAddr=toAddr@entry=0xfd7feea7a920 net.sockaddrToTCP)
at /vol/gcc/src/hg/trunk/local/libgo/go/net/ipsock_posix.go:146
#6 0xfd7feea7d28a in net.dialTCP (net=..., laddr=laddr@entry=0x0,
raddr=raddr@entry=0xc2061630f0, deadline=...)
at /vol/gcc/src/hg/trunk/local/libgo/go/net/tcpsock_posix.go:153
#7 0xfd7feea7e051 in net.dialAddr (net=..., addr=..., addri=...,
deadline=...) at /vol/gcc/src/hg/trunk/local/libgo/go/net/dial.go:99
#8 0xfd7feea82d52 in net.Dial (net=..., addr=...)
at /vol/gcc/src/hg/trunk/local/libgo/go/net/dial.go:93
#9 0x0044e3f1 in net_http.dial.pN18_net_http.Transport (
t=t@entry=0xc204c78540, network=..., addr=...) at transport.go:314
#10 0x0044e49c in net_http.getConn.pN18_net_http.Transport (
t=t@entry=0xc204c78540, cm=0xc206163090) at transport.go:326
#11 0x0044d944 in net_http.RoundTrip.pN18_net_http.Transport (
t=0xc204c78540, req=0xc206165000) at transport.go:160
#12 0x0043dd7c in http.send (t=..., req=0xc206165000) at client.go:162
#13 net_http.send.pN15_net_http.Client (c=c@entry=0xc2052a1f60,
req=req@entry=0xc206165000) at client.go:96
#14 0x0043e262 in net_http.doFollowingRedirects.pN15_net_http.Client (
c=c@entry=0xc2052a1f60, ireq=0xc206165000,
shouldRedirect=shouldRedirect@entry=0x43e080 http.shouldRedirectGet)
at client.go:278
#15 0x0043e181 in net_http.Get.pN15_net_http.Client (c=0xc2052a1f60,
url=...) at client.go:232
#16 0x0047fead in http_test.$nested112 () at transport_test.go:940
#17 0xfd7feea3fd2e in kickoff ()
at /vol/gcc/src/hg/trunk/local/libgo/runtime/proc.c:369
#18 0xfd7fee2d1460 in ?? () from /lib/64/libc.so.1
#19 0x0001 in ?? ()
#20 0x in ??