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: crash in runSafepointFn apparently because sched.safePointFn is nil #21276

Closed
ianlancetaylor opened this issue Aug 2, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@ianlancetaylor
Copy link
Contributor

commented Aug 2, 2017

Saw an odd trybot failure on freebsd-amd64. It's a nil dereference in runSafepointFn when calling sched.safePointFn.

https://storage.googleapis.com/go-build-log/1452ef69/freebsd-amd64-110_7d396356.log

--- FAIL: TestAddr2Line (0.14s)
	addr2line_test.go:103: go test -c -o /tmp/TestAddr2Line894644399/testaddr2line_test.exe cmd/addr2line: exit status 2
		fatal error: unexpected signal during runtime execution
		[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x42fbda]
		
		runtime stack:
		runtime.throw(0x8a8f1b, 0x2a)
			/tmp/workdir/go/src/runtime/panic.go:605 +0x95
		runtime.sigpanic()
			/tmp/workdir/go/src/runtime/signal_unix.go:351 +0x2b8
		runtime.runSafePointFn()
			/tmp/workdir/go/src/runtime/proc.go:1298 +0x5a
		runtime.schedule()
			/tmp/workdir/go/src/runtime/proc.go:2213 +0x2b1
		runtime.park_m(0xc42043c900)
			/tmp/workdir/go/src/runtime/proc.go:2308 +0xb6
		runtime.mcall(0x801283cc0)
			/tmp/workdir/go/src/runtime/asm_amd64.s:286 +0x5b
		
		goroutine 1 [semacquire]:
		sync.runtime_Semacquire(0xc4203438ec)
			/tmp/workdir/go/src/runtime/sema.go:56 +0x39
		sync.(*WaitGroup).Wait(0xc4203438e0)
			/tmp/workdir/go/src/sync/waitgroup.go:131 +0x72
		cmd/go/internal/work.(*Builder).Do(0xc4201acd90, 0xc4204048f0)
			/tmp/workdir/go/src/cmd/go/internal/work/build.go:1214 +0x566
		cmd/go/internal/test.runTest(0xad9040, 0xc4200100e0, 0x4, 0x4)
			/tmp/workdir/go/src/cmd/go/internal/test/test.go:674 +0x13f1
		main.main()
			/tmp/workdir/go/src/cmd/go/main.go:133 +0x802
		
		goroutine 5 [syscall]:
		os/signal.signal_recv(0x0)
			/tmp/workdir/go/src/runtime/sigqueue.go:131 +0xa6
		os/signal.loop()
			/tmp/workdir/go/src/os/signal/signal_unix.go:22 +0x22
		created by os/signal.init.0
			/tmp/workdir/go/src/os/signal/signal_unix.go:28 +0x41
		
		goroutine 34 [select]:
		cmd/go/internal/work.(*Builder).Do.func2(0xc4203438e0, 0xc4201acd90, 0xc420262280)
			/tmp/workdir/go/src/cmd/go/internal/work/build.go:1195 +0x16b
		created by cmd/go/internal/work.(*Builder).Do
			/tmp/workdir/go/src/cmd/go/internal/work/build.go:1192 +0x542
		
		goroutine 35 [select]:
		cmd/go/internal/work.(*Builder).Do.func2(0xc4203438e0, 0xc4201acd90, 0xc420262280)
			/tmp/workdir/go/src/cmd/go/internal/work/build.go:1195 +0x16b
		created by cmd/go/internal/work.(*Builder).Do
			/tmp/workdir/go/src/cmd/go/internal/work/build.go:1192 +0x542
		
		goroutine 36 [select]:
		cmd/go/internal/work.(*Builder).Do.func2(0xc4203438e0, 0xc4201acd90, 0xc420262280)
			/tmp/workdir/go/src/cmd/go/internal/work/build.go:1195 +0x16b
		created by cmd/go/internal/work.(*Builder).Do
			/tmp/workdir/go/src/cmd/go/internal/work/build.go:1192 +0x542
		
		goroutine 37 [runnable]:
		syscall.Syscall(0x6, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0)
			/tmp/workdir/go/src/syscall/asm_unix_amd64.s:19 +0x5
		syscall.Close(0x6, 0xc4204d8d78, 0x8)
			/tmp/workdir/go/src/syscall/zsyscall_freebsd_amd64.go:387 +0x4a
		syscall.forkExec(0xc42049eff0, 0x2e, 0xc4200a8000, 0x13, 0x14, 0xc4204d8f00, 0x20, 0x41287d, 0xc42021f180)
			/tmp/workdir/go/src/syscall/exec_unix.go:204 +0x459
		syscall.StartProcess(0xc42049eff0, 0x2e, 0xc4200a8000, 0x13, 0x14, 0xc4204d8f00, 0x2, 0x4, 0xc420329ca8, 0x0)
			/tmp/workdir/go/src/syscall/exec_unix.go:241 +0x64
		os.startProcess(0xc42049eff0, 0x2e, 0xc4200a8000, 0x13, 0x14, 0xc4204d90c0, 0xc420483200, 0x18, 0x18)
			/tmp/workdir/go/src/os/exec_posix.go:45 +0x1f2
		os.StartProcess(0xc42049eff0, 0x2e, 0xc4200a8000, 0x13, 0x14, 0xc4204d90c0, 0x0, 0x0, 0xc420482c00)
			/tmp/workdir/go/src/os/exec.go:94 +0x64
		os/exec.(*Cmd).Start(0xc42034b760, 0xc42049f080, 0xc420483080)
			/tmp/workdir/go/src/os/exec/exec.go:363 +0x53e
		os/exec.(*Cmd).Run(0xc42034b760, 0xc420483080, 0x0)
			/tmp/workdir/go/src/os/exec/exec.go:286 +0x2b
		cmd/go/internal/work.(*Builder).runOut(0xc4201acd90, 0xc4201901b0, 0x21, 0x7fffffffece5, 0xd, 0x0, 0x0, 0x0, 0xc42034b600, 0xf, ...)
			/tmp/workdir/go/src/cmd/go/internal/work/build.go:1983 +0x43f
		cmd/go/internal/work.gcToolchain.gc(0xc4201acd90, 0xc420218d80, 0xc42039b100, 0x3a, 0xc4202dad40, 0x35, 0xc420262300, 0xc420262300, 0x2, 0x2, ...)
			/tmp/workdir/go/src/cmd/go/internal/work/build.go:2272 +0x100f
		cmd/go/internal/work.(*gcToolchain).gc(0xb00328, 0xc4201acd90, 0xc420218d80, 0xc42039b100, 0x3a, 0xc4202dad40, 0x35, 0x0, 0xc420262300, 0x2, ...)
			<autogenerated>:1 +0xf9
		cmd/go/internal/work.(*Builder).build(0xc4201acd90, 0xc420080ea0, 0x0, 0x0)
			/tmp/workdir/go/src/cmd/go/internal/work/build.go:1393 +0x1750
		cmd/go/internal/work.(*Builder).Do.func1(0xc420080ea0)
			/tmp/workdir/go/src/cmd/go/internal/work/build.go:1148 +0x72
		cmd/go/internal/work.(*Builder).Do.func2(0xc4203438e0, 0xc4201acd90, 0xc420262280)
			/tmp/workdir/go/src/cmd/go/internal/work/build.go:1205 +0xbb
		created by cmd/go/internal/work.(*Builder).Do
			/tmp/workdir/go/src/cmd/go/internal/work/build.go:1192 +0x542
@aclements

This comment has been minimized.

Copy link
Member

commented Aug 2, 2017

Dup of #19061, which itself we closed as a dup of the FreeBSD fork corruption bug #15658.

(Also, this hasn't appeared on the dashboard since the two instance in #19061, so there aren't any additional data points at the moment.)

@aclements aclements closed this Aug 2, 2017

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor Author

commented Aug 2, 2017

Thanks, sorry for the dup. I even filed the earlier one, although I don't remember it.

@golang golang locked and limited conversation to collaborators Aug 2, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.