Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: SIGSEGV crash #22324

Closed
stemar94 opened this issue Oct 18, 2017 · 7 comments
Closed

runtime: SIGSEGV crash #22324

stemar94 opened this issue Oct 18, 2017 · 7 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@stemar94
Copy link

stemar94 commented Oct 18, 2017

Updated

What did you do?

Run this program: https://play.golang.org/p/eB0DSNQe7h

What did you expect to see?

No failure

What did you see instead?

fatal error: unexpected signal during runtime execution
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x41b4af]

runtime stack:
runtime.throw(0x4caa9f, 0x2a)
/home/marvin/go/src/runtime/panic.go:616 +0x81
runtime.sigpanic()
/home/marvin/go/src/runtime/signal_unix.go:360 +0x279
runtime.scanblock(0x53a520, 0x67b0, 0x0, 0xc420027260)
/home/marvin/go/src/runtime/mgcmark.go:1071 +0x5f
runtime.markrootBlock(0x53a520, 0x67b0, 0x0, 0xc420027260, 0x0)
/home/marvin/go/src/runtime/mgcmark.go:294 +0x7c
runtime.markroot(0xc420027260, 0x2)
/home/marvin/go/src/runtime/mgcmark.go:195 +0xe7
runtime.gcDrain(0xc420027260, 0xd)
/home/marvin/go/src/runtime/mgcmark.go:912 +0xd4
runtime.gcBgMarkWorker.func2()
/home/marvin/go/src/runtime/mgc.go:1805 +0x187
runtime.systemstack(0x0)
/home/marvin/go/src/runtime/asm_amd64.s:421 +0x79
runtime.mstart()
/home/marvin/go/src/runtime/proc.go:1152

goroutine 129 [GC worker (idle)]:
runtime.systemstack_switch()
/home/marvin/go/src/runtime/asm_amd64.s:375 fp=0xc4203dc748 sp=0xc4203dc740 pc=0x450500
runtime.gcBgMarkWorker(0xc420026000)
/home/marvin/go/src/runtime/mgc.go:1769 +0x1e7 fp=0xc4203dc7d8 sp=0xc4203dc748 pc=0x4176c7
runtime.goexit()
/home/marvin/go/src/runtime/asm_amd64.s:2374 +0x1 fp=0xc4203dc7e0 sp=0xc4203dc7d8 pc=0x452f51
created by runtime.gcBgMarkStartWorkers
/home/marvin/go/src/runtime/mgc.go:1664 +0x79

goroutine 1 [runnable]:
syscall.Syscall6(0xf7, 0x1, 0x224, 0xc420043ce0, 0x1000004, 0x0, 0x0, 0x0, 0xc420043ce0, 0x0)
/home/marvin/go/src/syscall/asm_linux_amd64.s:44 +0x5
os.(*Process).blockUntilWaitable(0xc420464390, 0xc420043e78, 0xc420464390, 0x0)
/home/marvin/go/src/os/wait_waitid.go:31 +0x98
os.(*Process).wait(0xc420464390, 0xc4200e6e28, 0xc4200dd9e0, 0xc4204660d8)
/home/marvin/go/src/os/exec_unix.go:22 +0x42
os.(*Process).Wait(0xc420464390, 0x0, 0x0, 0x4cbb98)
/home/marvin/go/src/os/exec.go:115 +0x2b
os/exec.(*Cmd).Wait(0xc420466000, 0x0, 0x0)
/home/marvin/go/src/os/exec/exec.go:446 +0x62
os/exec.(*Cmd).Run(0xc420466000, 0x4d7440, 0xc420391470)
/home/marvin/go/src/os/exec/exec.go:289 +0x5c
main.main()
/home/marvin/GOPATH/src/hiwi/rvhyper/eval/reproducer.go:41 +0xf6

