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

Connecting to long running Dev Container takes extremely long time #1243

Open
ryxli opened this issue Jan 16, 2025 · 0 comments
Open

Connecting to long running Dev Container takes extremely long time #1243

ryxli opened this issue Jan 16, 2025 · 0 comments

Comments

@ryxli
Copy link

ryxli commented Jan 16, 2025

This is connecting to a persistent docker container I manually started, and then attaching to the container via the remote explorer. I am working inside this container for a lengthy period of time, which is started with CMD like:

            "Cmd": [
                "/bin/bash",
                "-c",
                "tail -f /dev/null"
            ],

Over time, the number of defunct processes grows within the container. When I attempt to reconnect to the container, there is a significant bottleneck in the following steps:

[23089 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 "
[23864 ms] 
[23864 ms] 
[26440 ms] userEnvProbe PATHs:
...
...

[279891 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 "
...
...
[532731 ms] Start: Run in container: mkdir -p '/tmp/devcontainers-xxxxxx' && cat > '/tmp/devcontainers-devcontainers-xxxxxx/env-loginInteractiveShell.json' << 'envJSON'
...

Only workaround I have found is to restart the container, which cleans up all of the zombie processes. Then connecting to the container is fast again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant