Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui_benchmarks sometimes is crashing #160003

Open
gaaclarke opened this issue Dec 10, 2024 · 1 comment · May be fixed by flutter/engine#57081
Open

ui_benchmarks sometimes is crashing #160003

gaaclarke opened this issue Dec 10, 2024 · 1 comment · May be fixed by flutter/engine#57081
Labels
c: flake Tests that sometimes, but not always, incorrectly pass P1 High-priority issues at the top of the work list team-engine Owned by Engine team triaged-engine Triaged by Engine team

Comments

@gaaclarke
Copy link
Member

gaaclarke commented Dec 10, 2024

Description

@jason-simmons said he could reproduce this on his cloudtop but it happens like 10% of of the time.

examples

logs

Running command "/b/s/w/ir/cache/builder/src/out/ci/host_release/exe.unstripped/ui_benchmarks --icu-data-file-path=/b/s/w/ir/cache/builder/src/out/ci/host_release/icudtl.dat" in "/b/s/w/ir/cache/builder/src"
2024-12-09T08:59:56-08:00
Running /b/s/w/ir/cache/builder/src/out/ci/host_release/exe.unstripped/ui_benchmarks
Run on (32 X 2250 MHz CPU s)
CPU Caches:
  L1 Data 32 KiB (x16)
  L1 Instruction 32 KiB (x16)
  L2 Unified 512 KiB (x16)
  L3 Unified 16384 KiB (x4)
Load Average: 6.48, 6.26, 3.04
../../../flutter/third_party/dart/runtime/vm/dart_api_impl.cc: 1535: error: Isolate �7 is already scheduled on mutator thread 0x7f8390007280, failed to schedule from os thread 0x7f839ccc9700

@gaaclarke gaaclarke added c: flake Tests that sometimes, but not always, incorrectly pass team-engine Owned by Engine team labels Dec 10, 2024
jason-simmons added a commit to jason-simmons/flutter_engine that referenced this issue Dec 10, 2024
This fixes a race that can happen if Dart invokes an isolate's message handling callback during isolate shutdown.  The callback installed by Tonic will invoke a dispatcher set by the engine's DartIsolate::SetMessageHandlingTaskRunner, which will queue a message handling task to the designated task runner.

If the queued task runs after DartIsolate::Shutdown has been called, then Tonic's DartMessageHandler::OnHandleMessage will fail when it tries to enter the isolate.

DartIsolate will set a shutdown flag on the DartState when Dart invokes the isolate's shutdown callback.  Tonic can avoid this race by checking that flag before proceeding with message handling.

Fixes flutter/flutter#160003
@jonahwilliams jonahwilliams added dependency: dart Dart team may need to help us P1 High-priority issues at the top of the work list triaged-engine Triaged by Engine team labels Dec 16, 2024
@a-siva a-siva removed the dependency: dart Dart team may need to help us label Dec 18, 2024
@a-siva
Copy link
Contributor

a-siva commented Dec 18, 2024

Sounds like this is a Flutter engine issue (do not handle dart isolate messages if the isolate is being shutdown). Removing 'dependency:dart' label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: flake Tests that sometimes, but not always, incorrectly pass P1 High-priority issues at the top of the work list team-engine Owned by Engine team triaged-engine Triaged by Engine team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants