-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Failures on Update to latest package:json_rpc_2 #43012
Comments
This appears flaky, the same test is passing in other configurations. The error does look plausibly related to my changes in that package, but without being able to reproduce this locally I'm not quite sure. Should I roll this back in the mean time? |
May fix dart-lang/sdk#43012 If a `Peer` is created with a `StreamChannel` that does not follow the stated contract it's possible that the `sink` gets closed without receiving a done event from the `channel` which leaves the `Peer` instance in a state that's inconsistent with the underlying `Client`. The result is that it's possible to get a bad state trying to send a message even with `isClosed` returns `false`. - Make `isClosed` and `done` forward to the `_client` and `_peer` fields so that they can't be inconsistent. - Forward errors to the `_server` so that it can forward them through `done` without an extra `Completer` to manage. - Avoid closing the `sink` in the `Peer`. It will end up being closed by the server when it is handling the error, and it's the same `sink` instance in both places. - Add a test that ensures that `isClosed` behaves as expected following a call to `close()` even when the `StreamChannel` does not follow it's contract.
May fix dart-lang/sdk#43012 If a `Peer` is created with a `StreamChannel` that does not follow the stated contract it's possible that the `sink` gets closed without receiving a done event from the `channel` which leaves the `Peer` instance in a state that's inconsistent with the underlying `Client`. The result is that it's possible to get a bad state trying to send a message even with `isClosed` returns `false`. - Make `isClosed` and `done` forward to the `_client` and `_peer` fields so that they can't be inconsistent. - Forward errors to the `_server` so that it can forward them through `done` without an extra `Completer` to manage. - Avoid closing the `sink` in the `Peer`. It will end up being closed by the server when it is handling the error, and it's the same `sink` instance in both places. - Add a test that ensures that `isClosed` behaves as expected following a call to `close()` even when the `StreamChannel` does not follow it's contract.
I'm not sure how to proceed with this. I spent some time trying to see if I could reproduce a similar failure outside of the SDK and I was able to track down at least one way to cause the behavior I saw in the logs. That was fixed with dart-archive/json_rpc_2#65 When trying to sync that it surfaced a different bug in dds that was being masked by bugs in But now I'm stuck. When I try to sync today I can get a green run on this bot, but it's not clear to me if that is sufficient. Here is a green run: https://ci.chromium.org/p/dart/builders/try/vm-kernel-precomp-win-release-x64-try/1872? There are some things here I don't understand at all.
One thing that is interesting, I have been completely unable to see this failure locally. So I have some questions:
@bkonyi - can you help me dig here? I think you might own some of these tests?
|
Service tests are notoriously flaky on Windows. This is an older test that's being run against DDS, so it's possible that the extra latency introduced by communicating with the service via DDS has made the test more flaky. It's also hard to tell what the actual failure is caused by since we check the error code before we check the message so the error message is never written to the console. I think you're safe to land, but if you go ahead and swap lines 84 and 85 in |
@bkonyi - The test I'm most interested in currently is This is the failure that I am intending to address with dart-archive/json_rpc_2#65. The stack trace was:
DDS is trying to do the right thing here and check whether the peer is closed, but a bug in sdk/pkg/dds/lib/src/client.dart Lines 71 to 74 in 3b6aeb4
I was able to track down one way that can lead to this situation and I fixed that. (Side note, my repro required a The other test |
Contains a potential fix for a bug causing #43012. Change-Id: I861ca6dbb10398edb29181fb8a1348db73818f95 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158206 Commit-Queue: Nate Bosch <nbosch@google.com> Auto-Submit: Nate Bosch <nbosch@google.com> Reviewed-by: Ben Konyi <bkonyi@google.com>
There are new test failures on Update to latest package:json_rpc_2.
The tests
are failing on configurations
log: https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8872333091123864224/+/steps/test_results/0/logs/new_test_failures__logs_/0
The text was updated successfully, but these errors were encountered: