Vscode-remote-release: Segmentation fault. VS Code Server for WSL closed unexpectedly.

Created on 22 Aug 2020  ·  12Comments  ·  Source: microsoft/vscode-remote-release


Steps to Reproduce:

[2020-08-22 15:37:43.824] Resolving wsl+Ubuntu-20.04, resolveAttempt: 1
[2020-08-22 15:37:43.870] Starting VS Code Server inside WSL (Ubuntu-20.04)
[2020-08-22 15:37:43.870] Extension version: 0.44.4, Windows build: 20170. Multi distro support: available. WSL path support: enabled
[2020-08-22 15:37:44.010] Probing if server is already installed: C:\WINDOWS\System32\wsl.exe -d Ubuntu-20.04 -e sh -c "[ -d ~/.vscode-server/bin/3dd905126b34dcd4de81fa624eb3a8cbe7485f13 ] && printf found || ([ -f /etc/alpine-release ] && printf alpine-; uname -m)"
[2020-08-22 15:38:02.786] Probing result: found
[2020-08-22 15:38:02.786] Server install found in WSL
[2020-08-22 15:38:02.787] Launching C:\WINDOWS\System32\wsl.exe -d Ubuntu-20.04 sh -c '"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" 3dd905126b34dcd4de81fa624eb3a8cbe7485f13 stable .vscode-server 0 ' in c:\Users\Denny.vscode\extensions\ms-vscode-remote.remote-wsl-0.44.4}
[2020-08-22 15:38:04.636] Setting up server environment: Looking for /home/yaokai/.vscode-server/server-env-setup. Not found.
[2020-08-22 15:38:04.948] WSL version: 4.19.104-microsoft-standard Ubuntu-20.04
[2020-08-22 15:38:05.262] WSL2-shell-PID: 12
[2020-08-22 15:38:05.262] Starting server: /home/yaokai/.vscode-server/bin/3dd905126b34dcd4de81fa624eb3a8cbe7485f13/server.sh --port=0 --use-host-proxy --enable-remote-auto-shutdown
[2020-08-22 15:38:07.232] Segmentation fault
[2020-08-22 15:38:07.233] VS Code Server for WSL closed unexpectedly.
[2020-08-22 15:38:07.233] For help with startup problems, go to
[2020-08-22 15:38:07.233] https://code.visualstudio.com/docs/remote/troubleshooting#_wsl-tips
[2020-08-22 15:38:07.770] WSL Daemon exited with code 0

Does this issue occur when you try this locally?: Yes

wsl

All 12 comments

Maybe related to https://github.com/microsoft/vscode-remote-release/issues/3117 is similar.

  • In the settings, can you set "remote.WSL.debug": true. The WSL log will contain more information. if you can paste it again that would be great.

