Skip to content

Crashes while attaching VS Code container to running container #6259

Description

@shardulkumar79

I am running open source code in a docker container and trying to connect vscode to that.

  • VS Code Version:
  • OS Version: Ubuntu 20

Steps to Reproduce:

  1. clone the project repo git clone "https://gerrit.o-ran-sc.org/r/ric-plt/submgr" which has docker config as well.
  2. create necessary .devcontainer.josn file in project root path. Now open vscode from the folder. It has multiple error exits.
`t: Resolving Remote
[64 ms] Setting up container: /zen_hugle
[69 ms] Start: Run: docker inspect --type container /zen_hugle
[105 ms] Start: Check Docker is running
[106 ms] Start: Run: docker version --format {{.Server.APIVersion}}
[161 ms] Server API version: 1.41
[162 ms] Start: Inspecting container
[162 ms] Start: Run: docker inspect --type container 5f86e464bff26f794d55499d35e18c186e655d3709173be7697176b2a4402176
[198 ms] Start: Run in container: /bin/sh
[201 ms] Start: Run in container: uname -m
[280 ms] x86_64
[280 ms] 
[280 ms] Start: Run in container: (cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null
[282 ms] NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
[282 ms] 
[282 ms] Start: Run in container: cat /etc/passwd
[285 ms] Start: Run in container: test -d /root/.vscode-server
[286 ms] 
[286 ms] 
[286 ms] Start: Run in container: test ! -f '/root/.vscode-server/data/Machine/.writeMachineSettingsMarker' && set -o noclobber && mkdir -p '/root/.vscode-server/data/Machine' && { > '/root/.vscode-server/data/Machine/.writeMachineSettingsMarker' ; } 2> /dev/null
[287 ms] 
[287 ms] 
[287 ms] Exit code 1
[288 ms] Start: Run in container: cat /root/.vscode-server/data/Machine/settings.json
[289 ms] 
[289 ms] cat: /root/.vscode-server/data/Machine/settings.json: No such file or directory
[289 ms] Exit code 1
[290 ms] Start: Run in container: test -d /root/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3
[291 ms] 
[291 ms] 
[291 ms] Exit code 1
[292 ms] Installing VS Code Server for commit 899d46d82c4c95423fb7e10e68eba52050e30ba3
[292 ms] Start: Downloading VS Code Server
[293 ms] 899d46d82c4c95423fb7e10e68eba52050e30ba3 linux-x64 stable 
[913594 ms] Start: Installing VS Code Server
[913595 ms] Start: Run in container: mkdir -p /root/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3_1643291354534
[913601 ms] 
[913602 ms] 
[913718 ms] Start: Run in container: (dd iflag=fullblock bs=8192 count=6542 2>/dev/null; dd iflag=fullblock bs=3733 count=1 2>/dev/null) | tar --no-same-owner -xz -C /root/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3_1643291354534
[916818 ms] 
[916818 ms] 
[916819 ms] Start: Run in container: mv -n /root/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3_1643291354534/* /root/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3 && rmdir /root/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3_1643291354534
[916826 ms] 
[916827 ms] 
[916828 ms] Start: Launching Remote-Containers helper.
[916829 ms] ssh-agent: SSH_AUTH_SOCK in container (/tmp/vscode-ssh-auth-b33b309ad2ab0c801b7e9e5c2937d02d5c4f518c.sock) forwarded to local host (/run/user/1000/keyring/ssh).
[916829 ms] Start: Run: gpgconf --list-dir agent-extra-socket
[916839 ms] /run/user/1000/gnupg/S.gpg-agent.extra
[916839 ms] 
[916839 ms] Start: Run in container: gpgconf --list-dir agent-socket
[916841 ms] 
[916841 ms] /bin/sh: 11: gpgconf: not found
[916842 ms] Exit code 127
[916843 ms] Start: Run in container: /bin/sh
[916851 ms] userEnvProbe: loginInteractiveShell (default)
[916856 ms] userEnvProbe shell: /bin/bash
[916867 ms] Start: Run in container: cat <<'EOF-/tmp/vscode-remote-containers-b33b309ad2ab0c801b7e9e5c2937d02d5c4f518c.js' >/tmp/vscode-remote-containers-b33b309ad2ab0c801b7e9e5c2937d02d5c4f518c.js
[916874 ms] Start: Run in container: # Test for /root/.ssh/known_hosts and ssh
[916885 ms] ssh not found
[916886 ms] 
[916886 ms] Exit code 1
[916887 ms] Start: Run in container: command -v git >/dev/null 2>&1 && git config --system --replace-all credential.helper '!f() { /root/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node /tmp/vscode-remote-containers-b33b309ad2ab0c801b7e9e5c2937d02d5c4f518c.js $*; }; f' || true
[916893 ms] 
[916893 ms] 
[916894 ms] Start: Preparing Extensions
[916899 ms] Start: Run in container: test ! -f '/root/.vscode-server/data/Machine/.installExtensionsMarker' && set -o noclobber && mkdir -p '/root/.vscode-server/data/Machine' && { > '/root/.vscode-server/data/Machine/.installExtensionsMarker' ; } 2> /dev/null
[916901 ms] 
[916902 ms] 
[916908 ms] Extensions cache, install extensions: None
[916908 ms] Start: Run in container: test -d /root/.vscode-server/extensionsCache && ls /root/.vscode-server/extensionsCache || true
[916909 ms] 
[916910 ms] 
[916914 ms] Extensions cache, copy to remote: None
[916914 ms] Start: Run in container: for pid in `cd /proc && ls -d [0-9]*`; do { echo $pid ; readlink /proc/$pid/cwd ; readlink /proc/$pid/ns/mnt ; cat /proc/$pid/stat | tr "
[916993 ms] Start: Starting VS Code Server
[917107 ms] 
[917108 ms] 
[917108 ms] Start: Run in container: cat <<'EOF-/tmp/vscode-remote-containers-server-b33b309ad2ab0c801b7e9e5c2937d02d5c4f518c.js' >/tmp/vscode-remote-containers-server-b33b309ad2ab0c801b7e9e5c2937d02d5c4f518c.js_1643291358047
[917125 ms] 
[917125 ms] 
[917143 ms] Start: Run in Container: /root/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/server.sh --log debug --force-disable-user-env --use-host-proxy --port 0 --extensions-download-dir /root/.vscode-server/extensionsCache --start-server --disable-websocket-compression
[917404 ms] 

*
* Visual Studio Code Server
*
* Reminder: You may only use this software with Visual Studio family products,
* as described in the license https://aka.ms/vscode-remote/license
*

Extension host agent listening on 42325

[917405 ms] Start: Run in container: echo 42325 >'/root/.vscode-server/data/Machine/.devport-899d46d82c4c95423fb7e10e68eba52050e30ba3'
[917406 ms] 
[917406 ms] 
[917407 ms] Port forwarding for container port 42325 starts listening on local port.
[917410 ms] Port forwarding local port 42325 to container port 42325
[917411 ms] Start: Run in container: test ! -f '/root/.vscode-server/data/Machine/.onCreateCommandMarker' && set -o noclobber && mkdir -p '/root/.vscode-server/data/Machine' && { > '/root/.vscode-server/data/Machine/.onCreateCommandMarker' ; } 2> /dev/null
[917421 ms] userEnvProbe PATHs:
Probe:     '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
Container: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
Merged:    '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
[917423 ms] 
[917423 ms] 
[917424 ms] Start: Run in container: test ! -f '/root/.vscode-server/data/Machine/.updateContentCommandMarker' && set -o noclobber && mkdir -p '/root/.vscode-server/data/Machine' && { > '/root/.vscode-server/data/Machine/.updateContentCommandMarker' ; } 2> /dev/null
[917427 ms] 
[917428 ms] 
[917428 ms] Start: Run in container: test ! -f '/root/.vscode-server/data/Machine/.postCreateCommandMarker' && set -o noclobber && mkdir -p '/root/.vscode-server/data/Machine' && { > '/root/.vscode-server/data/Machine/.postCreateCommandMarker' ; } 2> /dev/null
[917431 ms] Start: Run in container: /bin/sh -c # Watch installed extensions
[917433 ms] Start: Run in container: /bin/sh -c # Watch machine settings
[917536 ms] 
[917540 ms] 
[917549 ms] Start: Run in container: command -v git >/dev/null 2>&1 && git config --global --replace-all credential.helper '!f() { /root/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node /tmp/vscode-remote-containers-b33b309ad2ab0c801b7e9e5c2937d02d5c4f518c.js $*; }; f' || true
[917625 ms] 
[917625 ms] 
[917633 ms] Start: Run in container: mkdir -p '/root/.vscode-server/data/Machine' && [ "$(cat '/root/.vscode-server/data/Machine/.postStartCommandMarker' 2>/dev/null)" != '2022-01-27T13:16:41.401270814Z' ] && echo '2022-01-27T13:16:41.401270814Z' > '/root/.vscode-server/data/Machine/.postStartCommandMarker'
[917667 ms] Port forwarding connection from 47428 > 42325 > 42325 in the container.
[917676 ms] Start: Run in container: /root/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node -e 
[917758 ms] 
[917759 ms] 
[917904 ms] [13:49:18] Extension host agent started.
[918783 ms] Port forwarding connection from 47432 > 42325 > 42325 in the container.
[918784 ms] Start: Run in container: /root/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node -e 
[919066 ms] [13:49:20] [::ffff:127.0.0.1][18dea54c][ManagementConnection] New connection established.
[919713 ms] [13:49:20] [::ffff:127.0.0.1][a4567d34][ExtensionHostConnection] New connection established.
[919722 ms] [13:49:20] [::ffff:127.0.0.1][a4567d34][ExtensionHostConnection] <274> Launched Extension Host Process.
[926920 ms] Extensions cache, remote removals: None
[978544 ms] Start: Run in container: /bin/sh -c # Watch installed extensions
[978731 ms] Start: Run in container: /bin/sh -c # Watch machine settings
[986927 ms] Extensions cache, remote removals: None
[1039078 ms] Start: Run in container: /bin/sh -c # Watch installed extensions
[1039256 ms] Start: Run in container: /bin/sh -c # Watch machine settings
[1046934 ms] Extensions cache, remote removals: None
[1099652 ms] Start: Run in container: /bin/sh -c # Watch installed extensions
[1099836 ms] Start: Run in container: /bin/sh -c # Watch machine settings
[1106943 ms] Extensions cache, remote removals: None
[1160226 ms] Start: Run in container: /bin/sh -c # Watch installed extensions
[1160427 ms] Start: Run in container: /bin/sh -c # Watch machine settings
[1166955 ms] Extensions cache, remote removals: None
[1220655 ms] Start: Run in container: /bin/sh -c # Watch installed extensions
[1220891 ms] Start: Run in container: /bin/sh -c # Watch machine settings
[1226960 ms] Extensions cache, remote removals: None
[1281137 ms] Start: Run in container: /bin/sh -c # Watch installed extensions
[1281379 ms] Start: Run in container: /bin/sh -c # Watch machine settings
[1286966 ms] Extensions cache, remote removals: None
[1341610 ms] Start: Run in container: /bin/sh -c # Watch installed extensions
[1341959 ms] Start: Run in container: /bin/sh -c # Watch machine settings
[1346973 ms] Extensions cache, remote removals: None`

Metadata

Metadata

Labels

info-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions