mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: relax preemption assertion during stack split
The case can happen when starttheworld is calling acquirep to get things moving again and acquirep gets preempted. The stack trace is in golang.org/issue/6644. It is difficult to build a short test case for this, but the person who reported issue 6644 confirms that this solves the problem. Fixes #6644. R=golang-dev, r CC=golang-dev https://golang.org/cl/18740044
This commit is contained in:
parent
5644774ea5
commit
00a757fb74
1 changed files with 1 additions and 1 deletions
|
|
@ -255,7 +255,7 @@ runtime·newstack(void)
|
|||
if(gp->stackguard0 == (uintptr)StackPreempt) {
|
||||
if(gp == m->g0)
|
||||
runtime·throw("runtime: preempt g0");
|
||||
if(oldstatus == Grunning && m->p == nil)
|
||||
if(oldstatus == Grunning && m->p == nil && m->locks == 0)
|
||||
runtime·throw("runtime: g is running but p is not");
|
||||
if(oldstatus == Gsyscall && m->locks == 0)
|
||||
runtime·throw("runtime: stack split during syscall");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue