-
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
The C/Cpp Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted #430
Comments
@prasoonnaik Moved your request to here. |
We're buggy in the new, unnamed file scenario. It sounds like you need to save the file first. Is that a workaround for you? |
Also just seen this error. Is there anywhere I can look to see the cause? |
What did you do to cause it? There are several conditions where this is known to occur (unsaved file, non-glibc 2.18 OS, non-64-bit OS). We need more info. What is your OS? |
Windows Professional 7 64bit |
Are you using an unsaved file? How far can you get before the crash message appears? |
I think there may have been an unsaved file. The message only appeared once. I think I just restarted VS Code. |
same problem on the environment below:
Before this error comes out, the memory usage of process "~/.vscode/extensions/ms-vscode.cpptools-0.10.0/bin/Microsoft.VSCode.CPP.Extension.linux" will be increasing until all the ram run out. And then I kill this process, then causing this error. |
Does the memory usage problem start immediately without taking any actions? Does it repro for all projects? We're still trying to get a repro. Are you using any Unicode characters with values > 0xffff or >0xff in identifiers? |
Up to now, the memory problem seems occur ramdomly, I'll report later if finding any useful clue. And I'm not using Unicode characters(> 0xffff or >0xff ) in identifiers ;) |
If it's a gradual memory increase and the config in the bottom right is red, then it could be due to a problem with our handling of symbolic links in an infinite recursion. |
I get this all the time, requiring a restart every 10-20 minutes. The project is very simple.
Steps to Reproduce:
It might be worth mentioning that open in my environment are duplicate files with lowercase names and a period postfix. These are opened by the debugger automatically when I step and this is a known bug in vscode. However, it might be causing the cpp tools some grief. |
I wasn't able to repro your issue. Can you try 0.10.3 to see if it's fixed? If you could narrow down the repro requirements that would help a lot. |
That would be difficult, I'm just coding without thought so anything can happen in those 10 minutes. Are there no crash dumps or stack traces I can give you? It's a shame this is not open-source as I'd be more than happy to dig into it. I will update to the latest version tomorrow morning and see what happens. |
Okay. I need to know what symptom you're getting. Does the Event Viewer show that the Microsoft.VSCode.CPP.Extension.exe has crashed? Or is the process still alive but you see "Loading..." in the tooltip and nothing works? If the app is crashing you can get a user-mode dump via https://msdn.microsoft.com/en-us/library/windows/desktop/bb787181(v=vs.85).aspx . Do you get the crashed 5 times message? Is memory/CPU usage really high near the failure? What is the size of the .browse.vc.db? |
I added my comment here because I am seeing exactly what the issue text says: This is with 0.10.3. The executable is no longer in the process list, there is no "Loading..." and I am not aware of any memory/cpu problems at the time of the crash. At least, I'm a i7-6800 with 6 cores (setup as 12 logical) with 32 GB of RAM and nothing I've been doing has been stressing the machine even a little. I've enabled UM dumps and will see if it happens again. Where is this .browse.vc.db file located? |
On Windows, the browse DB should be under %appdata%/Code/User/workspaceStorage/{hash}/ms-vscode.cpptools/ Does it still crash for you if the duplicate files are all closed, or do you only get a crash after debugging? |
Thanks. I can't remove the duplicate files from the list of recently opened files but I can close them (i.e. they're still selectable). There has been a debugging session but I've had it crash without debugging. |
The largest DB file I have is 35MB. |
Nope. That was a quick one! |
If you have a version of Visual Studio or windbg installed, you should be able to attach to the Microsoft.VSCode.CPP.Extension.exe process and save a dump when it crashes and breaks in to the debugger. |
I'll try that next week, thanks for the help. I'm heading off work for the weekend. |
I am having this problem, too with a relatively small mingw based project in Windows 10. I'm now watching the process with procmon so I can figure out what it's doing before the crash. One thing I noticed in the procmon log was that the extension was query/reading *.o files until I excluded them using the exclude files filter. Is it supposed to be doing that? |
The DB files don't seem to be excessively large. Although I have the db name set to "databaseFilename" : "chunks.vs.db" - I have both that and a .BROWSE.VC.DB under my AppData\Roaming\Code\User\workspaceStorage\9579cac8ebcc1d93e3a73c892073cd93\ms-vscode.cpptools with modification times within a couple of minutes of the crash times. |
Can you create a new issue about the two DB's in the save location so it doesn't get lost under this topic about crashes? I believe what you are seeing is expected - we likely created the default DB before you set the databaseFilename property in the json file. Regarding the *.o stuff. We should be querying all files under your workspace to see if they are files or folders, but I wouldn't expect us to actually read the contents of *.o files unless you added it to the global |
I mention it, because just before the crash there is a whole stream of reads of .BROWSE.VC.DB, 4096 bytes at a time. Not sure why it touches it, if I change the name.. |
We released 0.10.4 today with a fix for a crash in signature help that many people were hitting. Please let us know if you continue to see the crashing message in VS Code. |
Crash! I was typing an if statement and decided to move away from it unfinished. So I typed: if ( and then moved the cursor up a few lines and it crashed. Apart from the stream of messages above, its last lines were:
Callstack:
Minidump attached. I never knew about |
Your .dmp shows you're using the old 0.10.3 extension that doesn't have the bug fix. The stream of exception messages are "by design" -- they occur when our parser is running. The bug your describing should not be occurring unless you have an old .exe. |
Yes. I know that. I mentioned in the post above that I would continue to test with 0.10.3 to repro the crash and then update. My hope was that you could use it against a known EXE to verify the callstack matched the crash you have fixed. And as mentioned, I have updated and am testing the new EXE now. |
This time round I've been coding for about 2 hours before a crash. Output is:
Callstack:
Minidump attached. |
I have the 52 MB pdb for the .exe, but I'm unable to get any call stack with that dmp. Maybe because it's a minidump? Do you know how I can get a call stack? Are you able to create a full dmp next time? There's some problem in our build system that is preventing the symbols from being indexed to the symbol server, but we may be able to upload the pdb to some other location. |
Full dumps are about 30MB compressed. I'll have a see if I can get one the next time round. |
Okay, I figured out how to get the call stack (it wanted the path to the .exe for some strange reason), but all I see is exception handling code for an out_of_range exception, but I don't see the call stack for the source of the exception.
|
I've verified the crash is occurring in our main thread and the symbol/parsing threads are okay, so it looks like the crash was caused by an explicit action you did, such as signature help, hover, go to def, etc.. |
There was an intellisense popup active during the crash. It's really hard to remember the actions I was performing while coding as it's a pretty subconscious act. Anyway, here's another one which is an entirely different callstack. I think I was editing the string in the second
Full dump attached. |
Actually, no... I was editing the 3rd statement which is incomplete in that picture... |
Great, that dmp worked and I got a call stack. It's a crash in our autocomplete code. A call to vector::push_back(&&) is failing as it attempts to grow/reallocate -- very strange. Looks like a heap corruption. I ran AppVerifier and it's not reporting any problems. It seems like this only repros in a particular scenario, because we haven't gotten other crash reports from 0.10.4. Previously we had heap corruptions when UTF8 characters > 1 byte were used, but they should all be fixed. We have not gotten any Windows Error Reporting crash reports from 0.10.4 yet, only 0.10.3 (with the length_error exception, which got fixed in 0.10.4). |
This was after a copy/paste operation:
After each of these the environment never really recovers and repeatedly crashes quickly until the "5 times" limit. |
That's a completely different crash in our didChange code. It's failing to do a string replace. I can't seem to repro the bug, but we're investigating still... |
Thanks a ton for reporting this bug. We've had this bug from "the very beginning"...it's shocking it took so long for someone to report it. It can repro whenever the text in a document increases in size. It could be the source of the memory corruption and other crashes you've experienced. We have a fix and will try to get it released soon. |
No problem. Might be worth mentioning something about my environment that I've only just realised may be important: I'm running 2 windows, each opening unique folders but one is a sub folder of the other. |
Having 2 windows (VS Code instances) where one is a sub folder of the other shouldn't have any effect on crashes (because the processes are independent), unless possibly if both instances are manually set to use the same browse database file. |
@dwilliamson As of 0.10.5, all known crashes have been fixed now (excluding bad_alloc, which shouldn't repro in normal conditions). Please send us more dmps/callstacks if you're able to repro any. |
Latest version has been going strong for 6 hours so far without crashing. |
I am encountering the "The C/Cpp Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted." error in VSCode after recently updating. Version 1.10.2
I'm was editing two C files (with ".ino") extensions side-by-side; specifically the HX711Serial.ino and HX711SerialBegin.ino from https://github.com/bogde/HX711/tree/master/examples |
@gojimmypi, based on the information you shared, it looks like you updated VS Code, but not the C++ extension. Can you try doing that? The C++ extension is currently at version 0.10.5. |
@bobbrow The extension has been installing for hours now. Interestingly the version that it appears to have wanted to install is 0.8.1 and not 0.10.5?? (and older VSCode?) If you respond reletively soon, I can leave it running and provide additional info if helpful? Note this is on a different computer that my first report (I will check that one this evening). No other needed updates appear? (see attached or https://twitter.com/gojimmypi/status/849688234472779777) |
Our extension code doesn't execute during the Installing step shown in your screenshot. We have an additional install step that occurs afterwards but you are not getting that. You should update your VS Code to 1.10.2 or the 1.11.0-Insider's build. The latest version of our extension won't work with older versions of VS Code, which is why you're getting the older 0.8.1 version of cpptools. |
@sean-mcmanus ok, I have updated to 1.10.2 (the Complete C/C++ add-in was silently completely lost after I stopped the the prior update). Upon relaunching, I saw the VSCode update available banner. Upon reinstalling add-on all seems to be working properly - including the specific side-by-side example where I first saw the error Updating C/C++ dependencies... Downloading package 'C/C++ language components (Windows)' (2583 KB) .................... Done! Installing package 'C/C++ language components (Windows)' Finished |
Closing this issue. If you see continued crashes, please open a new issue and share callstacks if possible. Thanks! |
Moved from microsoft/vscode#18139
Steps to Reproduce:
The text was updated successfully, but these errors were encountered: