public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug go/56172] New: net FAILs on Solaris
@ 2013-02-01 12:50 ro at gcc dot gnu.org
2013-02-02 16:08 ` [Bug go/56172] " ian at airs dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: ro at gcc dot gnu.org @ 2013-02-01 12:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56172
Bug #: 56172
Summary: net FAILs on Solaris
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: go
AssignedTo: ian@airs.com
ReportedBy: ro@gcc.gnu.org
Host: *-*-solaris2.*
Target: *-*-solaris2.*
Build: *-*-solaris2.*
The libgo net test currently FAILs on Solaris. With -test.v=true I find
=== RUN TestAddFDReturnsError
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0xe]
goroutine 19 [running]:
created by runtime_MHeap_Scavenger
/vol/gcc/src/hg/trunk/local/libgo/runtime/mheap.c:408
goroutine 1 [chan receive]:
[...]
Running the test with -test.run=TestAddFDReturnsError under gdb reveals:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 3 (LWP 3)]
0xff23db2c in sem_invalid () from /lib/libc.so.1
(gdb) where
#0 0xff23db2c in sem_invalid () from /lib/libc.so.1
#1 0xff23dbf0 in sem_post () from /lib/libc.so.1
#2 0xfdfa1a5c in runtime_semawakeup (mp=0xddc0cf38)
at /vol/gcc/src/hg/trunk/local/libgo/runtime/thread-sema.c:125
#3 0xfdfa8f48 in kickoff ()
at /vol/gcc/src/hg/trunk/local/libgo/runtime/proc.c:369
#4 0xff1cb730 in __makecontext_v2 () from /lib/libc.so.1
sem_invalid () does
if (sem->sem_magic != SEMA_MAGIC) {
errno = EINVAL;
return (-1);
}
I haven't yet debugged how this happens.
Rainer
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug go/56172] net FAILs on Solaris
2013-02-01 12:50 [Bug go/56172] New: net FAILs on Solaris ro at gcc dot gnu.org
@ 2013-02-02 16:08 ` ian at airs dot com
2013-02-04 13:01 ` ro at CeBiTec dot Uni-Bielefeld.DE
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ian at airs dot com @ 2013-02-02 16:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56172
Ian Lance Taylor <ian at airs dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-02-02
Ever Confirmed|0 |1
--- Comment #1 from Ian Lance Taylor <ian at airs dot com> 2013-02-02 16:08:32 UTC ---
The error suggests that runtime_semawakeup was called with an m whose waitsema
field is NULL. There should be no way that kickoff can call runtime_semawakeup
directly, but it could be happening via a tailcall at the end of the function
that some goroutine was started to run. Possible tailcalls could come from
runtime_unlock or runtime_notewakeup. The stack trace shows that the goroutine
was started at mheap.c:408, and indeed that line starts a goroutine that runs
forcegchelper, and indeed forcegchelper ends with a tailcall to
runtime_notewakeup. runtime_notewakeup will look at the note's waitm field.
In this case the waitm field must be not NULL, and it must point to an m whose
waitsema field is NULL.
Unfortunately I don't see any way that could happen. The only m that could be
in the note is the one running runtime_MHeap_Scavenger. And that could only be
in the note if it calls runtime_notesleep before forcegchelper gets around to
calling runtime_notewakeup. And runtime_notesleep initializes the waitsema
field before it puts the m in the note.
Since you can recreate the bug, I guess the next step is to check the
mp->waitsema field in the runtime_semawakeup frame. My prediction is that it
is 0. But I'm not sure where to go from there since I don't see how it could
be 0.
And by the way I bet this is hiding something else, since the scavenger should
only run if nothing much else is happening, so once we fix this problem I
expect that the test will time out for some reason.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug go/56172] net FAILs on Solaris
2013-02-01 12:50 [Bug go/56172] New: net FAILs on Solaris ro at gcc dot gnu.org
2013-02-02 16:08 ` [Bug go/56172] " ian at airs dot com
@ 2013-02-04 13:01 ` ro at CeBiTec dot Uni-Bielefeld.DE
2013-02-05 23:59 ` ian at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2013-02-04 13:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56172
--- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2013-02-04 13:00:59 UTC ---
Thanks for the analysis.
> Since you can recreate the bug, I guess the next step is to check the
> mp->waitsema field in the runtime_semawakeup frame. My prediction is that it
> is 0. But I'm not sure where to go from there since I don't see how it could
> be 0.
In my case, mp->waitsema is 8.
In case you want to have a look yourself (which will be way faster), you
can find the build in
apoc:/var/gcc/regression/trunk/11-gcc-gas/build/sparc-sun-solaris2.11/libgo/net-check/test.
Rainer
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug go/56172] net FAILs on Solaris
2013-02-01 12:50 [Bug go/56172] New: net FAILs on Solaris ro at gcc dot gnu.org
2013-02-02 16:08 ` [Bug go/56172] " ian at airs dot com
2013-02-04 13:01 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2013-02-05 23:59 ` ian at gcc dot gnu.org
2013-02-06 22:41 ` ian at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ian at gcc dot gnu.org @ 2013-02-05 23:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56172
--- Comment #3 from ian at gcc dot gnu.org <ian at gcc dot gnu.org> 2013-02-05 23:59:28 UTC ---
Author: ian
Date: Tue Feb 5 23:59:24 2013
New Revision: 195774
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195774
Log:
PR go/56172
runtime: Fix argument passed to forcegchelper.
Modified:
trunk/libgo/runtime/mheap.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug go/56172] net FAILs on Solaris
2013-02-01 12:50 [Bug go/56172] New: net FAILs on Solaris ro at gcc dot gnu.org
` (2 preceding siblings ...)
2013-02-05 23:59 ` ian at gcc dot gnu.org
@ 2013-02-06 22:41 ` ian at gcc dot gnu.org
2013-02-06 22:42 ` ian at airs dot com
2013-02-07 17:05 ` ian at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: ian at gcc dot gnu.org @ 2013-02-06 22:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56172
--- Comment #4 from ian at gcc dot gnu.org <ian at gcc dot gnu.org> 2013-02-06 22:40:26 UTC ---
Author: ian
Date: Wed Feb 6 22:40:18 2013
New Revision: 195823
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195823
Log:
PR go/56172
net: Fixes for select based pollster.
Make Close work properly, mainly for testing. Restart the
select if a descriptor is closed.
Modified:
trunk/libgo/go/net/fd_bsd.go
trunk/libgo/go/net/fd_linux.go
trunk/libgo/go/net/fd_select.go
trunk/libgo/go/net/fd_unix.go
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug go/56172] net FAILs on Solaris
2013-02-01 12:50 [Bug go/56172] New: net FAILs on Solaris ro at gcc dot gnu.org
` (3 preceding siblings ...)
2013-02-06 22:41 ` ian at gcc dot gnu.org
@ 2013-02-06 22:42 ` ian at airs dot com
2013-02-07 17:05 ` ian at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: ian at airs dot com @ 2013-02-06 22:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56172
Ian Lance Taylor <ian at airs dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #5 from Ian Lance Taylor <ian at airs dot com> 2013-02-06 22:41:54 UTC ---
The patch to mheap.c should fix this segmentation violation.
As expected, there was another underlying problem, which should be fixed by the
patch to the net package.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug go/56172] net FAILs on Solaris
2013-02-01 12:50 [Bug go/56172] New: net FAILs on Solaris ro at gcc dot gnu.org
` (4 preceding siblings ...)
2013-02-06 22:42 ` ian at airs dot com
@ 2013-02-07 17:05 ` ian at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: ian at gcc dot gnu.org @ 2013-02-07 17:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56172
--- Comment #6 from ian at gcc dot gnu.org <ian at gcc dot gnu.org> 2013-02-07 17:04:37 UTC ---
Author: ian
Date: Thu Feb 7 17:04:24 2013
New Revision: 195855
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195855
Log:
PR go/56172
net: Skip TestMulticastListener on Solaris
>From Rainer Orth.
Modified:
trunk/libgo/go/net/multicast_posix_test.go
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-02-07 17:05 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-01 12:50 [Bug go/56172] New: net FAILs on Solaris ro at gcc dot gnu.org
2013-02-02 16:08 ` [Bug go/56172] " ian at airs dot com
2013-02-04 13:01 ` ro at CeBiTec dot Uni-Bielefeld.DE
2013-02-05 23:59 ` ian at gcc dot gnu.org
2013-02-06 22:41 ` ian at gcc dot gnu.org
2013-02-06 22:42 ` ian at airs dot com
2013-02-07 17:05 ` ian at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).