Skip to content

runtime: fatal error: stack not a power of 2 when using go 1.4.2 #12192

@tsgan

Description

@tsgan

go test passes for Linux but crashes on FreeBSD:

tsgan@bsd:~/go/src/github.com/g3rk6/gopensslproxy % go test -a
fatal error: stack not a power of 2

runtime stack:
runtime.throw(0xc44084)
    /home/tsgan/go1.4/src/runtime/panic.go:491 +0xad
runtime.stackfree(0x802c83170, 0xc2080d6000)
    /home/tsgan/go1.4/src/runtime/stack.c:272 +0x55
gfput(0xc208012000, 0xc2080018c0)
    /home/tsgan/go1.4/src/runtime/proc.c:2266 +0x84
goexit0(0xc2080018c0)
    /home/tsgan/go1.4/src/runtime/proc.c:1716 +0x169
runtime.mcall(0x43d534)
    /home/tsgan/go1.4/src/runtime/asm_amd64.s:186 +0x5a

goroutine 1 [runnable]:
testing.RunTests(0x907040, 0xc31bc0, 0x18, 0x18, 0x1)
    /home/tsgan/go1.4/src/testing/testing.go:556 +0xad6
testing.(*M).Run(0xc20809a5a0, 0xc54a00)
    /home/tsgan/go1.4/src/testing/testing.go:485 +0x6c
main.main()
    github.com/g3rk6/gopensslproxy/_test/_testmain.go:100 +0x1d5

goroutine 5 [syscall]:
os/signal.loop()
    /home/tsgan/go1.4/src/os/signal/signal_unix.go:21 +0x1f
created by os/signal.init·1
    /home/tsgan/go1.4/src/os/signal/signal_unix.go:27 +0x35

goroutine 11 [IO wait]:
net.(*pollDesc).Wait(0xc2080ac450, 0x72, 0x0, 0x0)
    /home/tsgan/go1.4/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc2080ac450, 0x0, 0x0)
    /home/tsgan/go1.4/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).accept(0xc2080ac3f0, 0x0, 0x800c83de0, 0xc20800ba38)
    /home/tsgan/go1.4/src/net/fd_unix.go:419 +0x40b
net.(*TCPListener).AcceptTCP(0xc20804e018, 0x0, 0x0, 0x0)
    /home/tsgan/go1.4/src/net/tcpsock_posix.go:234 +0x4e
net.(*TCPListener).Accept(0xc20804e018, 0x0, 0x0, 0x0, 0x0)
    /home/tsgan/go1.4/src/net/tcpsock_posix.go:244 +0x4c
net/http/httptest.(*historyListener).Accept(0xc2080c5c50, 0x0, 0x0, 0x0, 0x0)
    /home/tsgan/go1.4/src/net/http/httptest/server.go:48 +0x7a
net/http.(*Server).Serve(0xc2080b5140, 0x800c85b68, 0xc2080c5c50, 0x0, 0x0)
    /home/tsgan/go1.4/src/net/http/server.go:1728 +0x92
created by net/http/httptest.(*Server).Start
    /home/tsgan/go1.4/src/net/http/httptest/server.go:109 +0x35e

goroutine 10 [IO wait]:
net.(*pollDesc).Wait(0xc2080acd10, 0x72, 0x0, 0x0)
    /home/tsgan/go1.4/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc2080acd10, 0x0, 0x0)
    /home/tsgan/go1.4/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).accept(0xc2080accb0, 0x0, 0x800c83de0, 0xc20800b9b8)
    /home/tsgan/go1.4/src/net/fd_unix.go:419 +0x40b
net.(*TCPListener).AcceptTCP(0xc20804e1d8, 0x0, 0x0, 0x0)
    /home/tsgan/go1.4/src/net/tcpsock_posix.go:234 +0x4e
net.(*TCPListener).Accept(0xc20804e1d8, 0x0, 0x0, 0x0, 0x0)
    /home/tsgan/go1.4/src/net/tcpsock_posix.go:244 +0x4c
