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

Issue 1168933002: Fixes crashes in VM isolate shutdown. (Closed)

Created:
5 years, 6 months ago by zra
Modified:
5 years, 6 months ago
Reviewers:
Cutch, Ivan Posva
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

Fixes crashes in VM isolate shutdown. If null is not initialized before the VM Isolate's ObjectStore, the ObjectStore's fields are initialized to kHeapObjectTag, which causes a crash in VM Isolate shutdown. There is also a crash when the VM Isolate is signaled with the shutdown event, so this CL removes adding a Debugger to the VM Isolate, so that there is no need to shut it down, and send the signal. NB: This change does *not* actually enable shutdown. It just fixes crashes that would happen if it were enabled. BUG= R=iposva@google.com, johnmccutchan@google.com Committed: https://github.com/dart-lang/sdk/commit/fcd4c59430840348d08bd8ad21b46de21347dc2b

Patch Set 1 #

Total comments: 3

Patch Set 2 : Remove debugger from vm isolate #

Patch Set 3 : Add asserts #

Total comments: 3

Patch Set 4 : #

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -31 lines) Patch
M runtime/bin/dbg_message.cc View 1 2 3 1 chunk +9 lines, -8 lines 0 comments Download
M runtime/vm/code_generator.cc View 1 2 3 2 chunks +0 lines, -2 lines 0 comments Download
M runtime/vm/dart.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/debugger.cc View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M runtime/vm/debugger_api_impl.cc View 1 2 3 4 5 chunks +0 lines, -7 lines 0 comments Download
M runtime/vm/isolate.h View 1 2 3 4 1 chunk +4 lines, -1 line 0 comments Download
M runtime/vm/object.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 2 chunks +20 lines, -12 lines 0 comments Download

Messages

Total messages: 12 (1 generated)
zra
These crashes are triggered when VM Isolate shutdown is re-enabled in Dart::Cleanup() in runtime/vm/dart.cc.
5 years, 6 months ago (2015-06-09 14:52:16 UTC) #2
Cutch
https://codereview.chromium.org/1168933002/diff/1/runtime/vm/debugger.cc File runtime/vm/debugger.cc (right): https://codereview.chromium.org/1168933002/diff/1/runtime/vm/debugger.cc#newcode1219 runtime/vm/debugger.cc:1219: (isolate_ != Dart::vm_isolate())) { I think the real bug ...
5 years, 6 months ago (2015-06-09 14:57:33 UTC) #3
zra
https://codereview.chromium.org/1168933002/diff/1/runtime/vm/debugger.cc File runtime/vm/debugger.cc (right): https://codereview.chromium.org/1168933002/diff/1/runtime/vm/debugger.cc#newcode1219 runtime/vm/debugger.cc:1219: (isolate_ != Dart::vm_isolate())) { On 2015/06/09 14:57:33, Cutch wrote: ...
5 years, 6 months ago (2015-06-09 15:45:18 UTC) #4
zra
https://codereview.chromium.org/1168933002/diff/1/runtime/vm/debugger.cc File runtime/vm/debugger.cc (right): https://codereview.chromium.org/1168933002/diff/1/runtime/vm/debugger.cc#newcode1219 runtime/vm/debugger.cc:1219: (isolate_ != Dart::vm_isolate())) { On 2015/06/09 15:45:17, zra wrote: ...
5 years, 6 months ago (2015-06-09 17:29:02 UTC) #5
Cutch
lgtm
5 years, 6 months ago (2015-06-09 17:33:47 UTC) #6
zra
@iposva: ping
5 years, 6 months ago (2015-06-16 15:42:06 UTC) #7
Ivan Posva
Wondering where we are accessing the RAW_NULL. More comments below. -Ivan https://codereview.chromium.org/1168933002/diff/40001/runtime/vm/debugger_api_impl.cc File runtime/vm/debugger_api_impl.cc (right): ...
5 years, 6 months ago (2015-06-16 16:31:15 UTC) #8
zra
Updated as discussed. PTAL.
5 years, 6 months ago (2015-06-16 21:15:39 UTC) #9
Ivan Posva
LGTM You could remove all of the sprinkled ASSERT(isolate->debugger() != NULL) across the code. Not ...
5 years, 6 months ago (2015-06-16 23:55:52 UTC) #10
zra
On 2015/06/16 23:55:52, Ivan Posva wrote: > You could remove all of the sprinkled ASSERT(isolate->debugger() ...
5 years, 6 months ago (2015-06-17 17:07:33 UTC) #11
zra
5 years, 6 months ago (2015-06-17 17:14:23 UTC) #12
Message was sent while issue was closed.
Committed patchset #5 (id:80001) manually as
fcd4c59430840348d08bd8ad21b46de21347dc2b (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698