Skip to content

os/signal: "morestack on gsignal" on NetBSD #19652

@bradfitz

Description

@bradfitz

While debugging NetBSD failures, I got:

$ gomote run user-bradfitz-netbsd-amd64-70-0 go/bin/go test -short -v os/signal  
=== RUN   TestSignal  
--- PASS: TestSignal (0.00s)  
        signal_test.go:40: sighup...  
        signal_test.go:49: sigwinch...  
        signal_test.go:56: sighup...  
        signal_test.go:59: sighup...  
=== RUN   TestStress  
fatal: morestack on gsignal  
SIGTRAP: trace trap  
PC=0x453ff8 m=4 sigcode=1  
  
goroutine 11 [running]:  
runtime.morestack()  
        /tmp/workdir/go/src/runtime/asm_amd64.s:381 +0x38 fp=0xc420023f98 sp=0xc420023f90  
created by os/signal.TestStress  
        /tmp/workdir/go/src/os/signal/signal_test.go:89 +0x10f  
  
goroutine 1 [chan receive]:  
testing.(*T).Run(0xc420068410, 0x541530, 0xa, 0x549100, 0x468f01)  
        /tmp/workdir/go/src/testing/testing.go:702 +0x2f3  
testing.runTests.func1(0xc420068410)  
        /tmp/workdir/go/src/testing/testing.go:888 +0x67  
testing.tRunner(0xc420068410, 0xc420035e10)  
        /tmp/workdir/go/src/testing/testing.go:659 +0x98  
testing.runTests(0xc42000a100, 0x5f7a40, 0x7, 0x7, 0x5e4c00)  
        /tmp/workdir/go/src/testing/testing.go:886 +0x2b5  
testing.(*M).Run(0xc420035f20, 0xc420035f78)  
        /tmp/workdir/go/src/testing/testing.go:828 +0xf7  
main.main()  
        os/signal/_test/_testmain.go:58 +0xdb  
  
goroutine 5 [syscall]:  
os/signal.signal_recv(0x5e4d80)  
        /tmp/workdir/go/src/runtime/sigqueue.go:116 +0xa8  
os/signal.loop()  
        /tmp/workdir/go/src/os/signal/signal_unix.go:22 +0x22  
created by os/signal.init.1  
        /tmp/workdir/go/src/os/signal/signal_unix.go:28 +0x41  
  
goroutine 9 [sleep]:  
time.Sleep(0x5f5e100)  
        /tmp/workdir/go/src/runtime/time.go:64 +0x12d  
os/signal.TestStress(0xc4200685b0)  
        /tmp/workdir/go/src/os/signal/signal_test.go:102 +0x11d  
testing.tRunner(0xc4200685b0, 0x549100)  
        /tmp/workdir/go/src/testing/testing.go:659 +0x98  
created by testing.(*T).Run  
        /tmp/workdir/go/src/testing/testing.go:701 +0x2d5  
  
goroutine 7 [select, locked to thread]:  
runtime.gopark(0x5494c0, 0x0, 0x540b75, 0x6, 0x18, 0x1)  
        /tmp/workdir/go/src/runtime/proc.go:267 +0x12c  
runtime.selectgo(0xc42003bf50, 0xc42004a420)  
        /tmp/workdir/go/src/runtime/select.go:395 +0xc68  
runtime.ensureSigM.func1()  
        /tmp/workdir/go/src/runtime/signal_unix.go:492 +0x1f4  
runtime.goexit()  
        /tmp/workdir/go/src/runtime/asm_amd64.s:2152 +0x1  
  
goroutine 10 [select]:  
os/signal.TestStress.func1(0xc42004a960, 0xc42004a9c0)  
        /tmp/workdir/go/src/os/signal/signal_test.go:81 +0x16a  
created by os/signal.TestStress  
        /tmp/workdir/go/src/os/signal/signal_test.go:75 +0xe3  
  
rax    0x1c  
rbx    0xc420025000  
rcx    0x457935  
rdx    0x0  
rdi    0x2  
rsi    0x544f60  
rbp    0xc420023fc0  
rsp    0xc420023f90  
r8     0x0  
r9     0x0  
r10    0x0  
r11    0x206  
r12    0x0  
r13    0x0  
r14    0x11  
r15    0x0  
rip    0x453ff8  
rflags 0x206  
cs     0x47  
fs     0x0  
gs     0x0  
exit status 2  
FAIL    os/signal       0.102s  
Error running run: exit status 1  

Sometimes it passes, though.

(I meant to run a different package, but ended up testing os/signal instead.)

/cc @bcmills @ianlancetaylor

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions