Repository navigation
Fix race causing null dereference on getStack in web_tool_tests and CI flakes - #87278
Merged
fluttergithubbot merged 2 commits intoJul 29, 2021
Merged
Conversation
added 2 commits
July 28, 2021 18:27
Race was happening when a test exited before the future in expectLater completed, causing next test to race with it. Closes:
One case of recent CI flakes in web_tool_tests was caused by a race condition between resuming an isolate and waiting for the app to hit a next breakpoint. If resume gets delayed in the vm service, the tests might get a stale "paused" state of the isolate and call `getStack` while running, which causes an exception in dwds, which is limited by chrome dev tools capabilities in that case and cannot get a stack while running. Fix the race condition by waiting for `Resume` event before waiting for `Pause` in `TestDriver._resume`. Following PR changes the null dereference to an RPCError in dwds if `getStack` while the app is running. Related: dart-lang/webdev#1370 Closes: dart-lang/webdev#1369
zanderso
approved these changes
Jul 29, 2021
annagrin
pushed a commit
to annagrin/flutter
that referenced
this pull request
Aug 17, 2021
Subscribe to events before sending commands to VM that trigger the event in question, to prevent a race where the event arrives before subscription. Previous fix for another race condition exposed the current issue: Related: flutter#87278 Related: dart-lang/webdev#1369 Closes:flutter#87481
8 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One case of recent CI flakes in web_tool_tests was caused by a race condition between resuming
an isolate and waiting for the app to hit a next breakpoint. If resume gets delayed in the vm service,
the tests might get a stale "paused" state of the isolate and call
getStackwhile running, whichcauses an exception in dwds, which is limited by chrome dev tools capabilities in that case and
cannot get a stack while running.
Fix the race condition by waiting for
Resumeevent before waiting forPauseinTestDriver._resume.Following PR changes the null dereference to an RPCError in dwds if
getStackwhile the app is running.Related: dart-lang/webdev#1370
Closes: dart-lang/webdev#1369
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.