Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Flake in DartIsolateTest.ValidLoadingUnitSucceeds #72312

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

Closed
gw280 opened this issue Dec 14, 2020 · 18 comments · Fixed by flutter/engine#32970
Closed

Flake in DartIsolateTest.ValidLoadingUnitSucceeds #72312

gw280 opened this issue Dec 14, 2020 · 18 comments · Fixed by flutter/engine#32970
Assignees
Labels
c: disabled test Tracks the restoration of a disabled test c: flake Tests that sometimes, but not always, incorrectly pass engine flutter/engine repository. See also e: labels. P2 Important issues not at the top of the work list

Comments

@gw280
Copy link
Contributor

gw280 commented Dec 14, 2020

Seeing this flake:

flutter: In function canCallDeferredLibrary
[ERROR:flutter/runtime/dart_isolate.cc(1051)] Platform Configuration was null. Deferred library load requestfor loading unit id 2 was not sent.
[ERROR:flutter/runtime/dart_isolate_unittests.cc(495)] Hello from Dart!
../../third_party/dart/runtime/vm/dart_api_impl.cc: 1542: error: Isolate canCallDeferredLibrary is already scheduled on mutator thread 0x7f96d4018e00, failed to schedule from os thread 0x10fab5dc0

version=2.12.0-150.0.dev (dev) (Mon Dec 14 12:05:40 2020 -0800) on "macos_x64"
pid=24557, thread=775, isolate_group=(nil)(0x0), isolate=(nil)(0x0)
isolate_instructions=0, vm_instructions=10be02000
  pc 0x0000000108943c15 fp 0x00007ffee757a0f0 dart::Profiler::DumpStackTrace(void*)+0x85
  pc 0x0000000108865612 fp 0x00007ffee757a1d0 dart::Assert::Fail(char const*, ...)+0x82
  pc 0x0000000108e71330 fp 0x00007ffee757a210 Dart_ThreadDisableProfiling+0x0
  pc 0x00000001086d4edf fp 0x00007ffee757a230 tonic::DartState::Scope::Scope(tonic::DartState*)+0x1f
  pc 0x00000001086a5a9a fp 0x00007ffee757a2f0 flutter::DartIsolate::LoadLoadingUnit(long, std::__1::unique_ptr<fml::Mapping const, std::__1::default_delete<fml::Mapping const> >, std::__1::unique_ptr<fml::Mapping const, std::__1::default_delete<fml::Mapping const> >)+0x3a
  pc 0x000000010868f067 fp 0x00007ffee757b0a0 flutter::testing::DartIsolateTest_ValidLoadingUnitSucceeds_Test::TestBody()+0x9b7
  pc 0x0000000108ecb560 fp 0x00007ffee757b0e0 testing::Test::Run()+0xe0
  pc 0x0000000108ecc2b0 fp 0x00007ffee757b140 testing::TestInfo::Run()+0x110
  pc 0x0000000108eccd07 fp 0x00007ffee757b190 testing::TestSuite::Run()+0x127
  pc 0x0000000108eda177 fp 0x00007ffee757b250 testing::internal::UnitTestImpl::RunAllTests()+0x3b7
  pc 0x0000000108ed9d0f fp 0x00007ffee757b2a0 testing::UnitTest::Run()+0x7f
  pc 0x00000001086c99ff fp 0x00007ffee757b400 main+0x12f
  pc 0x00007fff73ad2cc9 fp 0x00007ffee757b418 start+0x1
-- End of DumpStackTrace
Traceback (most recent call last):
  File "/opt/s/w/ir/cache/builder/src/flutter/testing/run_tests.py", line 506, in <module>
    sys.exit(main())
  File "/opt/s/w/ir/cache/builder/src/flutter/testing/run_tests.py", line 476, in main
    RunCCTests(build_dir, engine_filter)
  File "/opt/s/w/ir/cache/builder/src/flutter/testing/run_tests.py", line 136, in RunCCTests
    RunEngineExecutable(build_dir, 'runtime_unittests', filter, shuffle_flags)
  File "/opt/s/w/ir/cache/builder/src/flutter/testing/run_tests.py", line 94, in RunEngineExecutable
    RunCmd(test_command, cwd=cwd)
  File "/opt/s/w/ir/cache/builder/src/flutter/testing/run_tests.py", line 47, in RunCmd
    raise Exception('Command "%s" exited with code %d' % (command_string, process.returncode))
Exception: Command "/opt/s/w/ir/cache/builder/src/out/host_profile/runtime_unittests --gtest_shuffle --gtest_repeat=2" exited with code -6```

Not sure what PR has caused it, but I noticed it on a Dart SDK roll - https://dart.googlesource.com/sdk.git/+log/68d1c7504f7d..f166571c7bc4
@zanderso
Copy link
Member

This test looks very suspicious. It looks like there are potentially two Signal()s but only one Wait() for starters.

@zanderso zanderso added engine flutter/engine repository. See also e: labels. team: flakes labels Dec 14, 2020
@GaryQian
Copy link
Contributor

GaryQian commented Dec 14, 2020

This is my test, I'll take a look.

@GaryQian
Copy link
Contributor

Is this blocking anything? If it is, I can temporarily disable it, since I traced the problem somewhere rather opaque within dart. Since this (should be) the first usage of this dart feature, it may take a bit of time to properly resolve.

@GaryQian
Copy link
Contributor

flutter/engine#23070

@zanderso
Copy link
Member

Is this blocking anything?

Getting this unit test passing seems like it would be a prerequisite for declaring success on deferred-loading/split AOT?

@GaryQian
Copy link
Contributor

Yeah, though after chatting with Ryan about the problem, it seems it is most likely to be a problem with the testing infra rather than the split aot feature itself.

@zanderso
Copy link
Member

Sure. We should do whatever is the necessary work to write a non-flaky test of the thing you're trying to test.

@tvolkert

This comment has been minimized.

@chinmaygarde chinmaygarde added the P2 Important issues not at the top of the work list label Jan 5, 2021
@jmagman

This comment has been minimized.

@zanderso

This comment has been minimized.

@zanderso
Copy link
Member

From engine flake triage: @GaryQian Did you get a chance to look into this further? The test is still disabled.

@GaryQian
Copy link
Contributor

Not yet, I can look into it next.

@tvolkert
Copy link
Contributor

@GaryQian any update?

@GaryQian
Copy link
Contributor

Due to limitations in dart in a test env, I plan on testing this with a full integration test on an AVD instead as a unit test. My other line of work getting AVDs running in pre and postsubmit luci will make this test possible

@GaryQian
Copy link
Contributor

PR for integration tests to properly test this: #88030

@zanderso
Copy link
Member

@GaryQian Can we close this issue?

@zanderso
Copy link
Member

From flaky issue triage: @GaryQian Did you delete the flaky test? Can we close this?

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2022
@flutter-triage-bot flutter-triage-bot bot added the c: flake Tests that sometimes, but not always, incorrectly pass label Jul 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: disabled test Tracks the restoration of a disabled test c: flake Tests that sometimes, but not always, incorrectly pass engine flutter/engine repository. See also e: labels. P2 Important issues not at the top of the work list
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants