-
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
Language Server crash #10274
Comments
Hi @zeroxia . I moved your comment into a new issue. From your log, it looks like your issue is a crash that occurs immediately after an IntelliSense update. It should be possible to connect the debugger and catch the crash, to get a call stack. I just tried the instructions you referred so, and they worked properly for me with 1.13.7 (after updating the This might be the same issue as reported here: #10269 |
Also, if you're still not able to attach to get a calls stack, you may be able to configure your Linux OS generate a core dump file that has the call stack. |
Also, if it's a crash you should be seeing something like "Thread 13 "cpptools" received signal SIGSEGV, Segmentation fault." -- I'm not sure what could be triggering a SIGKILL. |
I'm not the original poster, but I'm seeing a similar issue. Unfortunately, the core dump is too large to attach. Uncompressed it's almost 400 MB; gzipped it was 43 MB and .xz isn't a permitted file format. Here's the output of
Let me know if you have a suggestion for how to provide this file. |
@ryanmda We don't need the entire core dump. Can you just run a command to get the call stack of the crashing thread from the core dump? |
Okay. Connecting with GDB and it reports:
And backtrace of what I believe is the correct thread:
|
That isn't a very usable call stack. It shows our main thread waiting on std::getline as normal with some C runtime exit handler running. Could another thread be calling an abort? I don't see where the segmentation fault is happening. |
Here's the output of
I grabbed thread 17's backtrace since that is a bit different. Let me know if you want another thread or if this helps.
|
I also ran |
I don't see any real work happening on those threads or where a crash is happening. When does this crash occur, i.e. repro steps? Are you shutting down or editing, etc.? |
It seems to just happen in the background as I'm doing normal work, or I notice it when I come back to my desk after something else. I haven't seen any obvious cause from my end. Maybe it's related to coming in/out of sleep on my machine? |
I feel that this might be my environment issue. So you may close this issue. The "SIGKILL" event always happen at "10 minute edge", e.g. 10:00:01, 10:10:02, 10:20:01, the second part might be 1 or 2. If I launch VSCode at 10:28:00, then at 10:30:xx, you expect the SIGKILL event. When cpptools is killed, there is message shown in VSCode:
And in output pane, at the dropdown menu, you have a new entry named "cpptools", selecting it will show the same message like this:
That is, every 10 minutes, I got a new "cpptools" entry added to the output pane. The environment is somewhat twisted, it's a Docker container from image based on Ubuntu 16.04, and inside the container, a "schroot" is set up to be Ubuntu 18.04. This is all in a company docker server. I feel that the SIGKILL is from the kernel, arised by some cron job scheduled every 10 minutes in that docker server. On another docker container which is native Ubuntu 18.04 and is running in remote docker server as well, I don't have this problem. Using gdb to attach to "cpptools" process, I'm unable to capture the call stack, as the signal is SIGKILL. I tried using systemtap or auditd to track the source of SIGKILL, but it does not work in this twisted environment. Anyway, thank you for your time. |
@zeroxia Okay, FYI cpptools does have a 5 minute terminate timeout if it detects that is dangling from a VS Code instance, but your issue seems different since it's 10 minutes. @ryanmda Your issue is different and seems like it might be caused by our 5 minute timeout code going off after your computer re-awakens from sleeping. I've created an issue to track that at #10362 . It's also possible there could be a crash on shutdown in that case due to how it handles the exiting, but the fact that it's trying to exit seems like the root cause. |
FYI, we're tracking the sigkill issue on cpptools at #11003 . |
The environment is a docker container running Ubuntu 18.04, and I use vscode to SSH-remotely connect to it.
Ever 10 minutes there is a pop up saying "Connection to server got closed. Server will not be restarted."
And in "Output" pane one "cpptools" window is added, this just keeps adding.
I tried to debug
cpptools
with attaching method described here:https://github.com/microsoft/vscode-cpptools/wiki/Attaching-debugger-to-cpptools-or-cpptools%E2%80%90srv
It is unable to capture the call stack. When crash happens, debugger console window says:
Program terminated with signal SIGKILL, Killed.
C/C++ debug log:
Pastebin log
Originally posted by @zeroxia in #10251 (comment)
The text was updated successfully, but these errors were encountered: