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

Issue 1688793002: Fix shutdown race when running Dart on the message loop (Closed)

Created:
4 years, 10 months ago by Cutch
Modified:
4 years, 10 months ago
Reviewers:
zra, jamesr
CC:
mojo-reviews_chromium.org, qsr+mojo_chromium.org
Base URL:
git@github.com:domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Fix shutdown race when running Dart on the message loop - Shutdown the DartController when the content handler exits not when the content handler's message loop hits an error (which occurs when the final application closes its shell handle.) Other fixes: - DartMessageHandler considers the isolate as exited if it hit an unhandled exception error. - DartMessageHandler can be configured to not quit the message loop when the isolate exits. R=zra@google.com Committed: https://chromium.googlesource.com/external/mojo/+/27d0e88f9491c00c039a930683685dbcd1e75122

Patch Set 1 #

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -13 lines) Patch
M services/dart/content_handler_main.cc View 2 chunks +5 lines, -8 lines 0 comments Download
M tonic/dart_message_handler.h View 1 2 chunks +24 lines, -0 lines 0 comments Download
M tonic/dart_message_handler.cc View 1 4 chunks +18 lines, -5 lines 0 comments Download

Messages

Total messages: 12 (6 generated)
Cutch
4 years, 10 months ago (2016-02-10 15:55:34 UTC) #5
zra
lgtm
4 years, 10 months ago (2016-02-10 16:02:51 UTC) #6
Cutch
Committed patchset #2 (id:20001) manually as 27d0e88f9491c00c039a930683685dbcd1e75122 (presubmit successful).
4 years, 10 months ago (2016-02-10 16:40:32 UTC) #8
tonyg
On 2016/02/10 16:40:32, Cutch wrote: > Committed patchset #2 (id:20001) manually as > 27d0e88f9491c00c039a930683685dbcd1e75122 (presubmit ...
4 years, 10 months ago (2016-02-10 17:27:36 UTC) #9
jamesr
On 2016/02/10 at 17:27:36, tonyg wrote: > On 2016/02/10 16:40:32, Cutch wrote: > > Committed ...
4 years, 10 months ago (2016-02-10 17:53:36 UTC) #10
jamesr
4 years, 10 months ago (2016-02-10 21:31:10 UTC) #12
Message was sent while issue was closed.
There are now some newer failures that do look related:

https://build.chromium.org/p/client.mojo/builders/Mojo%20Linux%20ASan/builds/...


Unhandled exception:
Dummy exception to set exit code.
#0      _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:895)
#1      _microtaskLoop (dart:async/schedule_microtask.dart:41)
#2      _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)
#3      _Timer._runTimers (dart:isolate-patch/timer_impl.dart:394)
#4      _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:414)
#5      _RawReceivePortImpl._handleMessage
(dart:isolate-patch/isolate_patch.dart:148)
Traceback (most recent call last):
  File "examples/dart/example_tests.py", line 59, in <module>
    sys.exit(main(args.build_dir, package_root))
  File "examples/dart/example_tests.py", line 46, in main
    RunTests(tests, build_dir, package_root)
  File "examples/dart/example_tests.py", line 41, in RunTests
    '--mojo-shell', os.path.join(build_dir, 'mojo_shell'),])
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command
'['/b/build/slave/mojo/build/src/third_party/dart-sdk/dart-sdk/bin/dart', '-p',
'/b/build/slave/mojo/build/src/out/Release_asan/gen/dart-pkg/packages',
'--checked',
'/b/build/slave/mojo/build/src/examples/dart/wget/test/wget_test.dart',
'--mojo-shell', 'out/Release_asan/mojo_shell']' returned non-zero exit status
255
00:00 +0: Hello, .mojo!
00:00 +1: Hello, .dart!
00:01 +2: All tests passed!
00:00 +0: Wget .mojo
00:30 +0 -1: Wget .mojo
  TimeoutException after 0:00:30.000000: Test timed out after 30 seconds.
  dart:isolate  _RawReceivePortImpl._handleMessage

00:30 +0 -1: Wget .dart
00:31 +1 -1: Some tests failed.

step returned non-zero exit code: 1
@@@STEP_FAILURE@@@

also looks flaky

Powered by Google App Engine
This is Rietveld 408576698