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

Issue 3006883002: Make service protocol respect isolate lifecycle (Closed)

Created:
3 years, 3 months ago by cbernaschina
Modified:
3 years, 3 months ago
Reviewers:
rmacnak, siva
CC:
reviews_dartlang.org, turnidge, rmacnak, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Make service protocol respect isolate lifecycle Status: - Currently the getIsolate API tries to guess the status of the isolate when it is in between the IsolateRunnable and PauseStart, by reporting it as already in the PauseStart status. This can potentially make flaky all the tests that uses PauseStart to synchronize with the actual status of the Isolate. - In the previous situation the timestamp of the event is guessed too, potentially reporting a wrong value. - Even with the previous fix the is still a race condition that can lead to a getIsolate responde with a PauseStart status to be sent before the actual PauseStart event. Changes: - Fallback to None pause event if the isolate is in between IsolateRunnable and PauseStart, avoiding double posting. - Send the PauseStart event before the actual status change, partially avoiding the race conditions. - Set the pause timestamp before the actual status change, fully avoiding the race condition. Closes https://github.com/dart-lang/sdk/issues/28624 R=asiva@google.com, rmacnak@google.com Committed: https://github.com/dart-lang/sdk/commit/5534568ff1f3d598b61c40f46a477e32a39bdea0

Patch Set 1 #

Total comments: 4

Patch Set 2 : Added documentation #

Total comments: 1

Patch Set 3 : Make test more understandable #

Patch Set 4 : Merged with upstream #

Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -44 lines) Patch
M runtime/observatory/tests/service/issue_30555_test.dart View 1 2 2 chunks +21 lines, -15 lines 0 comments Download
M runtime/observatory/tests/service/service.status View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M runtime/vm/isolate.cc View 1 1 chunk +16 lines, -5 lines 0 comments Download
M runtime/vm/message_handler.cc View 4 chunks +12 lines, -14 lines 0 comments Download
M runtime/vm/service_event.cc View 1 chunk +3 lines, -7 lines 0 comments Download

Messages

Total messages: 11 (4 generated)
cbernaschina
3 years, 3 months ago (2017-08-30 23:03:52 UTC) #3
rmacnak
lgtm https://codereview.chromium.org/3006883002/diff/1/runtime/vm/isolate.cc File runtime/vm/isolate.cc (right): https://codereview.chromium.org/3006883002/diff/1/runtime/vm/isolate.cc#newcode2004 runtime/vm/isolate.cc:2004: // Isolate is runnable but not paused on ...
3 years, 3 months ago (2017-08-30 23:31:52 UTC) #4
cbernaschina
https://codereview.chromium.org/3006883002/diff/1/runtime/vm/isolate.cc File runtime/vm/isolate.cc (right): https://codereview.chromium.org/3006883002/diff/1/runtime/vm/isolate.cc#newcode2004 runtime/vm/isolate.cc:2004: // Isolate is runnable but not paused on start. ...
3 years, 3 months ago (2017-08-30 23:53:57 UTC) #5
siva
lgtm https://codereview.chromium.org/3006883002/diff/1/runtime/observatory/tests/service/issue_30555_test.dart File runtime/observatory/tests/service/issue_30555_test.dart (right): https://codereview.chromium.org/3006883002/diff/1/runtime/observatory/tests/service/issue_30555_test.dart#newcode122 runtime/observatory/tests/service/issue_30555_test.dart:122: "to do it."); Maybe we should flip these ...
3 years, 3 months ago (2017-08-30 23:56:30 UTC) #6
cbernaschina
https://codereview.chromium.org/3006883002/diff/1/runtime/observatory/tests/service/issue_30555_test.dart File runtime/observatory/tests/service/issue_30555_test.dart (right): https://codereview.chromium.org/3006883002/diff/1/runtime/observatory/tests/service/issue_30555_test.dart#newcode122 runtime/observatory/tests/service/issue_30555_test.dart:122: "to do it."); On 2017/08/30 23:56:30, siva wrote: > ...
3 years, 3 months ago (2017-08-31 00:04:45 UTC) #7
cbernaschina
3 years, 3 months ago (2017-08-31 00:07:53 UTC) #9
cbernaschina
3 years, 3 months ago (2017-08-31 00:09:44 UTC) #11
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
5534568ff1f3d598b61c40f46a477e32a39bdea0 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698