microsoft / microsoft/vscode-remote-release

Remote processes remain running indefinitely after remote session hard disconnect

Open
#11,151 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ssh
Dominant language
Dockerfile
Stars
4.2k
Forks
469
Avg merge
1d 1h
Merged PRs (30d)
1

Description

Is there an existing issue for this bug?
  • I have searched the existing open issues and found none that apply.
  • If I find any issue of interest that is related or closed, I will included a link to it in this issue.
Required Troubleshooting Steps
  • I have read and performed the troubleshooting steps
  • I have tried both values of the remote.SSH.useLocalServer setting
  • My issue was not covered in the Tips and Tricks linked from the Troubleshooting Wiki.
  • I will include a complete copy of my Remote - SSH logs by running Remote-SSH: Show Log in the command palette or from View > Output in the menu bar
[Optional] Diagnose with Copilot

I did not ask the @remote-ssh participant for help

In step 2 of the troubleshooting wiki, what was the result of running the generated SSH command verbatim outside of VS Code?

I did not try step 2 of the troubleshooting steps

Remote-SSH Log

N/A: I can't obtain this since the reproduction steps require closing the VS Code window. If there's another way to obtain it, please let me know.

Expected Behavior

WIth a VS Code remote SSH connection set up, if I kill my network connection on the client, then close my VS Code window, and then re-enable the network, then I would expect the VS Code processes on the sever to either tear-down and stop immediately, or at least after some time-out.

Actual Behavior

In this scenario, the VS Code processes remain running on the server indefinitely, and I have to use the Kill VS Code server on host... option for these to tear down.

If I simply close the frontend VS Code window without disabling the network connection, these server processes exit correctly. It is only in the case of a hard disconnect that this issue occurs.

In this case I also have a cppdbg type debug session which also remains running on the server, though this issue seems to occur without any running debug sessions too.

Steps To Reproduce
  • Set up a remote SSH connection
  • Disable network on client
  • Close VS Code window on client
  • Re-enable network
  • Check processes running on server in separate SSH session.
Anything else?

#10730 describes something similar, however in my case they are not zombie processes. None of the server-side processes attempt to exit at all.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the listed Remote SSH sequence: disable the client network, close VS Code, restore the network, and inspect server processes from a separate SSH session. Compare this with closing the window while connected, including the case with a cppdbg session; done means the remote VS Code processes tear down immediately or after a defined timeout.

Written by the indexing model from the issue text.

Assessment

Tech stack
vscode
Domain
devtools, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.