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

[Bug]: code server goes to "Sleeping State" when closing the browser #5589

Open
4 tasks done
ky1emoon opened this issue Sep 26, 2022 · 5 comments
Open
4 tasks done

[Bug]: code server goes to "Sleeping State" when closing the browser #5589

ky1emoon opened this issue Sep 26, 2022 · 5 comments
Labels
bug Something isn't working triage This issue needs to be triaged by a maintainer

Comments

@ky1emoon
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Chrome
  • Local OS: Windows 11
  • Remote OS: Ubuntu 20.04
  • Remote Architecture: amd64
  • code-server --version: 4.7.0

Steps to Reproduce

  1. open code-server (I'm using k8s and run the pod with cpu limit N)
  2. run some heavy cpu-bound job in the terminal of code-server client (something like stress -c N)
  3. close the browser
  4. code-server (parent pid) and child processes including cpu-bound job go to sleeping state occassionally.

Expected

The server should be in a running state regardless of client connection

Actual

The code-server process should be in a running state but occasionally goes to a sleeping state.
This leads to other terminal child processes also going to a sleeping state.

Logs

image

Screenshot/Video

image

Does this issue happen in VS Code or GitHub Codespaces?

  • I cannot reproduce this in VS Code.
  • I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

I wonder if this is expected behavior.

@ky1emoon ky1emoon added bug Something isn't working triage This issue needs to be triaged by a maintainer labels Sep 26, 2022
@ky1emoon
Copy link
Author

I believe this might be related to microsoft/vscode-remote-release#3096, but not sure.

@jsjoeio
Copy link
Contributor

jsjoeio commented Sep 26, 2022

🤔 if that is related and it is upstream, we not be able to do much. cc @code-asher in case you have any thoughts/ideas!

@code-asher
Copy link
Member

What do you mean by the process going into a sleeping state? I think VS Code kills terminal processes if they are not reconnected within a timeout, could that be the cause?

@Creling
Copy link

Creling commented Oct 1, 2022

Well, I think background jobs should be guaranteed alive by tmux, screen or something similiar, but not code-server.

If you ssh to a remote server and run some jobs, you should not expect it to keep working after closing the ssh connection, so do code-server.

@code-asher
Copy link
Member

Ah so the issue is that code-server is not terminating jobs when closing the browser?

The reason they stay alive is in case the browser temporarily loses connectivity so it can reconnect the terminals once the network comes back up.

It is supposed to eventually kill the jobs after a timeout I believe (I think it is five minutes).

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

4 participants