aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/stack.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2013-10-28 19:40:40 -0400
committerRuss Cox <rsc@golang.org>2013-10-28 19:40:40 -0400
commit00a757fb74c211513771338fe84ef195d3aa9d55 (patch)
treed2690d5186c419316463751ce8fbee3fadeb3761 /src/pkg/runtime/stack.c
parent5644774ea5c954a08c1e068be9771429a232ca7c (diff)
downloadgo-00a757fb74c211513771338fe84ef195d3aa9d55.tar.xz
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
Diffstat (limited to 'src/pkg/runtime/stack.c')
-rw-r--r--src/pkg/runtime/stack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/runtime/stack.c b/src/pkg/runtime/stack.c
index 011c616bac..634706051c 100644
--- a/src/pkg/runtime/stack.c
+++ b/src/pkg/runtime/stack.c
@@ -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");