-
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
Multiple IntelliSense stale processes on Linux #1246
Comments
If you ever see one of the "IntelliSense" processes running at 99% for an extended period of time with no significant change in memory usage, then you are likely hitting an infinite loop bug in the engine. If you are able to detect when this happens and can send us the code snippet or code file that causes it, we'd be happy to investigate and get the issue resolved. Also, if you are able to share the steps you took that resulted in orphaned extension processes, we can investigate that too. |
I'm facing the same issue. I noticed it gets worse as the project becomes bigger and when opening multiple files. I have to keep terminating it from time to time. This is so annoying. |
I've also experience this. Specially with a workspace with many files, target specific directories and pre-processor directives to select target. I've tried to enable the most verbose debug level but there is nothing in the output window. Would it be possible to temporarily add extra debug prints? When I switch configuration (target) the intellisense flame (lower right toolbar) is continually red, and intellisense does not work. When hovering over a symbol the tool-tip says "Loading...". Only way out is to quit vscode, kill the stale processe(s) and restart. |
@sbrw Our pending 0.14.3 update fixed a process deadlock when switching configurations, which sounds like what you're describing. You can set your C_Cpp.loggingLevel to 7, 8, or 9 to get more debug output, but you want to lower it during normal usage, because outputting too much slows things down a lot. |
I don't recommend ever using 8 or 9. 6 should be enough to see that the extension is alive and processing editor commands. |
We've fixed a bunch of issues that could lead to stale processes and stuck "Loading..." deadlocks. Does 0.16.1 still have problems for anyone? |
I still have the problem that IntelliSense seems to be stuck (red flame never goes away) and there are stale processes around after closing VS Code. |
I have the same problem on OS X: multiple VSCode.CPP.IntelliSense instance running, in stale , apparently for a deadlock (I did a trace with dtruss). It's very annoying and force me to kill continuously the processes to gain 30 second of code navigation. |
@gbonacini @flixr Any advice on how to repro this? Is the status of the process "Zombie"? That would indicate it's crashing. It's not reproing on my machine. @grdowns got a repro on his machine of the stuck red flame, but only with a debugger attached and when switching configs, so maybe that's what you guys are hitting?...when we find/fix the root cause we might know. Any call stacks of threads with work that seemed deadlocked might help. |
Thank you for your help. Today I'll collect all the data I can to reproduce the problem. For now, I can provide these information:
|
This could help to reproduce the problem:
502 6998 6410 0 11:54AM ?? 0:09.61 /Users/bg/.vscode/extensions/ms-vscode.cpptools-0.16.1/bin/Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin 6410 10
SYSCALL(args) = return
SYSCALL(args) = return
SYSCALL(args) = return
madvise(0x7FC0BC878000, 0x1000, 0x7) = 0 0 ------------------- End trace of the fourth -------------------------
I hope this information will be useful, thank you again for the help. |
@sean-mcmanus maybe the backtraces and log I posted in #1777 helps? |
@flixr Yeah, thanks for the ping on the backtraces. I think we have enough info to make progress on this (hopefully there is only this one deadlock). |
Hi I think I found the problem: the source code is on a remote file system locally mounted. If for some reason there are network problem, or a remount is needed, the Intellisense processes stuck in a perpetual wait state, blocking the correct scanning (the "Loading..." popup remains untill I kill all the Intellisense processes): ps -ef | grep -i intell If I use dtruss, all the processes are bloched like this : dtruss -p 52435 SYSCALL(args) = return Thank you for your assistance, G. |
P.S. Trying to restart vscode, the processes won't die, the kill command seems the only way to solve the problem temporarily. |
I attached gdb to the one stale process, it shows following backtrack:
Hope this would help to solve the problem |
Is this still a problem with 0.17.1? We fixed some deadlocks and crashes. |
It looks like that this problem in 0.17.1 has been fixed. Thanks a lot! |
Unfortunately there still seems to be a deadlock that is leading to stale processes. vscode seems to be deadlocking when reading the output of clang-format. The version I have is 0.17.1
I hope this helps. Thanks, |
@samikama Okay -- yeah, other users have reported some sort of freeze when formatting. I've been able to obtain a repro with the chromium workspace -- it doesn't repro in all scenarios for some reason. We'll investigate. Thanks for reporting this. So far it looks like clang-format is just getting stuck. Maybe we could time out or something. |
Thanks, considering that I wasn't observing this issue since I started using vscode and symptoms started after I upgraded to most recent vscode and cpp plugin, I would have looked at possible pipe related issues since bt seems to point that clang is waiting on write buffer while cpptools is waiting on read. See below for clang-format backtrace. I hope these help.
|
@samikama Yeah, we have a fix pending, we're working on releasing an update. |
Great! Thanks. I found it very useful and looking forward to the fix. Cheers, |
VS Code leaves multiple IntelliSense stale processes running after quit. A process can use even 99% of CPU sometimes and just hangs.
will 1772 0.3 2.4 1232188 75816 tty2 Sl+ 10:29 0:23 /home/will/.vscode/extensions/ms-vscode.cpptools-0.14.2/bin/Microsoft.VSCode.CPP.Extension.linux will 2646 0.0 0.2 318928 7912 tty2 Sl+ 10:59 0:00 /home/will/.vscode/extensions/ms-vscode.cpptools-0.14.2/bin/Microsoft.VSCode.CPP.IntelliSense.Msvc.linux 1772 8 will 2657 0.0 0.2 319060 7172 tty2 Sl+ 10:59 0:00 /home/will/.vscode/extensions/ms-vscode.cpptools-0.14.2/bin/Microsoft.VSCode.CPP.IntelliSense.Msvc.linux 1772 9 will 2916 0.0 0.2 319060 8572 tty2 Sl+ 11:14 0:00 /home/will/.vscode/extensions/ms-vscode.cpptools-0.14.2/bin/Microsoft.VSCode.CPP.IntelliSense.Msvc.linux 1772 24 will 3157 0.0 1.2 319060 37252 tty2 Sl+ 11:34 0:00 /home/will/.vscode/extensions/ms-vscode.cpptools-0.14.2/bin/Microsoft.VSCode.CPP.IntelliSense.Msvc.linux 1772 29 will 3179 0.0 0.2 319060 6640 tty2 Sl+ 11:36 0:00 /home/will/.vscode/extensions/ms-vscode.cpptools-0.14.2/bin/Microsoft.VSCode.CPP.IntelliSense.Msvc.linux 1772 30
OS: Debian 9.2 (x64)
VS Code: 1.18.0 (x64)
C/C++ extension: 0.14.2
The text was updated successfully, but these errors were encountered: