-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Problem:
We observed an internal user having a large number of orphaned coder ssh processes running on their laptop.
This was contributing to increased load on coderd.
Our hypothesis is that the user's editor (Cursor) was automatically running a setup script over SSH that invoked coder ssh (via ProxyCommand in .ssh/config) and exiting with an error.
Steps to reproduce:
- Run a new shell and get its PID
bash
$ echo $$
12345
- SSH into a workspace and run a long-lived command
coder ssh my-workspace sleep infinity
- Validate that the
coder sshcommand is running
ps -eo pid,ppid,command | grep [c]oder
12346 12345 coder ssh my-workspace sleep infinity
- Kill the SSH process' parent (the bash shell)
kill -9 12345
- Observe the
coder sshprocess still running but now owned by PID 1
ps -eo pid,ppid,command | grep [c]oder
12346 1 coder ssh my-workspace sleep infinity
Metadata
Metadata
Assignees
Labels
No labels