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

Issue 1275353005: VM thread shutdown. (Closed)

Created:
5 years, 4 months ago by zra
Modified:
4 years, 11 months ago
CC:
reviews_dartlang.org, turnidge, rmacnak, Cutch, vm-dev_dartlang.org, Ivan Posva, tonyg
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Patch Set 1 #

Patch Set 2 : Join thread pool threads #

Patch Set 3 : Join the thread interrupter thread on all platforms #

Patch Set 4 : Remove reaper thread. More joining for windows. #

Patch Set 5 : #

Total comments: 29

Patch Set 6 : ThreadJoinId #

Patch Set 7 : Address comments #

Total comments: 9

Patch Set 8 : Simplify thread pool locking #

Patch Set 9 : Take isolate list lock when killing service isolate #

Patch Set 10 : Shutdown thread interrupter right away #

Patch Set 11 : revert simplify thread pool locking #

Patch Set 12 : Windows fix, Fix message handle shutdown race. #

Patch Set 13 : Wait for isolates to shutdown before shutting down thread-pool #

Patch Set 14 : remove debug prints #

Patch Set 15 : Add shutdown flag #

Total comments: 22

Patch Set 16 : Address comments #

Total comments: 9

Patch Set 17 : Address comments #

Patch Set 18 : Merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1013 lines, -385 lines) Patch
M runtime/bin/builtin.h View 1 chunk +1 line, -1 line 0 comments Download
M runtime/bin/builtin_common.cc View 1 chunk +17 lines, -7 lines 0 comments Download
M runtime/bin/dartutils.h View 2 chunks +11 lines, -11 lines 0 comments Download
M runtime/bin/dartutils.cc View 1 2 3 4 5 6 7 10 chunks +70 lines, -58 lines 0 comments Download
M runtime/bin/dbg_message.cc View 2 chunks +8 lines, -3 lines 0 comments Download
M runtime/bin/gen_snapshot.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +10 lines, -9 lines 0 comments Download
M runtime/bin/main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 9 chunks +91 lines, -35 lines 0 comments Download
M runtime/bin/process.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 chunks +57 lines, -15 lines 0 comments Download
M runtime/bin/run_vm_tests.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +6 lines, -0 lines 0 comments Download
M runtime/bin/utils.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -1 line 0 comments Download
M runtime/bin/vmservice/vmservice_io.dart View 1 chunk +9 lines, -0 lines 0 comments Download
M runtime/bin/vmservice_impl.cc View 1 2 3 4 5 6 7 3 chunks +5 lines, -2 lines 0 comments Download
M runtime/include/dart_api.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +6 lines, -5 lines 0 comments Download
A runtime/tests/vm/dart/spawn_infinite_loop_test.dart View 1 chunk +18 lines, -0 lines 0 comments Download
A runtime/tests/vm/dart/spawn_shutdown_test.dart View 1 2 3 4 5 1 chunk +32 lines, -0 lines 0 comments Download
M runtime/tests/vm/vm.status View 1 2 3 4 5 7 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/cpuinfo_test.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M runtime/vm/custom_isolate_test.cc View 4 chunks +4 lines, -0 lines 0 comments Download
M runtime/vm/dart.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/dart.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +44 lines, -21 lines 0 comments Download
M runtime/vm/dart_api_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +10 lines, -8 lines 0 comments Download
M runtime/vm/debugger_api_impl_test.cc View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/isolate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +16 lines, -2 lines 0 comments Download
M runtime/vm/isolate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 13 chunks +194 lines, -67 lines 0 comments Download
M runtime/vm/message_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +10 lines, -4 lines 0 comments Download
M runtime/vm/os_thread.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +3 lines, -1 line 0 comments Download
M runtime/vm/os_thread_android.h View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/os_thread_android.cc View 1 2 3 4 5 3 chunks +8 lines, -5 lines 0 comments Download
M runtime/vm/os_thread_linux.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/os_thread_linux.cc View 1 2 3 4 5 3 chunks +8 lines, -5 lines 0 comments Download
M runtime/vm/os_thread_macos.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/os_thread_macos.cc View 1 2 3 4 5 3 chunks +9 lines, -5 lines 0 comments Download
M runtime/vm/os_thread_win.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/os_thread_win.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +20 lines, -4 lines 0 comments Download
M runtime/vm/service_isolate.h View 1 chunk +3 lines, -0 lines 0 comments Download
M runtime/vm/service_isolate.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +24 lines, -2 lines 0 comments Download
M runtime/vm/thread_interrupter.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/thread_interrupter.cc View 1 2 3 4 5 6 7 8 9 6 chunks +14 lines, -22 lines 0 comments Download
M runtime/vm/thread_pool.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 7 chunks +43 lines, -10 lines 0 comments Download
M runtime/vm/thread_pool.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 15 chunks +186 lines, -46 lines 0 comments Download
M runtime/vm/thread_pool_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +48 lines, -29 lines 0 comments Download
M runtime/vm/verified_memory_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +15 lines, -0 lines 0 comments Download
M tests/isolate/nested_spawn2_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/isolate/nested_spawn_test.dart View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 23 (3 generated)
zra
Turns out EventHandler::Stop was never called anywhere. John's theory that we might have been taking ...
5 years, 4 months ago (2015-08-11 22:34:47 UTC) #2
zra
The bots are a bit red at the moment, so this probably isn't a good ...
5 years, 4 months ago (2015-08-12 02:23:34 UTC) #3
zra
Ivan, the thread pool thread joining changes we discussed earlier today are now in this ...
5 years, 4 months ago (2015-08-13 21:45:15 UTC) #5
Ivan Posva
First round of comments. -Ivan https://codereview.chromium.org/1275353005/diff/80001/runtime/bin/gen_snapshot.cc File runtime/bin/gen_snapshot.cc (right): https://codereview.chromium.org/1275353005/diff/80001/runtime/bin/gen_snapshot.cc#newcode555 runtime/bin/gen_snapshot.cc:555: free(error); This can lead ...
5 years, 4 months ago (2015-08-17 13:35:52 UTC) #6
zra
https://codereview.chromium.org/1275353005/diff/80001/runtime/bin/gen_snapshot.cc File runtime/bin/gen_snapshot.cc (right): https://codereview.chromium.org/1275353005/diff/80001/runtime/bin/gen_snapshot.cc#newcode555 runtime/bin/gen_snapshot.cc:555: free(error); On 2015/08/17 13:35:51, Ivan Posva wrote: > This ...
5 years, 4 months ago (2015-08-18 06:23:14 UTC) #7
Ivan Posva
Comments from discussion today... -Ivan https://codereview.chromium.org/1275353005/diff/120001/runtime/vm/isolate.cc File runtime/vm/isolate.cc (right): https://codereview.chromium.org/1275353005/diff/120001/runtime/vm/isolate.cc#newcode1981 runtime/vm/isolate.cc:1981: MonitorLocker ml(isolates_list_monitor_); We should ...
5 years, 4 months ago (2015-08-19 08:31:07 UTC) #8
Florian Schneider
dbc: https://codereview.chromium.org/1275353005/diff/80001/runtime/bin/main.cc File runtime/bin/main.cc (right): https://codereview.chromium.org/1275353005/diff/80001/runtime/bin/main.cc#newcode1079 runtime/bin/main.cc:1079: error = Dart_Cleanup(); Same question as Ivan: Dart::Cleanup() ...
5 years, 4 months ago (2015-08-19 09:02:03 UTC) #10
Ivan Posva
https://codereview.chromium.org/1275353005/diff/120001/runtime/vm/dart_api_impl.cc File runtime/vm/dart_api_impl.cc (right): https://codereview.chromium.org/1275353005/diff/120001/runtime/vm/dart_api_impl.cc#newcode1367 runtime/vm/dart_api_impl.cc:1367: *error = strdup("Isolate creation failed"); On 2015/08/19 09:02:03, Florian ...
5 years, 4 months ago (2015-08-19 09:21:49 UTC) #11
Florian Schneider
On 2015/08/19 09:21:49, Ivan Posva wrote: > https://codereview.chromium.org/1275353005/diff/120001/runtime/vm/dart_api_impl.cc > File runtime/vm/dart_api_impl.cc (right): > > https://codereview.chromium.org/1275353005/diff/120001/runtime/vm/dart_api_impl.cc#newcode1367 ...
5 years, 4 months ago (2015-08-19 09:26:39 UTC) #12
zra
Simplified thread pool locking, and ensured a consistent lock order for sending the kill message. ...
5 years, 4 months ago (2015-08-25 18:19:30 UTC) #13
zra
This change is ready for review. Please take a fresh look.
5 years, 3 months ago (2015-09-08 16:22:19 UTC) #14
zra
On 2015/09/08 16:22:19, zra wrote: > This change is ready for review. Please take a ...
5 years, 3 months ago (2015-09-09 17:13:56 UTC) #15
zra
On 2015/09/09 17:13:56, zra wrote: > On 2015/09/08 16:22:19, zra wrote: > > This change ...
5 years, 3 months ago (2015-09-10 19:42:53 UTC) #16
Ivan Posva
-Ivan https://codereview.chromium.org/1275353005/diff/280001/runtime/bin/main.cc File runtime/bin/main.cc (right): https://codereview.chromium.org/1275353005/diff/280001/runtime/bin/main.cc#newcode1205 runtime/bin/main.cc:1205: Process::TerminateExitCodeHandler(); Why is this done unconditionally, while the ...
5 years, 3 months ago (2015-09-14 21:52:14 UTC) #17
zra
https://codereview.chromium.org/1275353005/diff/280001/runtime/bin/main.cc File runtime/bin/main.cc (right): https://codereview.chromium.org/1275353005/diff/280001/runtime/bin/main.cc#newcode1205 runtime/bin/main.cc:1205: Process::TerminateExitCodeHandler(); On 2015/09/14 21:52:13, Ivan Posva wrote: > Why ...
5 years, 3 months ago (2015-09-14 22:59:01 UTC) #18
Ivan Posva
LGTM with one last *Locked rename. Thanks, -Ivan https://codereview.chromium.org/1275353005/diff/300001/runtime/vm/isolate.h File runtime/vm/isolate.h (right): https://codereview.chromium.org/1275353005/diff/300001/runtime/vm/isolate.h#newcode779 runtime/vm/isolate.h:779: void ...
5 years, 3 months ago (2015-09-15 16:18:43 UTC) #19
turnidge
lgtm w/ 2 minor comments. Ok with me once other reviewers sign off. https://codereview.chromium.org/1275353005/diff/300001/runtime/vm/dart.cc File ...
5 years, 3 months ago (2015-09-15 16:48:22 UTC) #20
turnidge
Found some additional stuff while sitting with zra... https://codereview.chromium.org/1275353005/diff/300001/runtime/vm/thread_pool.cc File runtime/vm/thread_pool.cc (right): https://codereview.chromium.org/1275353005/diff/300001/runtime/vm/thread_pool.cc#newcode107 runtime/vm/thread_pool.cc:107: if ...
5 years, 3 months ago (2015-09-15 17:19:59 UTC) #21
turnidge
https://codereview.chromium.org/1275353005/diff/300001/runtime/vm/thread_pool.h File runtime/vm/thread_pool.h (right): https://codereview.chromium.org/1275353005/diff/300001/runtime/vm/thread_pool.h#newcode66 runtime/vm/thread_pool.h:66: ThreadId id() const { return id_; } From offline: ...
5 years, 3 months ago (2015-09-15 17:46:42 UTC) #22
zra
5 years, 3 months ago (2015-09-15 19:49:56 UTC) #23
Message was sent while issue was closed.
Committed patchset #18 (id:340001) manually as
7093f2996bf59d89eaf4ab4271b223961c4794f4 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698