[2020-08-24 14:04:30.010] Resolving wsl+Ubuntu-20.04, resolveAttempt: 1
[2020-08-24 14:04:30.067] Starting VS Code Server inside WSL (Ubuntu-20.04)
[2020-08-24 14:04:30.067] Extension version: 0.44.4, Windows build: 20170. Multi distro support: available. WSL path support: enabled
[2020-08-24 14:04:31.655] Probing result: found
[2020-08-24 14:04:31.656] Server install found in WSL
[2020-08-24 14:04:31.656] Launching C:\WINDOWS\System32\wsl.exe -d Ubuntu-20.04 sh -c 'env && VSCODE_WSL_DEBUG_INFO=true "$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" 3dd905126b34dcd4de81fa624eb3a8cbe7485f13 stable .vscode-server 0 ' in c:\Users\Denny.vscode\extensions\ms-vscode-remote.remote-wsl-0.44.4, env: {
[2020-08-24 14:04:31.656] "VSCODE_WSL_EXT_LOCATION": "c:\Users\Denny\.vscode\extensions\ms-vscode-remote.remote-wsl-0.44.4",
[2020-08-24 14:04:31.656] "WSLENV": "VSCODE_WSL_EXT_LOCATION/up"
[2020-08-24 14:04:31.656] }}
[2020-08-24 14:04:31.839] USER=yaokai
[2020-08-24 14:04:31.839] VSCODE_WSL_EXT_LOCATION=/mnt/c/Users/Denny/.vscode/extensions/ms-vscode-remote.remote-wsl-0.44.4
[2020-08-24 14:04:31.839] SHLVL=0
[2020-08-24 14:04:31.839] HOME=/home/yaokai
[2020-08-24 14:04:31.839] WSL_DISTRO_NAME=Ubuntu-20.04
[2020-08-24 14:04:31.839] LOGNAME=yaokai
[2020-08-24 14:04:31.839] NAME=小可爱
[2020-08-24 14:04:31.839] WSL_INTEROP=/run/WSL/10_interop
[2020-08-24 14:04:31.839] _=/usr/bin/sh
[2020-08-24 14:04:31.839] TERM=xterm-256color
[2020-08-24 14:04:31.839] PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/iCLS/:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/iCLS/:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/My/CS/anaconda/Scripts:/mnt/c/My/Software/matlab/bin/win32:/mnt/c/My/CS/Git/cmd:/mnt/c/My/Software/mitex/miktex/bin/x64/:/mnt/c/My/CS/anaconda3/Library/bin:/mnt/c/My/Software/chromeDriver:/mnt/c/My/CS/mingw64/mingw64/bin:/mnt/c/Windows/System32/Npcap:/mnt/c/My/CS/mysql-5.7.19-winx64:/mnt/c/Program Files/nodejs/:/mnt/c/Program Files (x86)/Yarn/bin/:/mnt/c/Program Files/Java/jdk-14.0.1/bin:/mnt/c/My/CS/apache-maven-3.6.0/bin:/mnt/c/My/CS/iverilog/bin:/mnt/c/My/CS/anaconda3:/mnt/c/My/CS/anaconda3/Library/mingw-w64/bin:/mnt/c/My/CS/anaconda3/Library/usr/bin:/mnt/c/My/CS/anaconda3/Scripts:/mnt/c/Users/Denny/AppData/Local/Microsoft/WindowsApps:/mnt/c/My/CS/Microsoft VS Code/bin:/mnt/c/Users/Denny/AppData/Roaming/npm:/mnt/c/Users/Denny/AppData/Local/Yarn/bin:/mnt/c/Users/Denny/AppData/Local/Pandoc/:/mnt/c/My/CS/iverilog/gtkwave/bin
[2020-08-24 14:04:31.839] LANG=C.UTF-8
[2020-08-24 14:04:31.839] SHELL=/bin/bash
[2020-08-24 14:04:31.839] PWD=/mnt/c/Users/Denny/.vscode/extensions/ms-vscode-remote.remote-wsl-0.44.4
[2020-08-24 14:04:31.839] HOSTTYPE=x86_64
[2020-08-24 14:04:31.839] WSLENV=VSCODE_WSL_EXT_LOCATION/up
[2020-08-24 14:04:31.839] Setting up server environment: Looking for /home/yaokai/.vscode-server/server-env-setup. Not found.
[2020-08-24 14:04:31.839] WSL version: 4.19.104-microsoft-standard Ubuntu-20.04
[2020-08-24 14:04:31.839] WSL2-shell-PID: 13
[2020-08-24 14:04:31.839] Starting server: /home/yaokai/.vscode-server/bin/3dd905126b34dcd4de81fa624eb3a8cbe7485f13/server.sh --port=0 --use-host-proxy --enable-remote-auto-shutdown
[2020-08-24 14:04:31.842] + [ ! -d /home/yaokai/.vscode-server ]
[2020-08-24 14:04:31.842] + CODE_PROFILE=/home/yaokai/.vscode-server/server-env-setup
[2020-08-24 14:04:31.842] + printf Setting up server environment: Looking for %s. /home/yaokai/.vscode-server/server-env-setup
[2020-08-24 14:04:31.842] + [ -f /home/yaokai/.vscode-server/server-env-setup ]
[2020-08-24 14:04:31.842] + echo Not found.
[2020-08-24 14:04:31.842] + VSCODE_REMOTE_BIN=/home/yaokai/.vscode-server/bin
[2020-08-24 14:04:31.842] + uname -r
[2020-08-24 14:04:31.842] + WSL_VERSION=4.19.104-microsoft-standard
[2020-08-24 14:04:31.842] + echo WSL version: 4.19.104-microsoft-standard Ubuntu-20.04
[2020-08-24 14:04:31.842] + dirname /mnt/c/Users/Denny/.vscode/extensions/ms-vscode-remote.remote-wsl-0.44.4/scripts/wslServer.sh
[2020-08-24 14:04:31.842] + /mnt/c/Users/Denny/.vscode/extensions/ms-vscode-remote.remote-wsl-0.44.4/scripts/wslDownload.sh 3dd905126b34dcd4de81fa624eb3a8cbe7485f13 stable /home/yaokai/.vscode-server/bin
[2020-08-24 14:04:31.842] + [ ! -d /home/yaokai/.vscode-server/bin/3dd905126b34dcd4de81fa624eb3a8cbe7485f13 ]
[2020-08-24 14:04:31.842] + RC=0
[2020-08-24 14:04:31.842] + [ 0 -ne 0 ]
[2020-08-24 14:04:31.842] + SERVER_ARGS=
[2020-08-24 14:04:31.842] + echo WSL2-shell-PID: 13
[2020-08-24 14:04:31.842] + SERVER_ARGS=--enable-remote-auto-shutdown
[2020-08-24 14:04:31.842] + echo Starting server: /home/yaokai/.vscode-server/bin/3dd905126b34dcd4de81fa624eb3a8cbe7485f13/server.sh --port=0 --use-host-proxy --enable-remote-auto-shutdown
[2020-08-24 14:04:31.842] + [ -f /etc/alpine-release ]
[2020-08-24 14:04:31.842] + uname -m
[2020-08-24 14:04:31.842] + [ x86_64 = aarch64 ]
[2020-08-24 14:04:31.842] + export VSCODE_AGENT_FOLDER=/home/yaokai/.vscode-server
[2020-08-24 14:04:31.842] + /home/yaokai/.vscode-server/bin/3dd905126b34dcd4de81fa624eb3a8cbe7485f13/server.sh --port=0 --use-host-proxy --enable-remote-auto-shutdown
[2020-08-24 14:04:31.842] Segmentation fault
[2020-08-24 14:04:31.843] VS Code Server for WSL closed unexpectedly.
[2020-08-24 14:04:31.843] For help with startup problems, go to
[2020-08-24 14:04:31.843] https://code.visualstudio.com/docs/remote/troubleshooting#_wsl-tips
[2020-08-24 14:04:31.846] C:\WINDOWS\System32\wsl.exe -d Ubuntu-20.04 -e kill 13
[2020-08-24 14:04:32.125] WSL Daemon exited with code 0

