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: unexpected SIGSEGV in goSchedImpl during build on freebsd-amd64-race #38334

Closed
bcmills opened this issue Apr 9, 2020 · 8 comments
Closed
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Apr 9, 2020

2020-04-09T01:17:53-0a18cbc/freebsd-amd64-race

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

runtime stack:
runtime.throw(0xa4d8e9, 0x2a)
	/tmp/workdir/go/src/runtime/panic.go:1116 +0x72
runtime.sigpanic()
	/tmp/workdir/go/src/runtime/signal_unix.go:703 +0x45a
runtime.schedule()
	/tmp/workdir/go/src/runtime/proc.go:2647 +0x1a1
runtime.goschedImpl(0xc000983b00)
	/tmp/workdir/go/src/runtime/proc.go:2798 +0xda
runtime.gopreempt_m(0xc000983b00)
	/tmp/workdir/go/src/runtime/proc.go:2826 +0x34
runtime.newstack()
	/tmp/workdir/go/src/runtime/stack.go:1030 +0x1ae
runtime.morestack()
	/tmp/workdir/go/src/runtime/asm_amd64.s:449 +0x8f

CC @aclements @mknyszek @randall77

@bcmills bcmills added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker labels Apr 9, 2020
@bcmills bcmills added this to the Go1.15 milestone Apr 9, 2020
@randall77
Copy link
Contributor

Looks like a nil goroutine pointer. Crashes here:

	if gp.lockedm != 0 {

It should never be nil, given this code, previous to the above:

	if gp == nil {
		gp, inheritTime = findrunnable() // blocks until work is available
	}

Possibly findrunnable is returning nil when it shouldn't.
It finds work from a bunch of places. Most have obvious if gp != nil { return gp } guards, or would have crashed with a nil gp, but the one that returns the result of globrunqget doesn't. And it looks like it can return nil, if there's no global work.

I have a possible fix.

@randall77
Copy link
Contributor

Nope, nevermind, that path doesn't actually return the nil gp...

@randall77
Copy link
Contributor

Maybe somehow sched.runq and sched.runqsize are getting out of sync? Or there is a nil entryin sched.runq?

@erifan
Copy link

erifan commented Apr 10, 2020

I'm not sure if this is the same issue as #37257, but I feel they are related.

@dmitshur dmitshur added the okay-after-beta1 Used by release team to mark a release-blocker issue as okay to resolve either before or after beta1 label May 14, 2020
@toothrot toothrot removed the okay-after-beta1 Used by release team to mark a release-blocker issue as okay to resolve either before or after beta1 label Jun 10, 2020
@toothrot toothrot assigned toothrot and aclements and unassigned toothrot Jun 11, 2020
@toothrot
Copy link
Contributor

@bcmills @randall77 Friendly ping for an update on this, as it's a release blocking issue for Go 1.15.

@ianlancetaylor
Copy link
Contributor

Possibly related:

2020-05-28T21:13:51-5a00adf/linux-mips64le-mengzhuo
2020-05-07T04:45:51-9e81578/linux-mips64le-mengzhuo

I don't see any other occurrences in the build logs.

@cherrymui
Copy link
Member

2020-05-28T21:13:51-5a00adf/linux-mips64le-mengzhuo

runtime.throw(0x12066fa9e, 0x2a)
/tmp/workdir-host-linux-mipsle-mengzhuo/go/src/runtime/panic.go:1116 +0x6c
runtime.sigpanic()
/tmp/workdir-host-linux-mipsle-mengzhuo/go/src/runtime/signal_unix.go:704 +0x5f0
runtime.osyield(0x1e, 0x0, 0x0, 0x1, 0x4, 0x0, 0x3, 0x12004bff8, 0x120a01718, 0x100000002, ...)
/tmp/workdir-host-linux-mipsle-mengzhuo/go/src/runtime/sys_linux_mips64x.s:495 +0x8

The faulting line is a RET instruction. The only possibility is the link register gets corrupted. I don't see how that could be possible...

@aclements
Copy link
Member

Given that this only happened once and various people have determined that it appears impossible, this is almost certainly a flake. If it's not a flake, that's unfortunate, but there also doesn't appear to be anywhere near enough information to make further progress.

@golang golang locked and limited conversation to collaborators Jun 25, 2021
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. release-blocker
Projects
None yet
Development

No branches or pull requests

9 participants