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

Issue 5919052: code review 5919052: runtime: work around false negative in deadlock detection (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 1 month ago by rsc
Modified:
13 years, 1 month ago
Reviewers:
mikio
CC:
iant, golang-dev
Visibility:
Public.

Description

runtime: work around false negative in deadlock detection Not a complete fix for issue 3342, but fixes the trivial case. There may still be a race in the instants before and after a scavenger-induced garbage collection. Intended to be "obviously safe": a call to runtime·gosched before main.main is no different than a call to runtime.Gosched at the beginning of main.main, and it is (or had better be) safe to call runtime.Gosched at any point during main. Update issue 3342.

Patch Set 1 #

Patch Set 2 : diff -r 9b086ea28e52 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 9b086ea28e52 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r 91c8264647f8 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -0 lines) Patch
M src/pkg/runtime/proc.c View 1 2 chunks +19 lines, -0 lines 0 comments Download
A test/fixedbugs/bug429.go View 1 1 chunk +13 lines, -0 lines 0 comments Download
M test/golden.out View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 5
rsc
Hello iant (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 1 month ago (2012-03-27 13:56:20 UTC) #1
iant
LGTM What about a test case for the problem with the earlier CL? We could ...
13 years, 1 month ago (2012-03-27 16:17:59 UTC) #2
rsc
On Tue, Mar 27, 2012 at 12:17, <iant@golang.org> wrote: > What about a test case ...
13 years, 1 month ago (2012-03-27 16:20:48 UTC) #3
rsc
*** Submitted as http://code.google.com/p/go/source/detail?r=01acf1dbe91f *** runtime: work around false negative in deadlock detection Not a ...
13 years, 1 month ago (2012-03-27 16:22:21 UTC) #4
mikio
13 years, 1 month ago (2012-03-27 16:33:25 UTC) #5
LGTM

On Wed, Mar 28, 2012 at 1:20 AM, Russ Cox <rsc@golang.org> wrote:

> I don't actually know what the problem with the earlier CL was,
> except that Mikio said it broke a test and I believed him.

Previous CL broke test/closure.go when you set GOMAXPROCS to gt 2.
Not sure the reason but test/closure.go failed w/ dying message "newfunc
allocated unexpectedly".

test/closure.go:
        runtime.ReadMemStats(memstats)
        if n0 != memstats.Mallocs {
                println("newfunc allocated unexpectedly")
                fail = true
        }
Sign in to reply to this message.

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