Hello golang-dev@googlegroups.com (cc: patrick.allen.higgins@gmail.com), I'd like you to review this change to https://dvyukov%40google.com@code.google.com/p/go/
13 years, 7 months ago
(2012-05-29 17:51:51 UTC)
#1
On Tue, May 29, 2012 at 9:58 PM, Russ Cox <rsc@golang.org> wrote: > I don't ...
13 years, 7 months ago
(2012-05-29 18:02:11 UTC)
#5
On Tue, May 29, 2012 at 9:58 PM, Russ Cox <rsc@golang.org> wrote:
> I don't understand why the test is so complex. It looks like
>
> func TestSleepZero(t *testing.t) {
> time.Sleep(0) // used to hang
> }
>
> would suffice.
>
If GC is not pending, and this goroutine will block on a chan or something
like that, then status/waitreason will be overwritten and then restored
back to Grunnable (by whoever sends to the chan). So the problem arises iff
the goroutine calls into sched due to pending GC.
On Tue, May 29, 2012 at 10:02 PM, Dmitry Vyukov <dvyukov@google.com> wrote: > On Tue, ...
13 years, 7 months ago
(2012-05-29 18:03:33 UTC)
#6
On Tue, May 29, 2012 at 10:02 PM, Dmitry Vyukov <dvyukov@google.com> wrote:
> On Tue, May 29, 2012 at 9:58 PM, Russ Cox <rsc@golang.org> wrote:
>
>> I don't understand why the test is so complex. It looks like
>>
>> func TestSleepZero(t *testing.t) {
>> time.Sleep(0) // used to hang
>> }
>>
>> would suffice.
>>
>
> If GC is not pending, and this goroutine will block on a chan or something
> like that, then status/waitreason will be overwritten and then restored
> back to Grunnable (by whoever sends to the chan). So the problem arises iff
> the goroutine calls into sched due to pending GC...
>
>
... while it has incorrect status=Gwaiting (if it blocks on chan/mutex,
then status=Gwaiting is *correct*).
*** Submitted as http://code.google.com/p/go/source/detail?r=085b20e6e0aa *** time: fix deadlock in Sleep(0) See time/sleep_test.go for repro. R=golang-dev, ...
13 years, 7 months ago
(2012-05-29 18:31:11 UTC)
#10
Issue 6250072: code review 6250072: time: fix deadlock in Sleep(0)
(Closed)
Created 13 years, 7 months ago by dvyukov
Modified 13 years, 7 months ago
Reviewers:
Base URL:
Comments: 3