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

Zombie and Lingering Process in VS Code Server on Linux servers. #7228

Open
1 of 2 tasks
zakkg3 opened this issue Feb 25, 2025 · 1 comment
Open
1 of 2 tasks

Zombie and Lingering Process in VS Code Server on Linux servers. #7228

zakkg3 opened this issue Feb 25, 2025 · 1 comment
Labels
bug Something isn't working triage This issue needs to be triaged by a maintainer

Comments

@zakkg3
Copy link

zakkg3 commented Feb 25, 2025

Is there an existing issue for this?

OS/Web Information

Web Browser: Chrome / firefox does not matter.
Local OS: Linux, does not matter.
Remote OS: Ubuntu, CentOs
Remote Architecture: amd64
code-server --version: * probably all?

Description:

The VS Code Server (Stable-138f619c86f1199955d53b4166bef66ef252935c) leaves a zombie process () and possibly contributes to other lingering processes (e.g., ssh-agent) on Ubuntu (also seen on older CentOs servers). The parent node process isn’t reaping its child, and the environment shows multiple orphaned processes, suggesting cleanup issues.

Steps to Reproduce:

Run VS Code Server on Ubuntu via SSH.
Use ps aux to monitor processes after activity (e.g., editing, closing) or Possible wiht a suddenly dropped ssh connection.

Observe child processes and persistent ssh-agent instances.

Actual Behavior:

Full ps output shows a zombie and other processes:

user001  2728097       1  0 10:35 ?        00:00:00 /usr/lib/openssh/sftp-server
user002  2695434       1  0 10:04 ?        00:00:00 ssh-agent -s
user003  2360659       1  0 Feb24 ?        00:00:00 ssh-agent -s
user004  2325604       1  0 Feb24 ?        00:00:00 ssh-agent -s
user004  2325030       1  0 Feb24 ?        00:00:00 ssh-agent -s
user004  2299090       1  0 Feb24 ?        00:00:00 ssh-agent -s
user005  2268899       1  0 Feb24 ?        00:00:00 ssh-agent -s
user005  2268273       1  0 Feb24 ?        00:00:00 ssh-agent -s
userxxx  2221109       1  0 Feb24 ?        00:00:00 sh /home/userxxx/.vscode-server/cli/servers/Stable-138f619c86f1199955d53b4166bef66ef252935c/server/bin/code-server --connection-token=remo
userxxx  2221113 2221109  0 Feb24 ?        00:00:03  \_ /home/userxxx/.vscode-server/.../node ...
userxxx  2221151 2221113  0 Feb24 ?        00:00:00      \_ /home/userxxx/.vscode-server/.../node ...
userxxx  2221201 2221113  0 Feb24 ?        00:00:00      \_ [node] <defunct>
user004  2161071       1  0 Feb24 ?        00:00:00 ssh-agent -s

The parent node (PID 2221113) doesn’t reap its child (PID 2221201), leaving a zombie. Multiple ssh-agent processes (parent PID 1) also persist.

Expected Behavior:

Parent processes reap terminated children, and SSH-related processes clean up after sessions end, avoiding and orphaned entries.

Environment:

OS: Linux eu-login-01 5.15.0-131-generic #141-Ubuntu 2025 x86_64
SSH: OpenSSH_8.9p1 Ubuntu-3ubuntu0.11, OpenSSL 3.0.2 15 Mar 2022
VS Code Server: Stable-138f619c86f1199955d53b4166bef66ef252935c
Setup: Cluster environment, launched via SSH

Steps to Reproduce

Expected

All processes that vs code server spawns should be cleaned if there is no active connection in some time.

Actual

process like in the list are there forever!

Logs

Screenshot/Video

No response

Does this bug reproduce in native VS Code?

Yes, this is also broken in native VS Code

Does this bug reproduce in GitHub Codespaces?

Yes, this is also broken in GitHub Codespaces

Are you accessing code-server over a secure context?

  • I am using a secure context.

Notes

No response

@zakkg3 zakkg3 added bug Something isn't working triage This issue needs to be triaged by a maintainer labels Feb 25, 2025
@code-asher
Copy link
Member

code-asher commented Mar 6, 2025

Does this persist indefinitely? I know VS Code keeps terminal sessions alive for a while, not sure what the timeout is though.

Also your report says this reproduces in VS Code and Codespaces, is that right? We can report it upstream if so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage This issue needs to be triaged by a maintainer
Projects
None yet
Development

No branches or pull requests

2 participants