Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Issue 1233563004: Avoid race in isolate shutdown; add assertions, error messages (Closed)

Created:
5 years, 5 months ago by koda
Modified:
5 years, 5 months ago
Reviewers:
siva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

The sweeper must not be running during isolate shutdown. In release mode, there seems to be nothing to prevent this. In debug mode, the "Verify" call waits for the sweeper, but there is still a race between the task count update and the ExitIsolateAsHelper call, which could cause problems. Fix both of these, and add more assertions and verbose error messages. - make sweeper task cleanly exit isolate *before* notifying - wait for sweeper before shutting down isolate - verbose pthread failures BUG= R=asiva@google.com Committed: https://github.com/dart-lang/sdk/commit/868d2c6c3e949a03c395efc2c3bfbe0761a295dc

Patch Set 1 #

Patch Set 2 : Avoid shutdown race; remove detroyed_ flag. #

Total comments: 2

Patch Set 3 : Move wait per suggestion; port to all platforms. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -10 lines) Patch
M runtime/vm/gc_sweeper.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/isolate.cc View 1 2 2 chunks +11 lines, -0 lines 0 comments Download
M runtime/vm/os_thread_android.cc View 1 2 4 chunks +11 lines, -3 lines 0 comments Download
M runtime/vm/os_thread_linux.cc View 1 4 chunks +11 lines, -3 lines 0 comments Download
M runtime/vm/os_thread_macos.cc View 1 2 4 chunks +11 lines, -3 lines 0 comments Download
M runtime/vm/thread.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/thread.cc View 1 1 chunk +6 lines, -0 lines 0 comments Download
M runtime/vm/thread_registry.h View 1 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (1 generated)
koda
I'll make identical changes on mac/android if you think this looks good.
5 years, 5 months ago (2015-07-13 19:47:17 UTC) #2
koda
On 2015/07/13 19:47:17, koda wrote: > I'll make identical changes on mac/android if you think ...
5 years, 5 months ago (2015-07-13 22:35:07 UTC) #3
siva
lgtm https://codereview.chromium.org/1233563004/diff/20001/runtime/vm/isolate.cc File runtime/vm/isolate.cc (right): https://codereview.chromium.org/1233563004/diff/20001/runtime/vm/isolate.cc#newcode1442 runtime/vm/isolate.cc:1442: } I am wondering if we should do ...
5 years, 5 months ago (2015-07-13 23:37:00 UTC) #4
koda
https://codereview.chromium.org/1233563004/diff/20001/runtime/vm/isolate.cc File runtime/vm/isolate.cc (right): https://codereview.chromium.org/1233563004/diff/20001/runtime/vm/isolate.cc#newcode1442 runtime/vm/isolate.cc:1442: } On 2015/07/13 23:37:00, siva wrote: > I am ...
5 years, 5 months ago (2015-07-14 00:41:40 UTC) #5
koda
5 years, 5 months ago (2015-07-14 00:49:54 UTC) #6
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
868d2c6c3e949a03c395efc2c3bfbe0761a295dc (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698