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

Issue 112640043: code review 112640043: runtime: don't lock mheap on user goroutine (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 10 months ago by dvyukov
Modified:
10 years, 10 months ago
Reviewers:
gobot, minux, rsc, dave
CC:
golang-codereviews, rsc, khr
Visibility:
Public.

Description

runtime: don't lock mheap on user goroutine This is bad for 2 reasons: 1. if the code under lock ever grows stack, it will deadlock as stack growing acquires mheap lock. 2. It currently deadlocks with SetCPUProfileRate: scavenger locks mheap, receives prof signal and tries to lock prof lock; meanwhile SetCPUProfileRate locks prof lock and tries to grow stack (presumably in runtime.unlock->futexwakeup). Boom. Let's assume that it Fixes issue 8407.

Patch Set 1 #

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

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

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

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

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

Messages

Total messages: 8
dvyukov
Hello golang-codereviews@googlegroups.com (cc: khr@golang.org, rsc@golang.org), I'd like you to review this change to https://dvyukov%40google.com@code.google.com/p/go/
10 years, 10 months ago (2014-07-23 13:20:50 UTC) #1
rsc
LGTM Note that this introduces a race with the GC-forcing code. It might trigger an ...
10 years, 10 months ago (2014-07-23 13:39:09 UTC) #2
dvyukov
On Wed, Jul 23, 2014 at 5:39 PM, <rsc@golang.org> wrote: > LGTM > > Note ...
10 years, 10 months ago (2014-07-23 13:46:39 UTC) #3
dvyukov
*** Submitted as https://code.google.com/p/go/source/detail?r=2f29c7b582ef *** runtime: don't lock mheap on user goroutine This is bad ...
10 years, 10 months ago (2014-07-23 14:52:34 UTC) #4
gobot
This CL appears to have broken the linux-arm-cheney-panda builder. See http://build.golang.org/log/397b6a0bf90f2ba2158a77389dffab7a820e8dfd
10 years, 10 months ago (2014-07-23 16:03:19 UTC) #5
minux
+dfc. On Wed, Jul 23, 2014 at 12:03 PM, <gobot@golang.org> wrote: > This CL appears ...
10 years, 10 months ago (2014-07-23 20:30:11 UTC) #6
dave_cheney.net
On Thu, Jul 24, 2014 at 6:29 AM, minux <minux@golang.org> wrote: > +dfc. > > ...
10 years, 10 months ago (2014-07-23 22:52:32 UTC) #7
dvyukov
10 years, 10 months ago (2014-07-24 07:17:19 UTC) #8
This change is quite harmless in itself. But on darwin it exposed a
very strange scheduling behavior on runtime tests that was not
happening ever before:
https://code.google.com/p/go/source/detail?r=7c3b57e843c665b59ff58b604b21d632...
I would not be surprised if it exposes some other latent bug as well.





On Thu, Jul 24, 2014 at 2:52 AM, Dave Cheney <dave@cheney.net> wrote:
>
>
>
> On Thu, Jul 24, 2014 at 6:29 AM, minux <minux@golang.org> wrote:
>>
>> +dfc.
>>
>> On Wed, Jul 23, 2014 at 12:03 PM, <gobot@golang.org> wrote:
>>>
>>> This CL appears to have broken the linux-arm-cheney-panda builder.
>>> See http://build.golang.org/log/397b6a0bf90f2ba2158a77389dffab7a820e8dfd
>>
>> Seems real. This builder has been a little flaky recently. Could be a
>> memory corruption
>> that usually happens on pandaboards?
>
>
> Yes, this is true, this is a pandaboard. I'm not seeing similar failures on
> my other arm builder, the -imx6 one which runs linux/arm and nacl/arm.
>
> I've rebooted the pandaboard builder, maybe that will help.
Sign in to reply to this message.

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