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

Issue 2720723005: VM: Fix an app-jit related shutdown race. (Closed)

Created:
3 years, 9 months ago by Vyacheslav Egorov (Google)
Modified:
3 years, 9 months ago
Reviewers:
rmacnak
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

VM: Fix an app-jit related shutdown race. IsolateData contains AppSnapshot which might own some HeapPage-s, so we can't destroy IsolateData in the Dart_IsolateShutdownCallback, because some thread running in the isolate (e.g. background compiler) might still touch thoses pages or objects they host. We need to delay destruction of AppSnapshot until after the isolate shutdown. Current API does not allow that, so we introduce a new isolate lifecycle callback - Dart_IsolateCleanupCallback, which is invoked at the end of the isolote lifecycle when things like background compiler have been stopped and no Dart code is supposed to run. BUG= R=rmacnak@google.com Committed: https://github.com/dart-lang/sdk/commit/a5e1f89583d5986e32b4a60181f04e534179d7d1

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -9 lines) Patch
M runtime/bin/isolate_data.h View 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/bin/isolate_data.cc View 2 chunks +8 lines, -3 lines 0 comments Download
M runtime/bin/main.cc View 2 chunks +10 lines, -2 lines 0 comments Download
M runtime/bin/run_vm_tests.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/include/dart_api.h View 3 chunks +19 lines, -0 lines 0 comments Download
M runtime/vm/dart.h View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/dart.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M runtime/vm/dart_api_impl.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M runtime/vm/isolate.h View 2 chunks +9 lines, -0 lines 0 comments Download
M runtime/vm/isolate.cc View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (2 generated)
Vyacheslav Egorov (Google)
Hi Ryan! Please take a look. With this CL and the one related to snapshot ...
3 years, 9 months ago (2017-02-28 15:35:09 UTC) #2
rmacnak
lgtm This affects app-aot as well, since it potentially touches the released pages during shutdown. ...
3 years, 9 months ago (2017-02-28 17:46:16 UTC) #3
Vyacheslav Egorov (Google)
3 years, 9 months ago (2017-02-28 20:10:09 UTC) #5
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
a5e1f89583d5986e32b4a60181f04e534179d7d1 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698