microsoft / microsoft/vscode-remote-release
Attach takes ~30s with --pid=host during existing host-agent discovery
@chrmarti is already working on this.
Since Aug 22, 2026.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 470
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Environment
- VS Code: 1.125.0 (
93cfdd489c3b228840d0f86ec77c3636277c93ea) - Dev Containers: 0.466.0
- Remote - SSH: 0.124.0
- Docker Engine: 28.5.2
- Host OS: openEuler 24.03 (LTS-SP1)
- Host kernel: Linux 6.6.0-72.0.0.76.oe2403sp1.aarch64
- Host architecture: ARM64
- Container OS: EulerOS 2.0 (SP10)
- Container PID mode:
host - PIDs visible inside the container: approximately 3123
Problem
Attaching to an already-running container pauses for about 30 seconds while Dev Containers scans /proc. The existing extension host agent is eventually reused, but finding it is slow when the container uses the host PID namespace.
Both host and container environment probes complete in under two seconds, and the log contains no userEnvProbe is taking longer than 2 seconds warning.
Reproduction
- Start a container with
--pid=hoston a host with a few thousand processes. - Attach with Dev Containers: Attach to Running Container.
- Close the VS Code window and attach to the same container again.
Relevant log
[3590 ms] userEnvProbe: loginInteractiveShell (default)
[3590 ms] Start: Run in container: test -f '/tmp/devcontainers-abf60913-7504-48c1-a924-6e417dba851c1787390954007/env-loginInteractiveShell.json'
[3600 ms]
[3600 ms]
[3600 ms] Exit code 1
[3600 ms] userEnvProbe: not found in cache
[3600 ms] userEnvProbe shell: /bin/bash
[3605 ms] Start: Run in container: echo ~
[3610 ms] Start: Run in container: # Test for /root/.ssh/known_hosts and ssh
[3658 ms] /root/.ssh/known_hosts exists
[3658 ms]
[3658 ms] Exit code 1
[3658 ms] Start: Run in container: command -v git >/dev/null 2>&1 && git config --system --replace-all credential.helper '!f() { /root/.vscode-server/bin/93cfdd489c3b228840d0f86ec77c3636277c93ea/node /tmp/vscode-remote-containers-eb9f888b-7a10-45ab-b16f-41616a3c0e4f.js git-credential-helper $*; }; f' || true
[3705 ms]
[3706 ms]
[3706 ms] Start: Run in container: for pid in `cd /proc && ls -d [0-9]*`; do { echo $pid ; readlink /proc/$pid/cwd || echo ; readlink /proc/$pid/ns/mnt || echo ; cat /proc/$pid/stat | tr "
[3775 ms] /root
[3776 ms]
[3776 ms] Start: Run in container: cat <<'EOF-/tmp/vscode-remote-containers-eb9f888b-7a10-45ab-b16f-41616a3c0e4f.js' >/tmp/vscode-remote-containers-eb9f888b-7a10-45ab-b16f-41616a3c0e4f.js
[3825 ms]
[3826 ms]
[3826 ms] Start: Run in container: cat <<'EOF-/tmp/vscode-remote-containers-server-eb9f888b-7a10-45ab-b16f-41616a3c0e4f.js' >/tmp/vscode-remote-containers-server-eb9f888b-7a10-45ab-b16f-41616a3c0e4f.js_1787390958387
[3878 ms]
[3878 ms]
[4102 ms] userEnvProbe PATHs:
Probe: '/root/miniconda3/condabin:/usr/local/Ascend/nnal/atb/latest/atb/cxx_abi_1/bin:/usr/local/Ascend/cann-8.5.0/bin:/usr/local/Ascend/cann-8.5.0/tools/ccec_compiler/bin:/usr/local/Ascend/cann-8.5.0/tools/profiler/bin:/usr/local/Ascend/cann-8.5.0/tools/ascend_system_advisor/asys:/usr/local/Ascend/cann-8.5.0/tools/show_kernel_debug_data:/usr/local/Ascend/cann-8.5.0/tools/msobjdump:/home/ma-user/anaconda3/envs/PyTorch-2.7.1/bin:/usr/local/Ascend/driver/tools:/usr/local/openmpi/bin:/usr/local/ffmpeg/bin:/usr/local/Ascend/toolbox/latest/Ascend-DMI/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/ma-user/.local/bin'
Container: '/home/ma-user/anaconda3/envs/PyTorch-2.7.1/bin:/usr/local/Ascend/driver/tools:/usr/local/openmpi/bin:/usr/local/ffmpeg/bin:/usr/local/Ascend/toolbox/latest/Ascend-DMI/bin:/usr/local/Ascend/ascend-toolkit/latest/bin:/usr/local/Ascend/ascend-toolkit/latest/compiler/ccec_compiler/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/ma-user/.local/bin'
Merged: '/root/miniconda3/condabin:/usr/local/Ascend/nnal/atb/latest/atb/cxx_abi_1/bin:/usr/local/Ascend/cann-8.5.0/bin:/usr/local/Ascend/cann-8.5.0/tools/ccec_compiler/bin:/usr/local/Ascend/cann-8.5.0/tools/profiler/bin:/usr/local/Ascend/cann-8.5.0/tools/ascend_system_advisor/asys:/usr/local/Ascend/cann-8.5.0/tools/show_kernel_debug_data:/usr/local/Ascend/cann-8.5.0/tools/msobjdump:/home/ma-user/anaconda3/envs/PyTorch-2.7.1/bin:/usr/local/Ascend/driver/tools:/usr/local/openmpi/bin:/usr/local/ffmpeg/bin:/usr/local/Ascend/toolbox/latest/Ascend-DMI/bin:/usr/local/Ascend/ascend-toolkit/latest/bin:/usr/local/Ascend/ascend-toolkit/latest/compiler/ccec_compiler/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/ma-user/.local/bin'
[33404 ms] Start: Run in container: mkdir -p '/tmp/devcontainers-abf60913-7504-48c1-a924-6e417dba851c1787390954007' && cat > '/tmp/devcontainers-abf60913-7504-48c1-a924-6e417dba851c1787390954007/env-loginInteractiveShell.json' << 'envJSON'
[33478 ms]
[33478 ms]
[33479 ms] Start: Run in container: cat '/root/.vscode-server/bin/93cfdd489c3b228840d0f86ec77c3636277c93ea/product.json'
[33492 ms] Start: Run in container: readlink -f '/root/.vscode-server/bin/93cfdd489c3b228840d0f86ec77c3636277c93ea'
[33538 ms] /root/.vscode-server/bin/93cfdd489c3b228840d0f86ec77c3636277c93ea
[33538 ms]
[33539 ms] Extension host agent is already running.
The gap from the /proc scan starting to the next setup command is approximately 29.7 seconds.
Enumerating /proc itself is fast on this host; the delay is specific to the per-PID shell scan used during extension host-agent discovery.
Expected behavior
Discovering an existing extension host agent should not require tens of seconds when the container uses --pid=host.
Related: https://github.com/microsoft/vscode-remote-release/issues/10857 documents the /proc scan used to find reusable host agents.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.