crypto/tls.(*listener).Accept(0xc2080abd40, 0x0, 0x0, 0x0, 0x0)
    /home/tsgan/go1.4/src/crypto/tls/tls.go:46 +0x6b
net/http/httptest.(*historyListener).Accept(0xc2080c5bc0, 0x0, 0x0, 0x0, 0x0)
    /home/tsgan/go1.4/src/net/http/httptest/server.go:48 +0x7a
net/http.(*Server).Serve(0xc2080b5e60, 0x800c85b68, 0xc2080c5bc0, 0x0, 0x0)
    /home/tsgan/go1.4/src/net/http/server.go:1728 +0x92
created by net/http/httptest.(*Server).StartTLS
    /home/tsgan/go1.4/src/net/http/httptest/server.go:142 +0x887

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /home/tsgan/go1.4/src/runtime/asm_amd64.s:2232 +0x1

goroutine 12 [IO wait]:
net.(*pollDesc).Wait(0xc2080ac4c0, 0x72, 0x0, 0x0)
    /home/tsgan/go1.4/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc2080ac4c0, 0x0, 0x0)
    /home/tsgan/go1.4/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).accept(0xc2080ac460, 0x0, 0x800c83de0, 0xc20800ba68)
    /home/tsgan/go1.4/src/net/fd_unix.go:419 +0x40b
net.(*TCPListener).AcceptTCP(0xc20804e020, 0x0, 0x0, 0x0)
    /home/tsgan/go1.4/src/net/tcpsock_posix.go:234 +0x4e
net.(*TCPListener).Accept(0xc20804e020, 0x0, 0x0, 0x0, 0x0)
    /home/tsgan/go1.4/src/net/tcpsock_posix.go:244 +0x4c
net/http/httptest.(*historyListener).Accept(0xc2080c5ce0, 0x0, 0x0, 0x0, 0x0)
    /home/tsgan/go1.4/src/net/http/httptest/server.go:48 +0x7a
net/http.(*Server).Serve(0xc2080b51a0, 0x800c85b68, 0xc2080c5ce0, 0x0, 0x0)
    /home/tsgan/go1.4/src/net/http/server.go:1728 +0x92
created by net/http/httptest.(*Server).Start
    /home/tsgan/go1.4/src/net/http/httptest/server.go:109 +0x35e

goroutine 14 [IO wait]:
net.(*pollDesc).Wait(0xc2080ac610, 0x72, 0x0, 0x0)
    /home/tsgan/go1.4/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc2080ac610, 0x0, 0x0)
    /home/tsgan/go1.4/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).accept(0xc2080ac5b0, 0x0, 0x800c83de0, 0xc20800bc18)
    /home/tsgan/go1.4/src/net/fd_unix.go:419 +0x40b
net.(*TCPListener).AcceptTCP(0xc20804e210, 0xc2080b60e0, 0x0, 0x0)
    /home/tsgan/go1.4/src/net/tcpsock_posix.go:234 +0x4e
net.(*TCPListener).Accept(0xc20804e210, 0x0, 0x0, 0x0, 0x0)
    /home/tsgan/go1.4/src/net/tcpsock_posix.go:244 +0x4c
github.com/g3rk6/openssl.(*listener).Accept(0xc2080abf00, 0x0, 0x0, 0x0, 0x0)
    /home/tsgan/go/src/github.com/g3rk6/openssl/net.go:28 +0x68
net/http.(*Server).Serve(0xc2080b5380, 0x800c85d78, 0xc2080abf00, 0x0, 0x0)
    /home/tsgan/go1.4/src/net/http/server.go:1728 +0x92
created by github.com/g3rk6/gopensslproxy.TestSignerTLS
    /home/tsgan/go/src/github.com/g3rk6/gopensslproxy/signer_test.go:80 +0x596
exit status 2
FAIL    github.com/g3rk6/gopensslproxy  2.272s
tsgan@bsd:~/go/src/github.com/g3rk6/gopensslproxy %

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions