go-stack / stack

Package stack implements utilities to capture, manipulate, and format call stacks.
MIT License
395 stars 33 forks source link

segmentation violation on Ubuntu on Windows #14

Closed karalabe closed 7 years ago

karalabe commented 7 years ago

We've received a crash report https://github.com/ethereum/go-ethereum/issues/14777 from one of our users running our project on Ubuntu on Windows. Alas there's no need to do that as we do ship Windows binaries, imho it's still a bug that should be fixed here. It's probably a trivial fix.

Here's the crash report:

unexpected fault address 0x0
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x80 addr=0x0 pc=0x5fb5b1]

goroutine 1 [running, locked to thread]:
runtime.throw(0xeac94e, 0x5)
        /usr/lib/go-1.8/src/runtime/panic.go:596 +0x95 fp=0xc42004fce0 sp=0xc42004fcc0
runtime.sigpanic()
        /usr/lib/go-1.8/src/runtime/signal_unix.go:297 +0x28c fp=0xc42004fd30 sp=0xc42004fce0
github.com/ethereum/go-ethereum/vendor/github.com/go-stack/stack.findSigpanic.func1(0x0, 0xc42004fd70, 0x0)
        /build/ethereum-vg6EjT/ethereum-1.6.6+build10111+trusty/build/_workspace/src/github.com/ethereum/go-ethereum/vendor/github.com/go-stack/stack/stack.go:228 +0x51 fp=0xc42004fd58 sp=0xc42004fd30
github.com/ethereum/go-ethereum/vendor/github.com/go-stack/stack.findSigpanic(0xee3b63)
        /build/ethereum-vg6EjT/ethereum-1.6.6+build10111+trusty/build/_workspace/src/github.com/ethereum/go-ethereum/vendor/github.com/go-stack/stack/stack.go:229 +0x3d fp=0xc42004fd88 sp=0xc42004fd58
github.com/ethereum/go-ethereum/vendor/github.com/go-stack/stack.init()
        /build/ethereum-vg6EjT/ethereum-1.6.6+build10111+trusty/build/_workspace/src/github.com/ethereum/go-ethereum/vendor/github.com/go-stack/stack/stack.go:233 +0xa4 fp=0xc42004fdb8 sp=0xc42004fd88
github.com/ethereum/go-ethereum/log.init()
        /build/ethereum-vg6EjT/ethereum-1.6.6+build10111+trusty/build/_workspace/src/github.com/ethereum/go-ethereum/log/syslog.go:58 +0x82 fp=0xc42004fdf8 sp=0xc42004fdb8
github.com/ethereum/go-ethereum/trie.init()
        /build/ethereum-vg6EjT/ethereum-1.6.6+build10111+trusty/build/_workspace/src/github.com/ethereum/go-ethereum/trie/trie.go:506 +0x7d fp=0xc42004fe38 sp=0xc42004fdf8
github.com/ethereum/go-ethereum/core/types.init()
        /build/ethereum-vg6EjT/ethereum-1.6.6+build10111+trusty/build/_workspace/src/github.com/ethereum/go-ethereum/core/types/transaction_signing.go:321 +0x87 fp=0xc42004fe98 sp=0xc42004fe38
github.com/ethereum/go-ethereum.init()
        /build/ethereum-vg6EjT/ethereum-1.6.6+build10111+trusty/build/_workspace/src/github.com/ethereum/go-ethereum/interfaces.go:211 +0x5a fp=0xc42004fec8 sp=0xc42004fe98
github.com/ethereum/go-ethereum/accounts.init()
        /build/ethereum-vg6EjT/ethereum-1.6.6+build10111+trusty/build/_workspace/src/github.com/ethereum/go-ethereum/accounts/url.go:89 +0x50 fp=0xc42004fef8 sp=0xc42004fec8
main.init()
        /build/ethereum-vg6EjT/ethereum-1.6.6+build10111+trusty/build/_workspace/src/github.com/ethereum/go-ethereum/cmd/geth/usage.go:303 +0x69 fp=0xc42004ff88 sp=0xc42004fef8
runtime.main()
        /usr/lib/go-1.8/src/runtime/proc.go:173 +0x1ca fp=0xc42004ffe0 sp=0xc42004ff88
runtime.goexit()
        /usr/lib/go-1.8/src/runtime/asm_amd64.s:2197 +0x1 fp=0xc42004ffe8 sp=0xc42004ffe0

Btw, I did a quick search to see if anyone else hit this and indeed there are other instances too, such as https://github.com/inconshreveable/ngrok/issues/364

ChrisHines commented 7 years ago

Thanks for the issue report. I've been receiving several similar reports lately. Ultimately this will get fixed by #13. I now think a simpler fix is warranted to resolve the downstream issues until the bigger refactor is completed. Look for an update soon.

ChrisHines commented 7 years ago

The simpler fix is available in #12.

ChrisHines commented 7 years ago

This issue should be fixed on master and tagged release v1.5.4: https://github.com/go-stack/stack/releases/tag/v1.5.4.

karalabe commented 7 years ago

@ChrisHines Thank you very much!