aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/panic.c
diff options
context:
space:
mode:
authorDmitriy Vyukov <dvyukov@google.com>2013-06-12 18:46:35 +0400
committerDmitriy Vyukov <dvyukov@google.com>2013-06-12 18:46:35 +0400
commitdbcfed93e75b91819bd01eb228996073b18c8196 (patch)
tree250e6bad4ce3e1991a78f02aee6e623f58ad958b /src/pkg/runtime/panic.c
parente5cbebc1ad3f1a6372bd1a0ac6032c6236f38f6b (diff)
downloadgo-dbcfed93e75b91819bd01eb228996073b18c8196.tar.xz
runtime: fix scheduler race condition
In starttheworld() we assume that P's with local work are situated in the beginning of idle P list. However, once we start the first M, it can execute all local G's and steal G's from other P's. That breaks the assumption above. Thus starttheworld() will fail to start some P's with local work. It seems that it can not lead to very bad things, but still it's wrong and breaks other assumtions (e.g. we can have a spinning M with local work). The fix is to collect all P's with local work first, and only then start them. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/10051045
Diffstat (limited to 'src/pkg/runtime/panic.c')
0 files changed, 0 insertions, 0 deletions