You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The test times out waiting for a connection. If you enable debug mode on the test, you can see that the test is still running in the chrome window (prints in a loop forever), but it's never "discovered" by the test framework.
I'm still doing some investigation, but it appears there's some interleaving execution-order dependency effect between this logic and establishing a tab connection.
This means changing the async characteristics of any code in either of these two pathways can lock the program. We seem to depend on logic in both pathways executing partially (but not fully) and in a particular order. You can see an early attempt at fixing this in this PR.
I've only observed this when running tests (so far).
The text was updated successfully, but these errors were encountered:
Markzipan
changed the title
[dwds] Race condition when establishing a tab connection and processing socket connections/requests.
[dwds] Race condition when establishing a tab connection and processing socket connections/requests in eval tests.
Dec 8, 2023
To reproduce:
Add
Future.delayed(Duration(seconds: 3))
(or equivalent) just before the line containinggetTab
(between 404 and 405).Then run https://github.com/dart-lang/webdev/blob/master/dwds/test/frontend_server_evaluate_sound_test.dart
Observation:
The test times out waiting for a connection. If you enable debug mode on the test, you can see that the test is still running in the chrome window (prints in a loop forever), but it's never "discovered" by the test framework.
I'm still doing some investigation, but it appears there's some interleaving execution-order dependency effect between this logic and establishing a tab connection.
This means changing the async characteristics of any code in either of these two pathways can lock the program. We seem to depend on logic in both pathways executing partially (but not fully) and in a particular order. You can see an early attempt at fixing this in this PR.
I've only observed this when running tests (so far).
The text was updated successfully, but these errors were encountered: