Skip to content

Conversation

@jonahwilliams
Copy link
Contributor

@jonahwilliams jonahwilliams commented Apr 6, 2020

Description

Reland VM service migration. Fix unknown double-complete which broke flutter_test_performance.

test stdout (TestStep.testRunning): 00:01 +1 -1: loading /home/flutter/.cocoon/flutter/dev/automated_tests/flutter_test/trivial_widget_test.dart [E]                                                                                       
2020-04-06T10:30:42.377762: test stdout (TestStep.testRunning):   Bad state: Future already completed
2020-04-06T10:30:42.411011: test stdout (TestStep.testRunning):   dart:async/future_impl.dart 42:31                              _AsyncCompleter.complete
test stdout (TestStep.testRunning):   package:flutter_tools/src/vmservice.dart 363:29                VMService._connect.<fn>
2020-04-06T10:30:42.411101: test stdout (TestStep.testRunning):   package:stack_trace/src/stack_zone_specification.dart 209:15   StackZoneSpecification._run
test stdout (TestStep.testRunning):   package:stack_trace/src/stack_zone_specification.dart 119:48   StackZoneSpecification._registerCallback.<fn>
test stdout (TestStep.testRunning):   dart:async/zone.dart 1180:38     

@fluttergithubbot fluttergithubbot added c: contributor-productivity Team-specific productivity, code health, technical debt. tool Affects the "flutter" command-line tool. See also t: labels. work in progress; do not review labels Apr 6, 2020
channel.add,
log: null,
disposeHandler: () async {
if (!streamClosedCompleter.isCompleted) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing check for is completed. The old VM service might have been OK with being torn down multiple times though, not sure. At any rate I can't repro the test failure anymore

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're trying to tear it down twice, could we also be trying to use it after closing it in some other way?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've looked into it a bit more and I'm not certain - I can't consistently repro the crash. I think the stream logic is just too complicated right now, and should be a bit simpler once I no longer need to duplicate events

@jonahwilliams jonahwilliams marked this pull request as ready for review April 7, 2020 19:24
@jonahwilliams jonahwilliams requested a review from zanderso April 7, 2020 19:24
Copy link
Member

@zanderso zanderso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm w/ question.

channel.add,
log: null,
disposeHandler: () async {
if (!streamClosedCompleter.isCompleted) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're trying to tear it down twice, could we also be trying to use it after closing it in some other way?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

c: contributor-productivity Team-specific productivity, code health, technical debt. tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants