Skip to content
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

VS Code becomes unresponsive inside Docker container #44385

Closed
davefinster opened this issue Feb 26, 2018 · 13 comments
Closed

VS Code becomes unresponsive inside Docker container #44385

davefinster opened this issue Feb 26, 2018 · 13 comments
Assignees
Labels
freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues info-needed Issue requires more information from poster

Comments

@davefinster
Copy link

Steps to Reproduce:

  1. Open VS Code to my current project (reasonable C++ project)
  2. Right click on a symbol and select "Show Declaration"
    VS Code becomes unresponsive with this printed in the console (running --verbose)
Server response: <?xml version="1.0" encoding="UTF-8"
[VS Code]: detected unresponsive

Does this issue occur when all extensions are disabled?: Yes - produces this output and crashes immediately upon launch.

To provide some background, this instance of VS Code is running inside a Debian docker container with the following parameters:

docker run --net=host --name container -i -t -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --privileged --restart unless-stopped <image-name>

I'm not sure how to debug this further and determine why VS Code has become unresponsive.

@kdkeyser
Copy link

I run into the same issue. Behaviour seen both with C++ as well as a Haskell project, so likely unrelated to the plugins. Same project/plugins running natively (so not in docker) works fine.

@weinand
Copy link
Contributor

weinand commented Feb 26, 2018

This issue was moved to microsoft/vscode-cpptools#1610

@weinand weinand closed this as completed Feb 26, 2018
@sean-mcmanus
Copy link
Contributor

sean-mcmanus commented Feb 26, 2018

@weinand We don't think this is a vscode-cpptools issue. The user is reproing it without any extensions installed.

@weinand weinand reopened this Feb 26, 2018
@weinand weinand removed their assignment Feb 26, 2018
@bpasero
Copy link
Member

bpasero commented Feb 27, 2018

@chrisdias @chrmarti did you ever run VS Code like that in a docker container?

@bpasero bpasero added info-needed Issue requires more information from poster freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues labels Feb 27, 2018
@chrmarti
Copy link
Contributor

No. Some of the later errors are related to the GPU (or its absence). Try running with --disable-gpu and let us know what the output is.

@davefinster
Copy link
Author

Apologies for the delay in responding. The output from code --verbose --disable-gpu can be found here

@chrmarti
Copy link
Contributor

chrmarti commented Mar 2, 2018

I see ENOSPC in there, try these instructions: https://code.visualstudio.com/docs/setup/linux#_error-enospc

@davefinster
Copy link
Author

Just increased the watch limit and while those errors disappeared, the same issue has reoccured.

The last two lines of the console output were:

Server response: <?xml version="1.0" encoding="UTF-8"
�[91m[main 2:09:42 AM]�[0m [VS Code]: detected unresponsive

as before. Full output is here

@chrmarti
Copy link
Contributor

chrmarti commented Mar 2, 2018

Not sure who tried, but I think someone had it running in Docker. @Tyriar ?

@davefinster
Copy link
Author

davefinster commented Mar 3, 2018

So something interesting I just observed - I attempted to toggle developer tools within VS Code to see if I could get a timeline or any other info when a hang occurred. When I triggered the developer tools, the window would appear but as soon as I moved my mouse out of the dev tool area, it went blank with a background the same colour as the rest of the window.

The log output is available here but I did notice the following:

[1773:0303/005920.516068:WARNING:x11_util.cc(1360)] X error received: serial 3959, error_code 3 (BadWindow (invalid Window parameter)), request_code 3, minor_code 0 (X_GetWindowAttributes)
[1773:0303/005920.516181:WARNING:x11_util.cc(1360)] X error received: serial 4019, error_code 3 (BadWindow (invalid Window parameter)), request_code 3, minor_code 0 (X_GetWindowAttributes)
[1773:0303/005920.516192:WARNING:x11_util.cc(1360)] X error received: serial 4079, error_code 3 (BadWindow (invalid Window parameter)), request_code 3, minor_code 0 (X_GetWindowAttributes)

I then toggled the dev tools are few more times and it eventually caused VS Code to crash without a minidump.

@davefinster
Copy link
Author

davefinster commented Mar 3, 2018

The lack of a minidump actually led me to this issue in the Atom project: atom/atom#8684

I've rebuilt the container while adding --ipc host -v /dev/shm:/dev/shm and I haven't had a hang yet. The dev tools still crash when toggled for the second time (but they don't disappear now).

The last comment on this issue does a better job of explaining it: cypress-io/cypress#350 - namely Docker has a default of 64MB of shared memory per container which is perhaps getting exhausted (since I"m running C++ extensions on a fairly large project) thereby causing a hang.

@Tyriar
Copy link
Member

Tyriar commented Mar 4, 2018

We never really supported this, it's a feature request imo. I've closed a similar issue in the past as out of scope #27284 when we cleaned up the backlog.

@vscodebot vscodebot bot closed this as completed Mar 11, 2018
@vscodebot
Copy link

vscodebot bot commented Mar 11, 2018

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

7 participants