golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.47k stars 17.59k forks source link

Sporadic "panic: runtime error: SIGNONE: no trap" #733

Closed gopherbot closed 9 years ago

gopherbot commented 14 years ago

by esko.luontola:

What steps will reproduce the problem?

Every now and then, when I run the tests of
http://github.com/orfjackal/gospec/tree/f74c4867d53f80ba3fbdbb75b1dd23db96ef5985
the runtime panics with the message "panic: runtime error: SIGNONE: no
trap". The 6.out which caused the following stack trace is attached to this
message.

What is the expected output? What do you see instead?

orfjackal@vm-ubuntu64:~/devel/gospec/src/gospec$ make -s clean
orfjackal@vm-ubuntu64:~/devel/gospec/src/gospec$ make -s test
PASS
orfjackal@vm-ubuntu64:~/devel/gospec/src/gospec$ make -s test
PASS
orfjackal@vm-ubuntu64:~/devel/gospec/src/gospec$ ./6.out 
PASS
orfjackal@vm-ubuntu64:~/devel/gospec/src/gospec$ ./6.out 
PASS
orfjackal@vm-ubuntu64:~/devel/gospec/src/gospec$ ./6.out 
PASS
orfjackal@vm-ubuntu64:~/devel/gospec/src/gospec$ ./6.out 
PASS
orfjackal@vm-ubuntu64:~/devel/gospec/src/gospec$ ./6.out 
PASS
orfjackal@vm-ubuntu64:~/devel/gospec/src/gospec$ ./6.out 
panic: runtime error: SIGNONE: no trap

panic PC=0x7f59d779ffc8
runtime.panic+0x7c /home/orfjackal/go/src/pkg/runtime/proc.c:1011
    runtime.panic(0x7f5900000000, 0x405dd0)
panicstring+0x60 /home/orfjackal/go/src/pkg/runtime/runtime.c:83
    panicstring(0x47c068, 0x7f59d779b390)
sigpanic+0x48 /home/orfjackal/go/src/pkg/runtime/linux/thread.c:296
    sigpanic()
scheduler+0x4f /home/orfjackal/go/src/pkg/runtime/proc.c:459
    scheduler()
mstart+0x47 /home/orfjackal/go/src/pkg/runtime/proc.c:389
    mstart()
clone+0x42 /home/orfjackal/go/src/pkg/runtime/linux/amd64/sys.s:145
    clone()

goroutine 130 [1]:
goexit /home/orfjackal/go/src/pkg/runtime/proc.c:145
    goexit()

goroutine 2 [7]:
gosched+0x4e /home/orfjackal/go/src/pkg/runtime/proc.c:541
    gosched()
gc+0x1ca /home/orfjackal/go/src/pkg/runtime/mgc0.c:329
    gc(0x4509c0, 0x0)
mallocgc+0x1ca /home/orfjackal/go/src/pkg/runtime/malloc.c:95
    mallocgc(0x7f5900000000, 0x0, 0x0, 0x0, 0x7f59d772f0b8, ...)
mal+0x36 /home/orfjackal/go/src/pkg/runtime/malloc.c:236
    mal(0x80, 0x100000000)
runtime.makeslice+0xf9 /home/orfjackal/go/src/pkg/runtime/slice.c:28
    runtime.makeslice(0x80, 0x7f59d772f1c8, 0x403ad0, 0x4baff8, 0x10, ...)
container/vector.*Vector·realloc+0x41
/home/orfjackal/go/src/pkg/container/vector/vector.go:15
    container/vector.*Vector·realloc(0x4af498, 0x800000001, 0x0, 0x800000001,
0x700000060, ...)
container/vector.*Vector·Expand+0xe7
/home/orfjackal/go/src/pkg/container/vector/vector.go:40
    container/vector.*Vector·Expand(0x7f59d7806aa0, 0x100000001, 0x0, 0x0,
0x2d7820498, ...)
container/vector.*Vector·Insert+0x2c
/home/orfjackal/go/src/pkg/container/vector/vector.go:115
    container/vector.*Vector·Insert(0x7f59d7806aa0, 0x100000000, 0x440f42,
0x7f59d7806aa0, 0x7f5900000000, ...)
container/vector.*Vector·Push+0x31
/home/orfjackal/go/src/pkg/container/vector/vector.go:172
    container/vector.*Vector·Push(0x7f59d7806aa0, 0x7f5900000000, 0x4a8898,
0x7f59d7808a20)
nanospec.*aSpec·EnterChild+0x9a
/home/orfjackal/devel/nanospec.go/src/context.go:121
    nanospec.*aSpec·EnterChild(0x7f59d7806aa0, 0x4a8898, 0x7f59d7808a20,
0x7f59d7808a20, 0x200000001, ...)
nanospec.*runContext·enterSpec+0x2e
/home/orfjackal/devel/nanospec.go/src/context.go:55
    nanospec.*runContext·enterSpec(0x7f59d78089c0, 0x49cae0, 0x21, 0x410433)
