-
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
Analyzer hangs taking up a lot of CPU with RAM usage increasing linearly #44501
Comments
Left it running, took up 31 GB of RAM. |
This issue also exists in dart stable |
Traced the process, seems to be stuck on the linux plugin dir. Removing the linux dir seems to have helped. Will update here if it there are issues. Trace:
|
Ok, it wasn't about the linux or windows folders, from the looks of it, this ephemeral path is recursive and infinite from the looks of it. So the problem might be with some config in desktop plugins somewhere. |
@eklavya Which Flutter configs do you have enabled? Do you have e.g. I'm facing the same with Flutter plugin projects on Linux, when I have flutter doctor
Steps on Linux:
=> open "foo_bar" in VS Code, Android Studio, or IntelliJ IDEA and observe Trace (notice the paths):
|
/cc @devoncarew does it make sense to fix analyzer to behave better on paths with circular links? Seems like it might be a big issue with Flutter Desktop |
Hm... I cannot reproduce this on my Mac or Linux. I see that I ran this
It finished in a few seconds, and was not consuming CPU or RAM infinitely. I connected to |
It it possible that there is a different code path that I don't know, and on which we start going in cycles. Could you run configure Dart Analysis Server (DAS) in your IDE to run with Observatory, similarly how I did (not that you need the |
@scheglov Is it possible that the behavior the user is seeing was fixed by the recent conversion of the analysis server to use context collections? |
I thought so too, but I also tried the revision before the switch to context collections, and still was not able to reproduce. |
Thanks for taking a look. I can still reproduce the problem with the latest Flutter master:
EDIT: oops, I clicked a wrong isolate. I'll post new screenshots soon. :) |
It looks that you selected a wrong isolate in Observatory. It should be |
Sort CPU by Or it could be something else entirely, don't limit yourself to the proposal variants. Maybe something like Sorry, it is an investigation :-( |
One more thing we could do is to use |
Could you do one more screenshot in |
Thank you. |
OK, I see that it really goes into a cycle before c2195fc. So, @bwilkerson was right, and with c2195fc (or better on the bleeding edge of Dart SDK, as there are a few more fixes) we correctly stop visiting on |
Is it still possible to get into an infinite loop via symlinks when none of the directories are hidden? |
I don't see anything that would prevent this, so yes, I think it is still possible. |
Bug: #44501 Change-Id: I60a79474111e56ebece3d9df3fe9281f6e3fcc06 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186800 Reviewed-by: Samuel Rawlins <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]>
Ha, we already have one. |
https://dart-review.googlesource.com/c/sdk/+/186980 should fix it. |
Version information
IDEA IC-203.5981.155
2.12.0-141.0.dev
IC-203.5981.155, JRE 11.0.9+11-b1145.21x64 JetBrains s.r.o., OS Mac OS X(x86_64) v10.16, screens 5120.0x2880.0 Retina
Flutter 1.26.0-1.0.pre • channel dev • https://github.com/flutter/flutter.git Framework • revision 63062a6443 (4 days ago) • 2020-12-13 23:19:13 +0800 Engine • revision 4797b06652 Tools • Dart 2.12.0 (build 2.12.0-141.0.dev)
I have a plugin project with an example, the plugin is universal with support for mobile(all) and desktop(all), I have a rust subproject as well (if it matters). As soon as I enable desktop support and come on the dev channel, I start seeing this problem where the analyzer is stuck with IDE features not working at all (all just wait for a response from the dart analyzer server).
Offending process:
/Users/eklavya/.dev/flutter/bin/cache/dart-sdk/bin/dart /Users/eklavya/.dev/flutter/bin/cache/dart-sdk/bin/snapshots/analysis_server.dart.snapshot --client-id=IntelliJ-IDEA --client-version=IC-203.5981.155 --useAnalysisHighlight2
The text was updated successfully, but these errors were encountered: