Comments (25)
@hpesoj Yeah, we fixed some deadlock potential cases in 1.19.7, but (you and) I still hit a deadlock with that version on Linux so we're still looking into this -- the last invoked action appeared to be a hover in my repro, excluding the few actions that are handled in a higher priority thread, and your last action appears to be documentHighlight (another IntelliSense-based operation).
Using kill -9 <pid>
with the pid of the cpptools-srv process "fixed" the issue in my repro, so it's not really a deadlock, but it's stuck on the cpptools-srv (IntelliSense) process for some reason.
from vscode-cpptools.
We've found a deadlock in cpptools-srv that we believe should fix this issue (for our pending 1.19.8).
from vscode-cpptools.
I have been experiencing the same thing. I'm running Windows 11 remote ssh to a Debian Testing VM running on the same machine. I turned on logging and there is no additional helpful input other than when it is working. It will work for a few minutes after restarting VS code or even up to a few hours. I haven't been able to track down what triggers it. When it stops working even the squiggles and error comments will stay the same whether fixed or not and will stay on the same line number regardless if the code it is commenting/squiggling has moved or not. This has been happening to me since the end of last week. I've reinstalled the program as well as my extensions and the problem persists. Reloading the window or trying to force a rescan does not change anything, only closing and re-opening vs code will resolve and then only temporarily.
from vscode-cpptools.
The last time this happened, it was after the computer had gone into sleep when I was away from my desk (it does not only occur during these times). I managed to catch this error in the developer tools console.
from vscode-cpptools.
@flipperswitch Those errors are with our TypeScript code and we don't believe they're related.
@av4625 We believe there is some deadlock in the cpptools process -- is the cpptools process using 0 CPU during this time? Is anyone able to attach a debugger to get a call stack? https://github.com/microsoft/vscode-cpptools/wiki/Attaching-debugger-to-cpptools-or-cpptools%E2%80%90srv
from vscode-cpptools.
@av4625 By "one desktop and slide to another" -- what do you mean by "desktop" -- are you moving it from one monitor to another?
from vscode-cpptools.
@av4625 When you set C_Cpp.loggingLevel to "Debug" what is being shown when you put your machine to sleep? Does it repro when VS Code is in an idle state or does something need to be in progress?
from vscode-cpptools.
@av4625 Is there a certain length of time your machine needs to be asleep for to trigger it?
from vscode-cpptools.
@av4625 By "one desktop and slide to another" -- what do you mean by "desktop" -- are you moving it from one monitor to another?
https://support.apple.com/en-gb/guide/mac-help/mh14112/mac
This is what I mean about multiple desktops. I have vscode on one and safari on another for example. I think you can do similar on windows as well. Not sure if its the desktop switch causing it or just “leaving” vscode, similar to the mac sleeping maybe
from vscode-cpptools.
@av4625 When you set C_Cpp.loggingLevel to "Debug" what is being shown when you put your machine to sleep? Does it repro when VS Code is in an idle state or does something need to be in progress?
I can check tomorrow hopefully.
from vscode-cpptools.
@av4625 Is there a certain length of time your machine needs to be asleep for to trigger it?
Don’t think so, I tried it yesterday by closing the lid and opening shortly after
from vscode-cpptools.
@av4625 Can you look for the last "(invoked)" message that hasn't had a response sent? In the logging you provided, the only invoked message is the documentSymbol request which is responded to, so we believe the deadlock is being triggered by the prior invoked message.
from vscode-cpptools.
Hi @av4625 . The getDocumentSymbols
request is processed at a higher priority than most other requests. I think you were on the right track, but the issue may be another message (at normal priority) that is getting stuck and not sending a response (invoked, but no response with that ID), stalling the message queue.
Would you be able to get a crash stack from your repro? That would likely point to a specific message handler.
from vscode-cpptools.
Was busy yesterday and was not able to test, today I upgraded to 1.19.5 again and am struggling to reproduce this again, will keep trying for a little while
from vscode-cpptools.
@av4625 Can you look for the last "(invoked)" message that hasn't had a response sent? In the logging you provided, the only invoked message is the documentSymbol request which is responded to, so we believe the deadlock is being triggered by the prior invoked message.
I got it to happen again, I can't see which was the las invoked to not get a response. But it is just frozen now again.
log.txt
from vscode-cpptools.
I'm experiencing the same issue. On both macbook pro and on my Linux machine.
This started happening recently, like few days ago at most to me, so I would relate this to an update of the extension. I have everything configured properly (I haven't changed my config for months) and it just stopped working. Intellisense is "loading..." all the time.
It's pretty unusable to be honest. And when I open vscode it works, then out of sudden after some time it stops working and I don't see anything usable in the log. But in my case I don't even need to sleep the machine. If intellisense works it just stops after few minutes of use.
from vscode-cpptools.
@sean-mcmanus The last message I see at normal priority that was invoked and likely not responded to was a completionItem/resolve
LSP: (received) completionItem/resolve (id: 448)
LSP: (invoked) completionItem/resolve (id: 448)
LSP: $/cancelRequest (completionItem/resolve, id: 448)
LSP: (received) completionItem/resolve (id: 449)
LSP: $/cancelRequest (completionItem/resolve, id: 449)
LSP: (received) completionItem/resolve (id: 450)
LSP: $/cancelRequest (completionItem/resolve, id: 450)
LSP: (received) completionItem/resolve (id: 451)
LSP: $/cancelRequest (completionItem/resolve, id: 451)
The cancellation request is immediately responded to by the LSP manager, which will then discard a response for that request if attempted. If the issue is a message handler not returning, this seems to be the one. Though, a crash stack would be more conclusive. We could also add a log message when a response is discarded due to having been canceled.
from vscode-cpptools.
Though, a crash stack would be more conclusive.
I've been running the debugger since and can't get it to happen again, typical, when I made the ticket it happened constantly all the time.
When it gets into deadlock will I just see the callstack in the debugger pane? Or do I have to do something? While its running it doesn't show anything.
from vscode-cpptools.
Happened while the debugger was attached.
Nothing showed:
{
"version": "0.2.0",
"configurations": [
{
"name": "(lldb) Attach",
"type": "cppdbg",
"request": "attach",
"processId": "${command:pickProcess}",
"program": "/Users/me/.vscode/extensions/ms-vscode.cpptools-1.19.5-darwin-x64/bin/cpptools-srv",
"MIMode": "lldb"
}
]
}
Usage stats while its "stuck":
from vscode-cpptools.
@Colengms Yeah, the deadlock appears to be in the completionItem/resolve handler.
@av4625 You're attaching to cpptools-srv instead of cpptools (cpptools-srv is the IntelliSense process, the issue is most likely with cpptools).
from vscode-cpptools.
Ahh i thought it was in the intellisense as that is where we see the issues
from vscode-cpptools.
@av4625 Our current hypothesis is the main thread that handles IntelliSense communication is getting deadlocked, so further communication with the IntelliSense process can't happen.
from vscode-cpptools.
My project reliably gets stuck updating intellisense forever as well. I've attached the debug log (filenames redacted) in case it's of any help. Note, I'm using 1.19.7.
from vscode-cpptools.
We've found a deadlock in cpptools-srv that we believe should fix this issue (for our pending 1.19.8).
thanks and quickly:D
from vscode-cpptools.
We fixed one deadlock with 1.19.8, but we got another report in #12097 . Has anyone else hit that yet? If so, details like the OS, a call stacks, or the logging could help. I haven't been able to repro any deadlocks so far.
from vscode-cpptools.
Related Issues (20)
- Duplicate inlay hints can randomly appear
- All IntelliSense servers are forced to reset whenever a CMake: Install is run
- Set `-enable-pretty-printing` and `-gdb-set disassembly-flavor intel` as default
- https://github.com/microsoft/vscode-cpptools/tree/f3cbf1237d44a92e626ed9e3048fe3fd609356e9/Code%20Samples HOT 1
- errorSquiggles is Incorrect HOT 4
- C compiler fail to recognize specific flags HOT 2
- Option to disable hover tooltips HOT 1
- 1.19.9 cpptools crash on MacOS Sonoma 14.4 HOT 31
- New A/B Experimentation Setting HOT 3
- When generating Doxygen comments, can choose to use the @ or \ characters. HOT 2
- Support namespaces with leading double colon ( :: ) operators
- Move namespace support for Add #include into common code for unification purposes
- C/C++ intellisense extremely slow with large codebases (due to populating file name cache) HOT 8
- incorrect comment syntax highlight HOT 1
- Basic Include files error
- Go to Definition goes to a correct source file but locating at a wrong line. HOT 2
- Extension not working at all HOT 4
- C/C++ extensions, remote development: all C++ features suddenly inhibited for any project on a single remote host HOT 12
- IntelliSense squiggles don't update correctly after an edit and cursor line change or save HOT 1
- Intellisense flags a bunch of problems that aren't problems HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-cpptools.