goroutine 5 [syscall]:
syscall.Syscall6(0xf7, 0x1, 0x1d6, 0xc420031db8, 0x1000004, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/marvin/go/src/syscall/asm_linux_amd64.s:44 +0x5
os.(*Process).blockUntilWaitable(0xc4200183c0, 0x0, 0x0, 0x0)
/home/marvin/go/src/os/wait_waitid.go:31 +0x98
os.(*Process).wait(0xc4200183c0, 0x0, 0x0, 0x3)
/home/marvin/go/src/os/exec_unix.go:22 +0x42
os.(*Process).Wait(0xc4200183c0, 0xc420028600, 0x44f010, 0x8)
/home/marvin/go/src/os/exec.go:115 +0x2b
os/exec.(*Cmd).Wait(0xc42006c000, 0x4cbfb0, 0xc420012250)
/home/marvin/go/src/os/exec/exec.go:446 +0x62
main.main.func1(0xc420012250, 0xc42006c000)
/home/marvin/GOPATH/src/hiwi/rvhyper/eval/reproducer.go:27 +0x51
created by main.main
/home/marvin/GOPATH/src/hiwi/rvhyper/eval/reproducer.go:25 +0xe6

goroutine 120 [IO wait]:
internal/poll.runtime_pollWait(0x7fd02893ec30, 0x72, 0x1)
/home/marvin/go/src/runtime/netpoll.go:173 +0x57
internal/poll.(*pollDesc).wait(0xc4204600b8, 0x72, 0xffffffffffffff01, 0x4d73e0, 0x52d128)
/home/marvin/go/src/internal/poll/fd_poll_runtime.go:85 +0xae
internal/poll.(*pollDesc).waitRead(0xc4204600b8, 0xc420468001, 0x8000, 0x8000)
/home/marvin/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc4204600a0, 0xc420468000, 0x8000, 0x8000, 0x0, 0x0, 0x0)
/home/marvin/go/src/internal/poll/fd_unix.go:134 +0x17d
os.(*File).read(0xc4200e6de8, 0xc420468000, 0x8000, 0x8000, 0x44e030, 0xc4203dd668, 0xc4203dd658)
/home/marvin/go/src/os/file_unix.go:218 +0x4e
os.(*File).Read(0xc4200e6de8, 0xc420468000, 0x8000, 0x8000, 0x8000, 0x8000, 0x44f4c0)
/home/marvin/go/src/os/file.go:103 +0x6d
io.copyBuffer(0x7fd02893ef70, 0xc420060270, 0x4d72e0, 0xc4200e6de8, 0xc420468000, 0x8000, 0x8000, 0x5498a0, 0x5498a0, 0x5498b0)
/home/marvin/go/src/io/io.go:441 +0x123
io.Copy(0x7fd02893ef70, 0xc420060270, 0x4d72e0, 0xc4200e6de8, 0xc420331fbc, 0x0, 0x120406a80)
/home/marvin/go/src/io/io.go:411 +0x5a
os/exec.(*Cmd).writerDescriptor.func1(0x490187, 0xc420331fb0)
/home/marvin/go/src/os/exec/exec.go:264 +0x44
os/exec.(*Cmd).Start.func1(0xc420345e40, 0xc420346f40)
/home/marvin/go/src/os/exec/exec.go:380 +0x27
created by os/exec.(*Cmd).Start
/home/marvin/go/src/os/exec/exec.go:379 +0x5d6

goroutine 121 [runnable]:
syscall.Syscall(0x0, 0x8, 0xc420470000, 0x8000, 0x1, 0x8000, 0x0)
/home/marvin/go/src/syscall/asm_linux_amd64.s:18 +0x5
syscall.read(0x8, 0xc420470000, 0x8000, 0x8000, 0xffffffffffffff01, 0x0, 0x0)
/home/marvin/go/src/syscall/zsyscall_linux_amd64.go:749 +0x55
syscall.Read(0x8, 0xc420470000, 0x8000, 0x8000, 0xffffffffffffffff, 0x4d73e0, 0x52d128)
/home/marvin/go/src/syscall/syscall_unix.go:162 +0x49
internal/poll.(*FD).Read(0xc4204601e0, 0xc420470000, 0x8000, 0x8000, 0x0, 0x0, 0x0)
/home/marvin/go/src/internal/poll/fd_unix.go:130 +0x118
os.(*File).read(0xc4200e6e18, 0xc420470000, 0x8000, 0x8000, 0x0, 0x0, 0x0)
/home/marvin/go/src/os/file_unix.go:218 +0x4e
os.(*File).Read(0xc4200e6e18, 0xc420470000, 0x8000, 0x8000, 0x8000, 0x8000, 0x0)
/home/marvin/go/src/os/file.go:103 +0x6d
io.copyBuffer(0x7fd02893ef70, 0xc420391470, 0x4d72e0, 0xc4200e6e18, 0xc420470000, 0x8000, 0x8000, 0x0, 0x0, 0x0)
/home/marvin/go/src/io/io.go:441 +0x123
io.Copy(0x7fd02893ef70, 0xc420391470, 0x4d72e0, 0xc4200e6e18, 0x0, 0x0, 0x0)
/home/marvin/go/src/io/io.go:411 +0x5a
os/exec.(*Cmd).writerDescriptor.func1(0x0, 0x0)
/home/marvin/go/src/os/exec/exec.go:264 +0x44
os/exec.(*Cmd).Start.func1(0xc420466000, 0xc420346fc0)
/home/marvin/go/src/os/exec/exec.go:380 +0x27
created by os/exec.(*Cmd).Start
/home/marvin/go/src/os/exec/exec.go:379 +0x5d6
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x41b4af]