Maybe related to #3117 is similar.

  • In the settings, can you set "remote.WSL.debug": true. The WSL log will contain more information. if you can paste it again that would be great.

Thank you! I have solved it by renaming ".vscode-server" to ".vscode-server.bak".

That's interesting. Would you mind finding out what folder inside".vscode-server" caused that? Typically there are folders bin (the server binary), data (user settings and extension data) and extension (server extension).
If you could rename them one by one, that would be helpful.
If it's the bin folder, a binary diff of the bin/3dd905126b34dcd4de81fa624eb3a8cbe7485f13 folder `would be interesting.

That's interesting. Would you mind finding out what folder inside".vscode-server" caused that? Typically there are folders bin (the server binary), data (user settings and extension data) and extension (server extension).
If you could rename them one by one, that would be helpful.
If it's the bin folder, a binary diff of the bin/3dd905126b34dcd4de81fa624eb3a8cbe7485f13 folder `would be interesting.

yaokai@小可爱:~/.vscode-server$ git diff bin bin_
diff --git a/bin/3dd905126b34dcd4de81fa624eb3a8cbe7485f13/node b/bin/3dd905126b34dcd4de81fa624eb3a8cbe7485f13/node
index 1c1a3ee..f404ac6 100755
Binary files a/bin/3dd905126b34dcd4de81fa624eb3a8cbe7485f13/node and b/bin/3dd905126b34dcd4de81fa624eb3a8cbe7485f13/node differ

Thank you very much!
Was the version 3dd905126b34dcd4de81fa624eb3a8cbe7485f13 always broken for you, or did this start after an update of WSL or Ubuntu (I'm doing wild guesses here).

Thank you very much!
Was the version 3dd905126b34dcd4de81fa624eb3a8cbe7485f13 always broken for you, or did this start after an update of WSL or Ubuntu (I'm doing wild guesses here).

I can use it just a few days ago, I don't know if my wsl or ubuntu have updated.

Thank you very much!
Was the version 3dd905126b34dcd4de81fa624eb3a8cbe7485f13 always broken for you, or did this start after an update of WSL or Ubuntu (I'm doing wild guesses here).

It doesn't have anything to do with the wsl or ubuntu updates.
I've just been able to reproduce it on couple of different servers after updating the VSCode to the latest version.
Different computer with the previous VScode version is connecting fine to the same machines, the most recent one that run into Segmentation Fault.

I've downgrade it to an older version (on the computer that had this issue) and everything works fine...

@alexburlacu Thanks. I was having same issue after recent VSCode Update 1.48.1 of July. I downgraded to 1.47.1 June and now it works fine. However, It is just temp fix for now. Also disable automatic updates in VSCode settings.

In the meantime, 1.48.2 has been released. It doesn't contain a particular fix for this issue, but I wonder if was just bad bits for 1.48.1 that caused the issue.

If you still see this, you can help us getting the core file. This is how you have to so it:

In a window command prompt run

  • code --locate-extension ms-vscode-remote.remote-wsl
  • cd to the path that is returned
  • code .\scripts\wslServer.sh
  • On the 3rd last line (before export VSCODE_AGENT_FOLDER="$HOME/$DATAFOLDER"), add
    ulimit -C unlimited

Then start the remote window with the remote server, wait for the segmentation fault.

The core file will be in the extension folder from above. If you can send it that would be great.

Closing until more information is available.

Was this page helpful?
0 / 5 - 0 ratings