-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
New language server seems to be frozen at analyzing workspace for more than 30 minutes #2297
Comments
I'm experiencing this issue as well. Relatedly, my vscode is currently in a state where it is not analyzing the workspace, vscode is idle, but |
I experience this issue aswell. |
Here too. Not sure if it is helpful, but I'm also having this pop up in the
(and @DonJayamanne has Microsoft taken over the vscode-python repo? IOW, is this the main repo to track and report issues to?) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@zooba may be interested in microsoft/vscode#55815 as well. |
The frequent "reloading modules" looks like either the file watcher is detecting changes or the language server is crashing and restarting frequently. The stack trace above probably means we need to use |
I've attached to a frozen language server process with VS. Its memory profile was a flat line at 6 GB (did it run out of memory and desperately try to malloc in a loop?) and its CPU profile was oscillating around maxing out one core. Unfortunately by that point the process no longer responded to debugger break requests so I could not see where it was stuck and once restarted I could no longer reproduce. |
Is there a way to disable the language server? I have the same issue and it maxes out my CPU and grinds my computer to a halt every time I open VSCode making it unusable :( I haven't been able to find any instructions on how... |
@keattang, you can disable the new Python Language Server by opening settings in VSCode ( |
@patrys @keattang If you are able to share the code and configuration that's getting you into this state (email links/details to [email protected]) then that can help us reproduce your issue and figure out the problem. Unfortunately, there are still a few edge cases where certain code constructs can lead to explosive growth, but without the actual code that causes the problem there's not much we can do to detect them :( |
@zooba If I was able to reproduce this easily, I'd debug this further locally; unfortunately it's not an easy thing to reproduce. |
@patrys Understood. We do have a few tools that can help us reproduce and diagnose issues, though they're not really easy to use without understanding how the internal analysis model works (and that in itself is nearly a six-week course ;) One of the biggest blockers to contributions in this area is simply that this is pretty complex code) |
Almost same here. |
Thanks @d3r3kk. Interestingly, I didn't actually have jedi turned off. I had recently enabled the Visual Studio IntelliCode Preview though so I wonder if that turned the language server on in the background? After turning jedi off and then back on again I am now able to use VSCode again. @zooba Unfortunately it was a fairly large project that vscode was struggling on so I couldn't tell you which part of it caused the issue |
@keattang Honestly (and I mean absolutely no disrespect by this), you wouldn't be able to tell which part was the problem anyway. The places where the language server can get hung up on certain code constructs is highly unpredictable, which is why the best way for us to find the issues is by starting with the full codebase, bisecting to find the minimum set of files to reproduce it, and then live debugging it to find the (typically) comparisons that are not properly commutative or transitive. And unfortunately, when we can't get enough of the codebase to reproduce the issue (as is often the case), there's basically nothing we can do. All of the issues we can think of have had unit tests for years, but you can never be imaginative enough with this kind of problem :) |
@keattang - one possibility is to set |
@zooba fair enough, I'd share the codebase but its a private repo owned by my employer. @MikhailArkhipov I'll see what I can find with that |
Still experiencing this issue with the latest version. |
Experiencing this issue as well. |
Also experiencing this issue. It's been stuck analyzing 2 items for several hours. Completely restarting VS Code does not resolve it. |
I'm experiencing this currently on my Mac with an insiders build of Code and Python 2018.8.0. Unfortunately I don't have the tools to debug the language server but I've managed to capture the trace output (it's an open source project so I'm fine with posting the directory structure): Output
It looks like it's done without errors yet the status bar is showing
|
I've encountered the same problem in my ubuntu 18.04 64bit with vscode 1.27.1, vscode-python 2018.8.0 and python 3.6.5 here is the trace output log: output log
and the result of top command: Although CPU has idled while this small project, the memory consumption seems too high. the project is https://github.com/fxsjy/jieba |
Remaining items in the status bar may be UI issue if CPU load is low. If LS was restarted b/c of exception (most probable cause is microsoft/python-language-server#72) then UI just shows string from the previous instance. |
One thing I noticed here is some symlink folder structures can cause really deep parsing queues to form. Recursive/looping symlinks can end up propagating pretty deeply and if there's actual content anywhere along the way it will take a long time. For example, given a simple folder structure like this:
And
I managed to work around this by just adding the suspect symlinks to my VSCode excludes. There's also some other odd behavior with dead symlinks, but it doesn't seem to act as poorly. |
- I believe this might fix microsoft#2297 (and related issues) - Calling 'beginProgress' from LS causes progress reporting to not get cleaned up properly. - Related fix for microsoft/python-language-server#94
Symlink could cause it... I have tons of them (I use zc.buildout, with an extension (omelette) that makes all the eggs used by the project available in the same tree, using symlinks). I'm not the only one using it... in Zope/Plone world is quite usual that devs use these tools. It would be great if we can fix it somehow. |
I wondered if it is processing my ./.venv pipenv package folder or some other temporary sub-folder. The number of items it said it was processing seemed much larger than my code base. |
True, I didn't take into account that virtualenv also uses symlinks... don't know about pipenv, but I guess it also does it. So, there's a major problem then that might affect the vast majority of people. |
It's happening on Windows as well, which doesn't use symlinks for virtualenv (that I know of). Also, my project doesn't use virtualenv. However, it does use environment variables and mess with |
- I believe this might fix microsoft#2297 (and related issues) - Calling 'beginProgress' from LS causes progress reporting to not get cleaned up properly. - Related fix for microsoft/python-language-server#94
Environment data
Actual behavior
Progress message does not go away
Expected behavior
Progress in status bar must go away.
Steps to reproduce:
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
)The text was updated successfully, but these errors were encountered: