Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(65)

Issue 7424054: code review 7424054: runtime: fix deadlock (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 7 months ago by dvyukov
Modified:
13 years, 7 months ago
Reviewers:
albert.strasheim
CC:
rsc, golang-dev
Visibility:
Public.

Description

runtime: fix deadlock The deadlock episodically occurs on misc/cgo/test/TestCthread. The problem is that starttheworld() leaves some P's with local work without M's. Then all active M's enter into syscalls, but reject to wake another M's due to the following check (both in entersyscallblock() and in retake()): if(p->runqhead == p->runqtail && runtime·atomicload(&runtime·sched.nmspinning) + runtime·atomicload(&runtime·sched.npidle) > 0) continue;

Patch Set 1 #

Patch Set 2 : diff -r 6883846dfe42 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 3 : diff -r b31de657acdb https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 4 : diff -r b31de657acdb https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 5 : diff -r fa13899da667 https://dvyukov%40google.com@code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -3 lines) Patch
M src/pkg/runtime/proc.c View 1 2 3 4 4 chunks +12 lines, -3 lines 0 comments Download

Messages

Total messages: 8
rsc
please hg mail if this is ready for review thanks.
13 years, 7 months ago (2013-03-04 20:04:02 UTC) #1
dvyukov
sigh! On Mon, Mar 4, 2013 at 10:04 PM, <rsc@golang.org> wrote: > please hg mail ...
13 years, 7 months ago (2013-03-04 21:10:39 UTC) #2
dvyukov
Yes, it is ready for review. I can't hg mail right now. On Monday, March ...
13 years, 7 months ago (2013-03-04 21:17:50 UTC) #3
dvyukov
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://dvyukov%40google.com@code.google.com/p/go/
13 years, 7 months ago (2013-03-04 21:18:12 UTC) #4
dvyukov
ping
13 years, 7 months ago (2013-03-07 10:24:41 UTC) #5
rsc
LGTM
13 years, 7 months ago (2013-03-07 13:48:41 UTC) #6
dvyukov
*** Submitted as https://code.google.com/p/go/source/detail?r=a346bcf77992 *** runtime: fix deadlock The deadlock episodically occurs on misc/cgo/test/TestCthread. The ...
13 years, 7 months ago (2013-03-07 17:40:10 UTC) #7
albert.strasheim
13 years, 7 months ago (2013-03-08 05:21:32 UTC) #8
Message was sent while issue was closed.
On 2013/03/07 17:40:10, dvyukov wrote:
> *** Submitted as https://code.google.com/p/go/source/detail?r=a346bcf77992 ***
> runtime: fix deadlock

testing seems to indicate: Fixes issue 4998.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b