Skip to content
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

[CP][stable channel] Ensure start/stop file watching requests are run on the dart thread. #46249

Closed
devoncarew opened this issue Jun 3, 2021 · 5 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. cherry-pick-approved Label for approved cherrypick request cherry-pick-review Issue that need cherry pick triage to approve merge-to-stable

Comments

@devoncarew
Copy link
Member

devoncarew commented Jun 3, 2021

commit(s) to merge: ed82bb6

merge instructions: clean merge or patch CL

  • assumed clean

What is the issue: Brief description of the problem

  • numerous user reports of the analysis server stopping responding to IDE requests; this is due to the isolate running the analysis server deadlocking when unsubscribing from file watching events

What is the fix: Brief description of the fix

At present start/stop requests are scheduled on RunLoop thread. This results in deadlocks since same RunLoop thread might be busy with blocking writes of file watching events, not giving a chance for Dart to read previously-written events. Reading would unblock writer.

This fix moves start/stop requests to run on Dart thread instead.

Why cherrypick: Describe the reasons, like many users impacted, or serious functional issues, for example

  • lots of users reports; likely manifesting in a few separate issues

Risk:

Link to original issue(s):

/cc @kevmoo @mit-mit @whesse @athomas @vsmenon @franklinyow @a-siva @aam @DanTup

@devoncarew devoncarew added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. merge-to-stable cherry-pick-review Issue that need cherry pick triage to approve labels Jun 3, 2021
@franklinyow franklinyow added the cherry-pick-approved Label for approved cherrypick request label Jun 3, 2021
@franklinyow
Copy link
Contributor

Description:
Fix for analysis server stop responding to IDE requests , see #45996 for detail

@aam
Copy link
Contributor

aam commented Jun 7, 2021

@mraleph pointed out potential (unlikely) problem in the original fix, which were fixed in follow-up dart#202312 landed three days ago in dart sdk.

@aam
Copy link
Contributor

aam commented Jun 7, 2021

that follow-up change I mentioned dart#202312 landed in flutter flutter/flutter@c9d5485 21h ago

@a-siva
Copy link
Contributor

a-siva commented Jun 8, 2021

Created #46298 for the additional change to be picked.

@athomas
Copy link
Member

athomas commented Jun 9, 2021

Merged to stable in 516eb3b (2.13.3).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. cherry-pick-approved Label for approved cherrypick request cherry-pick-review Issue that need cherry pick triage to approve merge-to-stable
Projects
None yet
Development

No branches or pull requests

5 participants