-
Notifications
You must be signed in to change notification settings - Fork 294
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
Dart analysis server at 100% cpu indefinitely when opening the Dart SDK repo (or flutter engine, which includes a nested copy) #5101
Comments
This PR to the analysis options seems to resolve this issue: flutter/engine#52699 We were just overloading it and getting it into a bad state. It's probably still worth fixing, but it's not an issue for me anymore. |
related issue Dart-Code/Dart-Code#5101 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat
@gaaclarke do you know if there are extra steps beyond cloning the repo required to trigger this? I wasn't able to reproduce (even with (eg., if you clone a new copy of the repo, can you trigger it on that?) |
No, it can't be a new clone, you have to checkout before: flutter/engine@233a57b here is my workspace, but i don't see anything that may be off. Maybe the fact that I'm using a workspace is enough to mess it up?
|
I think I may have reproduced this using your workspace. It doesn't seem "stuck" because it's still sending analysis diagnostics (it's generating a lot of diagnostics because there is a copy of the SDK in there that doesn't seem to resolve any packages) but it's been going at least 10 minutes. I wonder if it's because you have the same folders included multiple times:
I'll do some more digging, thanks! |
btw, in your workspace above you have:
But I don't have a vulkan-deps at that location (even after |
Seems that this is caused by the Dart SDK in It is known that there are issues trying to analyze the whole SDK repo (it's full of test projects and things), but I'm surprised that it seems to be analyze forever (or at least, it's so slow it doesn't complete in any reasonable amount of time). An extra weird thing - this repros on Windows (server is stuck forever analyzing), yet it uses almost no CPU to do so (I presume something else is a bottleneck, but nothing else like disk seem saturated oddly). I'm gonna leave it running in the background and while I for lunch on the chance it does complete, but otherwise I'll do some more debugging to see what's going on. |
I tracked this down to an infinite loop in the linter when there are cycling redirecting constructors. The Dart SDK includes a test file that has that (but I guess never triggers the linter over it in tests). I've opened dart-lang/linter#4970 with the details and will close this one. Thanks! |
Thanks Danny! Yea we've recently moved the vulkan headers but I haven't had the need to update my workspace. I don't even know why I'd have "src/flutter" and "src/flutter/lib/ui" separately. Thanks for figuring it out. |
Description
The dart analysis server just sits at 100% when editing the flutter engine repo.
To Reproduce
dart
process that is running the analysis server sits at around 100% and never stops.Expected behavior
I would expect the process to reach some stasis of VSCode is not being interacted with.
Screenshots
Maybe it's related that there is a huge number of issues that are reported that I never mind:
Logs
openfiles.txt
sample.txt
Details
(spawned from #5084)
The text was updated successfully, but these errors were encountered: