runtime: fix deadlock when gctrace
Calling ReadMemStats which does stoptheworld on m0 holding locks
was not a good idea.
Stoptheworld holding locks is a recipe for deadlocks (added check for this).
Stoptheworld on g0 may or may not work (added check for this as well).
As far as I understand scavenger will print incorrect numbers now,
as stack usage is not subtracted from heap. But it's better than deadlocking.
Hello golang-codereviews@googlegroups.com (cc: khr@golang.org, rlh@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, 6 months ago
(2014-08-20 11:22:33 UTC)
#1
I will appreciate review of this one. This currently causes hangs on perf builders. And ...
10 years, 6 months ago
(2014-08-20 18:28:56 UTC)
#2
I will appreciate review of this one.
This currently causes hangs on perf builders. And we've scheduled perf dashboard
deployment with Andrew... it must be around midnight pacific time. If builders
will hang, it will hinder deployment.
LGTM. https://codereview.appspot.com/124670043/diff/50005/src/pkg/runtime/proc.c File src/pkg/runtime/proc.c (right): https://codereview.appspot.com/124670043/diff/50005/src/pkg/runtime/proc.c#newcode506 src/pkg/runtime/proc.c:506: // we just don't do it today. I ...
10 years, 6 months ago
(2014-08-20 22:02:38 UTC)
#4
*** Submitted as https://code.google.com/p/go/source/detail?r=b839c52cb382 *** runtime: fix deadlock when gctrace Calling ReadMemStats which does stoptheworld ...
10 years, 6 months ago
(2014-08-21 07:46:59 UTC)
#6
*** Submitted as https://code.google.com/p/go/source/detail?r=b839c52cb382 ***
runtime: fix deadlock when gctrace
Calling ReadMemStats which does stoptheworld on m0 holding locks
was not a good idea.
Stoptheworld holding locks is a recipe for deadlocks (added check for this).
Stoptheworld on g0 may or may not work (added check for this as well).
As far as I understand scavenger will print incorrect numbers now,
as stack usage is not subtracted from heap. But it's better than deadlocking.
LGTM=khr
R=golang-codereviews, rsc, khr
CC=golang-codereviews, rlh
https://codereview.appspot.com/124670043
Issue 124670043: code review 124670043: runtime: fix deadlock when gctrace
(Closed)
Created 10 years, 6 months ago by dvyukov
Modified 10 years, 6 months ago
Reviewers:
Base URL:
Comments: 1