nanospec.*runContext·Specify+0x2a
/home/orfjackal/devel/nanospec.go/src/context.go:49
    nanospec.*runContext·Specify(0x7f59d78089f0, 0x49cae0, 0x21, 0x4152f1,
0x7f59d78089f0, ...)
gospec.ResultsSpec+0xd6
/home/orfjackal/devel/gospec/src/gospec/results_test.go:32
    gospec.ResultsSpec(0x7f59d78089f0, 0x49cae0)
nanospec._func_001+0x4d /home/orfjackal/devel/nanospec.go/src/context.go:43
    nanospec._func_001(0x7f59d7726bc0, 0x7f59d78089f0)
nanospec.*aSpec·Execute+0x21
/home/orfjackal/devel/nanospec.go/src/context.go:100
    nanospec.*aSpec·Execute(0x7f59d7807d70, 0x7f59d7807d40, 0x4421d2,
0x7f59d78089c0)
nanospec.*runContext·Run+0xa7
/home/orfjackal/devel/nanospec.go/src/context.go:43
    nanospec.*runContext·Run(0x7f59d78089c0, 0x7f59d7807d40)
nanospec.Run+0x34 /home/orfjackal/devel/nanospec.go/src/context.go:16
    nanospec.Run(0x7f59d78089f0, 0x41521b, 0x7f59d78089f0, 0x0)
gospec.TestAllSpecs+0x116
/home/orfjackal/devel/gospec/src/gospec/all_specs_test.go:24
    gospec.TestAllSpecs(0x7f59d7776b60, 0x41521b)
testing.tRunner+0x22 /home/orfjackal/go/src/pkg/testing/testing.go:132
    testing.tRunner(0x7f59d7776b60, 0x0, 0x401560, 0x7f59d7776b60)
goexit /home/orfjackal/go/src/pkg/runtime/proc.c:145
    goexit()

goroutine 1 [4]:
gosched+0x4e /home/orfjackal/go/src/pkg/runtime/proc.c:541
    gosched()
chanrecv+0x3e6 /home/orfjackal/go/src/pkg/runtime/chan.c:327
    chanrecv(0x7f59d7725bf0, 0x7f59d7776b20, 0x7f5900000010, 0xa0000000a,
0x7f59d7798140, ...)
runtime.chanrecv1+0x41 /home/orfjackal/go/src/pkg/runtime/chan.c:429
    runtime.chanrecv1(0x7f59d7725ba0, 0x7f59d772b048)
testing.Main+0x240 /home/orfjackal/go/src/pkg/testing/testing.go:159
    testing.Main(0x7f59d7725ba0, 0x49a898)
main.main+0x23 /home/orfjackal/devel/gospec/src/gospec/_testmain.go:17
    main.main()
mainstart+0xf /home/orfjackal/go/src/pkg/runtime/amd64/asm.s:60
    mainstart()
goexit /home/orfjackal/go/src/pkg/runtime/proc.c:145
    goexit()
orfjackal@vm-ubuntu64:~/devel/gospec/src/gospec$ 

What is your $GOOS?  $GOARCH?
linux amd64

Which revision are you using?  (hg identify)
5adafa4a480d tip

Attachments:

  1. 6.out (1290682 bytes)
gopherbot commented 14 years ago

Comment 1 by esko.luontola:

This problem started happening to me after I had upgraded to release.2010-04-13 and I
begun writing code which uses recover(). I'm not sure whether that is related.
rsc commented 14 years ago

Comment 2:

Owner changed to r...@golang.org.

Status changed to Started.

rsc commented 14 years ago

Comment 3:

Please check whether http://golang.org/cl/958041 fixes your problem.
You can apply it to your local repository with
hg clpatch 958041
Thanks.
Russ
gopherbot commented 14 years ago

Comment 4 by esko.luontola:

That patch fixed it. Thanks.
rsc commented 14 years ago

Comment 5:

This issue was closed by revision 214a55b06abb864200dc9cf4d1ba2b4ebe49333.

Status changed to Fixed.