vscode crashes if --user-data-dir specifies a mounted windows folder on docker

Created on 6 Jun 2017  路  13Comments  路  Source: microsoft/vscode

  • VSCode Version:
vscode # code --version --user-data-dir='.'
1.12.2
19222cdc84ce72202478ba1cec5cb557b71163de
vscode # 
  • OS Version: centos:7 latest. docker for windows 17.03. windows 10.

Steps to Reproduce:

  1. run vscode as root inside a docker container based on centos:7, through docker for windows 10.
  2. navigate to a windows folder which is mounted inside the container. e.g: /d/my/wonderful/vsconfig
  3. run code --verbose --user-data-dir='.' (because you have to specify this option if running as root, sadly).
  4. watch vscode throw the following exception:
[3026:0606/142904.665818:ERROR:bus.cc(427)] Failed to connect to the bus: Failed to connect to socket /host/run/dbus/system_bus_socket: No such file or directory
[3026:0606/142904.676818:WARNING:audio_manager.cc(317)] Multiple instances of AudioManager detected
[3026:0606/142904.676836:WARNING:audio_manager.cc(278)] Multiple instances of AudioManager detected
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
[3050:0606/142904.709056:ERROR:gl_context_glx.cc(240)] Couldn't make context current with X drawable.
[3050:0606/142904.709130:ERROR:gpu_info_collector.cc(55)] gl::GLContext::MakeCurrent() failed
[3050:0606/142904.709138:ERROR:gpu_info_collector.cc(118)] Could not create context for info collection.
[3050:0606/142904.709143:ERROR:gpu_init.cc(85)] gpu::CollectGraphicsInfo failed (fatal).
[3050:0606/142904.715748:WARNING:x11_util.cc(1406)] X error received: serial 67, error_code 2 (BadValue (integer parameter out of range for operation)), request_code 149, minor_code 24 (X_GLXCreateNewContext)
[3050:0606/142904.719870:WARNING:x11_util.cc(1406)] X error received: serial 68, error_code 151 (GLXBadContext), request_code 149, minor_code 5 (X_GLXMakeCurrent)
[3050:0606/142904.723357:WARNING:x11_util.cc(1406)] X error received: serial 68, error_code 0 (0), request_code 149, minor_code 26 (X_GLXMakeContextCurrent)
[3050:0606/142904.723528:ERROR:gpu_child_thread.cc(327)] Exiting GPU process due to errors during initialization
[3050:0606/142904.727255:WARNING:x11_util.cc(1406)] X error received: serial 69, error_code 151 (GLXBadContext), request_code 149, minor_code 4 (X_GLXDestroyContext)
Error: listen EPERM /d/corebench/user/vscode/1.12.2-main.sock
    at Object.exports._errnoException (util.js:1022:11)
    at exports._exceptionWithHostPort (util.js:1045:20)
    at Server._listen2 (net.js:1249:19)
    at listen (net.js:1298:10)
    at Server.listen (net.js:1382:7)
    at /usr/share/code/resources/app/out/vs/code/electron-main/main.js:4:108213
    at new n.Class.derive._oncancel (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:4:68936)
    at Object.p [as serve] (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:4:108143)
    at o (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:4:316311)
    at x (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:4:317382)

  1. cry 馃槶
electron freeze-slow-crash-leak linux under-discussion upstream

Most helpful comment

@ninrod Try spawning with XDG_RUNTIME_DIR set to a path where the unix sockets can be created.

All 13 comments

+1

The main problem here is that vscode tries to create a linux socket inside the --user-data-dir folder.

If this folder happens to actually be an NTFS folder mounted into the container, then the socket will not be created because ntfs does not support unix sockets.

I think the simplest solution would be to allow the user to specify an alternative folder for the unix sockets to be created.

Closing this as designed. It sounds like you can just put the user data dir on a non-nfts drive as the workaround.

No I cannot in docker for windows because the only permanent storage I have access to are the /c and /d drives which are NTFS drives because I'm in a windows host. Please reopen.

@ninrod we need unix sockets though afaik. @bpasero might know more about what they're used for specifically?

@Tyriar, using unix sockets is fine, really. I just want an option for them to be created elsewhere. Now they are hardcoded to be created in --user-data-dir. But I need --user-data-dir to point to a NTFS mounted volume because I want it to be persistent across container restarts.

@Tyriar, with the above answers, can you reopen and re-add the bug label, please?

Regardless of the use case above, it'd be nice to at least put the sockets into a folder somewhere to get them out of the top level - when I open my data folder it's full of a bunch *-shared.sock files which distracts from the more interesting stuff

I propose that this "somewhere" could eventually be in some standard socket directory like /var/run/code/*.sock.

@joaomoreno this might be better under you? I would probably close this off as out of scope but you might have different plans?

@ninrod Try spawning with XDG_RUNTIME_DIR set to a path where the unix sockets can be created.

right, I'll try this later today.

@joaomoreno, this fixes the issue, thank you very much.

Was this page helpful?
0 / 5 - 0 ratings