runtime stack:
runtime.throw(0x4caa9f, 0x2a)
/home/marvin/go/src/runtime/panic.go:616 +0x81
runtime.sigpanic()
/home/marvin/go/src/runtime/signal_unix.go:360 +0x279
runtime.scanblock(0x540ce0, 0x1c808, 0x0, 0xc420029860)
/home/marvin/go/src/runtime/mgcmark.go:1071 +0x5f
runtime.markrootBlock(0x540ce0, 0x1c808, 0x0, 0xc420029860, 0x0)
/home/marvin/go/src/runtime/mgcmark.go:294 +0x7c
runtime.markroot(0xc420029860, 0x3)
/home/marvin/go/src/runtime/mgcmark.go:200 +0x1a1
runtime.gcDrain(0xc420029860, 0x5)
/home/marvin/go/src/runtime/mgcmark.go:912 +0xd4
runtime.gcBgMarkWorker.func2()
/home/marvin/go/src/runtime/mgc.go:1782 +0x80
runtime.systemstack(0x0)
/home/marvin/go/src/runtime/asm_amd64.s:421 +0x79
runtime.mstart()
/home/marvin/go/src/runtime/proc.go:1152
exit status 2

Does this issue reproduce with the latest release (go1.9.1)?

No

System details

go version devel +a9afa4e Wed Oct 18 03:07:46 2017 +0000 linux/amd64
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/marvin/GOPATH"
GORACE=""
GOROOT="/home/marvin/go"
GOTOOLDIR="/home/marvin/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build175459851=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOROOT/bin/go version: go version devel +a9afa4e Wed Oct 18 03:07:46 2017 +0000 linux/amd64
GOROOT/bin/go tool compile -V: compile version devel +a9afa4e Wed Oct 18 03:07:46 2017 +0000
uname -sr: Linux 4.4.0-96-generic
LSB Version:	core-9.20160110ubuntu0.2-amd64:core-9.20160110ubuntu0.2-noarch:printing-9.20160110ubuntu0.2-amd64:printing-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch
Distributor ID:	LinuxMint
Description:	Linux Mint 18 Sarah
Release:	18
Codename:	sarah
/lib/x86_64-linux-gnu/libc.so.6: GNU C Library (Ubuntu GLIBC 2.23-0ubuntu9) stable release version 2.23, by Roland McGrath et al.
lldb --version: lldb version 4.0.0 (git@github.com:apple/swift-lldb.git revision 70491313e5e2769ac79262a42062c85c05948905)
  Swift-4.0 (revision 3416108abd0df3997a533a14c5ad06de20ba8a60)
  clang revision b9d76a314c1e4c79217df9cd9d168d007e90a51c
  llvm revision 2dedb62a0bcb69354e15a54be89fb5dfa63275d2
gdb --version: GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
@ALTree
Copy link
Member

ALTree commented Oct 18, 2017

Usual questions

  • does the program use cgo?
  • does the program trigger the race detector?
  • how easily can you trigger the crash?
  • can you provide some kind of reproducer?

@ALTree ALTree changed the title runtime failure runtime: SIGSEGV crash Oct 18, 2017
@ALTree ALTree added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Oct 18, 2017
@stemar94
Copy link
Author

does the program use cgo?

no

does the program trigger the race detector?

no

how easily can you trigger the crash?

happens almost every time

can you provide some kind of reproducer?

https://play.golang.org/p/eB0DSNQe7h

@ianlancetaylor
Copy link
Contributor

Thanks for the test case. Unfortunately, I can not recreate the problem. Your test case always completes for me without error.

close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr

What does that mean?

@stemar94
Copy link
Author

stemar94 commented Oct 18, 2017

What does that mean?

I think this is from the broken pipe I write in with an interpreted python script.

@stemar94
Copy link
Author

I updated the stack traces for the reproducer.

@ianlancetaylor
Copy link
Contributor

@stemar94 Are you able to reproduce this on a different system? Are you sure you are running an unmodified Go install?

@stemar94
Copy link
Author

stemar94 commented Oct 18, 2017

Ran make.bash again. Now I also can no longer reproduce it. Really strange.

@golang golang locked and limited conversation to collaborators Oct 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants