-
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
Dart Analyzer runs with 100% CPU load when directory contains circular symlinks #42079
Comments
@bwilkerson @devoncarew this seems like a repeat of #36919 though I'm not sure why (the original fix still seems to be there). I can't repro this though - as I don't have a |
Thanks a lot for investigating. Tried to reproduce the issue this morning and was not able to do so. |
@bwilkerson this came up again recently at Dart-Code/Dart-Code#2624. In this case it was Pre-LSP, we could try to filter the analysis roots to only Dart projects on the client (we didn't, but it was an option). With LSP this won't be possible at all - the client will just give us the paths of open folders which may be a mix of Dart/web/others, so I think we may need to handle this in the server. Some possible ideas:
Any thoughts? |
I'm seeing this issue from time to time on the Sentry Dart/Flutter repo when opening the Flutter project.
I can image that with stable support for desktop there are a lot of packages which are coming up with the same approach. I hope that helps. |
@ueman I cloned that repo and looked at the symlinks. Those in the macOS folder don't seem circular (they're to files) so I wouldn't expect them to cause any problems (and I couldn't repro this issue). Although I did notice some circular symlinks in the
However, these also did not seem to trigger this issue for me - the analysis server seems to analyse the workspace without any issues. I tested both on Flutter's stable channel (2.2.1) and also the latest master. Could you confirm the version of Flutter you're using, and post the output of running |
Actually, I could repro this on Flutter 2.0.6. So I think it's something that's been fixed between 2.0.6 and 2.2. If you can confirm you're also using 2.0.6 then I suspect this has been resolved in the latest stable releases and can be closed. Thanks! |
Output of
I'm using Flutter 2.2 but haven't seen the issue for a while.
But it could also be the Flutter upgrade. I'm fine with closing it. If I run into this issue I'll just reopen it. |
@ueman thanks - I did try There is another issue affecting 2.2 that might trigger the other issue you commented in (Dart-Code/Dart-Code#3270) which is tracked in #45996. It's been fixed in master and there's an open request to cherry-pick/hotfix (#46249), so until/unless that happens you may still see the formatter issue, although when it occurs for that reason the CPU should not remain high. I'll close this since all the other reports are quite old and it looks like this may have been fixed in Flutter 2.2, but do shout if you see it again in Flutter >= 2.2 with some instructions. Thanks! |
Summary
This tracker is for issues related to:
Versions
Reproduction
Create a new flutter plugin
Open the code with VSCode
Select iPhone SE Simulator as target
Open
example/lib/main.dart
Press F5 to run the example
Select "Dart & Flutter"
... work with the project for a time
Open MacOSX Activity Monitor
--> Activity Monitor shows a dart process with 160% CPU load
Kill this dart process
Switch back to VSCode
VSCode tells, that Dart Analyzer has been terminated
Select "Restart Analyzer"
** Process is again at 160% CPU load
How to remove the issue
The build process created a circular sym link
Remove this symlink and the issue does not happen anymore
The text was updated successfully, but these errors were encountered: