diff mbox

Recent Go patch broke Alpha bootstrap

Message ID CAKOQZ8zWRreC97j8CGSeU5Nfa=KnG_Hj5TpcZ87qFTxk8WdTbg@mail.gmail.com
State New
Headers show

Commit Message

Ian Lance Taylor Nov. 15, 2013, 2:52 a.m. UTC
On Wed, Nov 13, 2013 at 7:25 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Tue, Nov 12, 2013 at 8:52 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
>
>>>> panic: runtime error: invalid memory address or nil pointer dereference
>>>> [signal 0xb code=0x1 addr=0x1c]
>>
>>>> FAIL: runtime/pprof
>>>> gmake[2]: *** [runtime/pprof/check] Error 1
>>>>
>>>> This one is new, I have to look into it a bit deeper.
>>>
>>>
>>> I don't know what is happening here.  I can't recreate it.  There was
>>> a different problem that could arise in runtime/pprof, that was fixed
>>> by a patch I submitted on Saturday
>>> (http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01016.html).  So it's
>>> possible that this is fixed now.
>>
>> The failure is specific to !USING_SPLIT_STACK targets:
>
> The same error triggered on CentOS 5.10 x86_64 (another
> !USING_SPLIT_STACK target) for 32bit lib (net, runtime). The panic:
> string is the same, only addr=0x9f. There are also a couple of
> segfaults (database/sql, net/http) and abort in sync/atomic.

Could you check to see if this patch fixes the problem?  Thanks.

Ian

Comments

Uros Bizjak Nov. 15, 2013, 11:35 a.m. UTC | #1
On Fri, Nov 15, 2013 at 3:52 AM, Ian Lance Taylor <iant@google.com> wrote:

>>>>> panic: runtime error: invalid memory address or nil pointer dereference
>>>>> [signal 0xb code=0x1 addr=0x1c]
>>>
>>>>> FAIL: runtime/pprof
>>>>> gmake[2]: *** [runtime/pprof/check] Error 1
>>>>>
>>>>> This one is new, I have to look into it a bit deeper.
>>>>
>>>>
>>>> I don't know what is happening here.  I can't recreate it.  There was
>>>> a different problem that could arise in runtime/pprof, that was fixed
>>>> by a patch I submitted on Saturday
>>>> (http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01016.html).  So it's
>>>> possible that this is fixed now.
>>>
>>> The failure is specific to !USING_SPLIT_STACK targets:
>>
>> The same error triggered on CentOS 5.10 x86_64 (another
>> !USING_SPLIT_STACK target) for 32bit lib (net, runtime). The panic:
>> string is the same, only addr=0x9f. There are also a couple of
>> segfaults (database/sql, net/http) and abort in sync/atomic.
>
> Could you check to see if this patch fixes the problem?  Thanks.

Unfortunately, it doesn't.

I still see panic in runtime (trace below), segfault in sync,
database/sql, net/http and abort in sync/atomic on 32bit CentOS 5.10
library.

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x9f]

goroutine 1 [chan receive]:
testing.RunTests
        ../../../../gcc-svn/trunk/libgo/go/testing/testing.go:470
testing.Main
        ../../../../gcc-svn/trunk/libgo/go/testing/testing.go:401
main.main
        /home/uros/gcc-build/x86_64-unknown-linux-gnu/32/libgo/gotest28068/test/_testmain.go:256

goroutine 64 [running]:
        goroutine running on other thread; stack unavailable
created by testing.RunTests
        ../../../../gcc-svn/trunk/libgo/go/testing/testing.go:469

goroutine 75 [runnable]:
created by runtime_test.testConcurrentReadsAfterGrowth
        /home/uros/gcc-build/x86_64-unknown-linux-gnu/32/libgo/gotest28068/test/map_test.go:261

goroutine 84 [runnable]:
created by runtime_test.testConcurrentReadsAfterGrowth
        /home/uros/gcc-build/x86_64-unknown-linux-gnu/32/libgo/gotest28068/test/map_test.go:266

goroutine 82 [runnable]:
created by runtime_test.testConcurrentReadsAfterGrowth
        /home/uros/gcc-build/x86_64-unknown-linux-gnu/32/libgo/gotest28068/test/map_test.go:266

goroutine 73 [runnable]:
created by runtime_test.testConcurrentReadsAfterGrowth
        /home/uros/gcc-build/x86_64-unknown-linux-gnu/32/libgo/gotest28068/test/map_test.go:261

goroutine 77 [runnable]:
created by runtime_test.testConcurrentReadsAfterGrowth
        /home/uros/gcc-build/x86_64-unknown-linux-gnu/32/libgo/gotest28068/test/map_test.go:261

goroutine 80 [runnable]:
created by runtime_test.testConcurrentReadsAfterGrowth
        /home/uros/gcc-build/x86_64-unknown-linux-gnu/32/libgo/gotest28068/test/map_test.go:266

goroutine 69 [runnable]:
created by runtime_test.testConcurrentReadsAfterGrowth
        /home/uros/gcc-build/x86_64-unknown-linux-gnu/32/libgo/gotest28068/test/map_test.go:261

goroutine 78 [runnable]:
created by runtime_test.testConcurrentReadsAfterGrowth

[... Many more same goroutine logs...]

Uros.
Uros Bizjak Nov. 15, 2013, 12:34 p.m. UTC | #2
On Fri, Nov 15, 2013 at 12:35 PM, Uros Bizjak <ubizjak@gmail.com> wrote:

>>>>>> panic: runtime error: invalid memory address or nil pointer dereference
>>>>>> [signal 0xb code=0x1 addr=0x1c]
>>>>
>>>>>> FAIL: runtime/pprof
>>>>>> gmake[2]: *** [runtime/pprof/check] Error 1
>>>>>>
>>>>>> This one is new, I have to look into it a bit deeper.
>>>>>
>>>>>
>>>>> I don't know what is happening here.  I can't recreate it.  There was
>>>>> a different problem that could arise in runtime/pprof, that was fixed
>>>>> by a patch I submitted on Saturday
>>>>> (http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01016.html).  So it's
>>>>> possible that this is fixed now.
>>>>
>>>> The failure is specific to !USING_SPLIT_STACK targets:
>>>
>>> The same error triggered on CentOS 5.10 x86_64 (another
>>> !USING_SPLIT_STACK target) for 32bit lib (net, runtime). The panic:
>>> string is the same, only addr=0x9f. There are also a couple of
>>> segfaults (database/sql, net/http) and abort in sync/atomic.
>>
>> Could you check to see if this patch fixes the problem?  Thanks.

Oh, I was not clear.

The patch fixes the net failure on Alpha and Centos 5.10, but other
failures on 32bit Centos 5.10 remain.

Thanks,
Uros.
diff mbox

Patch

diff -r 9b2a1ae08a21 libgo/runtime/proc.c
--- a/libgo/runtime/proc.c	Thu Nov 14 14:29:49 2013 -0800
+++ b/libgo/runtime/proc.c	Thu Nov 14 18:42:54 2013 -0800
@@ -1983,7 +1983,10 @@ 
 #endif
 	gp->gcnext_sp = nil;
 	runtime_memclr(&gp->gcregs, sizeof gp->gcregs);
-	m->p->syscalltick++;
+
+	// Don't refer to m again, we might be running on a different
+	// thread after returning from runtime_mcall.
+	runtime_m()->p->syscalltick++;
 }
 
 static bool