Skip to content

Terminal stuck in Starting... #1888

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

Closed
rohinrohin opened this issue Jul 19, 2020 · 16 comments
Closed

Terminal stuck in Starting... #1888

rohinrohin opened this issue Jul 19, 2020 · 16 comments
Labels
bug Something isn't working
Milestone

Comments

@rohinrohin
Copy link

Hi

A couple of our users have reported issues when they're on flaky networks in India (ping packet loss 5-10%) that the terminal is stuck in "Starting...".

Is there anything that can be done for code-server to work in these conditions?

Thanks!

  • Web Browser: Chrome
  • Local OS: Windows/Linux/Mac
  • Remote OS: Ubuntu 18.04
  • Remote Architecture: Kubernetes via Nginx
  • code-server --version: 3.4.1
@nhooyr
Copy link
Contributor

nhooyr commented Jul 20, 2020

Not sure if we can do anything here. Shouldn't be frozen anyhow though, should just take a while.

@nhooyr
Copy link
Contributor

nhooyr commented Jul 20, 2020

Is it stuck or does it eventually work?

@nhooyr nhooyr added the waiting-for-info Waiting for more information from submitter label Jul 20, 2020
@Crazykado-iphone8MacProOs

This comment has been minimized.

@GouravSardana
Copy link

@nhooyr Its's stuck until packet loss <5%

@lights0123
Copy link

I'm experiencing this locally in a Docker container. I was getting the error open '/proc/0/status': Error: ENOENT: no such file or directory, open '/proc/0/status' when creating a new terminal window, but I believe that was because I didn't have zsh installed in my container. After doing so, the terminal is still "Starting...", and no log output occurs.

@alan-he
Copy link

alan-he commented Aug 3, 2020

When client network is slow, The "teminal" was stuck at "starting". And in the meantime, "OUTPUT" [Log(Window)] showed :
[error] EACCES: permission denied, open '/proc/1/environ'
And I found, there were 4 processes. (normally, when working good, there are only 2 processes)
4170 0.0 0.3 1394380 119532 ? Sl 14:21 0:00 /opt/plugin/code-server/node /opt/plugin/code-server/lib/vscode/out/bootstrap-fork --type=extensionHost --uriTransformerPath=/opt/plugin/code-server/lib/vscode/out/vs/server/node/uriTransformer
4379 0.0 0.0 859388 23044 ? Sl 14:21 0:00 /opt/plugin/code-server/node /opt/plugin/code-server/lib/vscode/out/bootstrap-fork --type=watcherService
10254 1.2 0.3 1394380 119532 ? Sl 14:21 0:38 /opt/plugin/code-server/node /opt/plugin/code-server/lib/vscode/out/bootstrap-fork --type=extensionHost --uriTransformerPath=/opt/plugin/code-server/lib/vscode/out/vs/server/node/uriTransformer
10265 0.0 0.0 859388 23044 ? Sl 14:21 0:00 /opt/plugin/code-server/node /opt/plugin/code-server/lib/vscode/out/bootstrap-fork --type=watcherService

@alan-he
Copy link

alan-he commented Aug 13, 2020

When client network is slow, The "teminal" was stuck at "starting". And in the meantime, "OUTPUT" [Log(Window)] showed :
[error] EACCES: permission denied, open '/proc/1/environ'
And I found, there were 4 processes. (normally, when working good, there are only 2 processes)
4170 0.0 0.3 1394380 119532 ? Sl 14:21 0:00 /opt/plugin/code-server/node /opt/plugin/code-server/lib/vscode/out/bootstrap-fork --type=extensionHost --uriTransformerPath=/opt/plugin/code-server/lib/vscode/out/vs/server/node/uriTransformer
4379 0.0 0.0 859388 23044 ? Sl 14:21 0:00 /opt/plugin/code-server/node /opt/plugin/code-server/lib/vscode/out/bootstrap-fork --type=watcherService
10254 1.2 0.3 1394380 119532 ? Sl 14:21 0:38 /opt/plugin/code-server/node /opt/plugin/code-server/lib/vscode/out/bootstrap-fork --type=extensionHost --uriTransformerPath=/opt/plugin/code-server/lib/vscode/out/vs/server/node/uriTransformer
10265 0.0 0.0 859388 23044 ? Sl 14:21 0:00 /opt/plugin/code-server/node /opt/plugin/code-server/lib/vscode/out/bootstrap-fork --type=watcherService

"terminal.integrated.inheritEnv": true solve the problem. Somehow, when opening the codeserver page, "terminal.integrated.inheritEnv" option is unchecked, and caused terminal stucked in starting

@nhooyr
Copy link
Contributor

nhooyr commented Aug 17, 2020

Interesting. 🤔

@nhooyr nhooyr added needs-investigation and removed waiting-for-info Waiting for more information from submitter labels Aug 31, 2020
@louchenyao
Copy link

Same problem. But the packet loss rate seems ok.

@mabunixda
Copy link

We are having the same issues but also not reproducable, because we can use the same code-server by 2 users and one of them is having a problem by the stuck starting terminal, and the other user is able to open a terminal.

Today we were able to solve the issue for both users by clearing the cache of the VM by

echo 1 > /proc/sys/vm/drop_caches

We run the code-server as systemd-service on ec2 t3.medium instances with caddy and letsencrypt.
We are running this setup for trainings with about 10 participants. But we are also not aware why this happens, because it appears on 1 or 2 of 10 instances and not on each of them. And the setup is created by terraform so this should be identical ( hopefully )

A restart of code-server does not fix the problem ...

@mabunixda
Copy link

Today we ran into this situation again ... the situation was fixed by disabling selinux. But i am not able to say that this is/was the root cause of the problem

@mabunixda
Copy link

Again i was experiencing the terminal problem - this time prometheus and a nodeexporter was also running on the installation.
The VM was initially checked and terminal opened, then after 2 days of idle state code-server was used again and the terminal problem appeared again. After a few minutes the problem was not present anymore.
About 5 hours later the problem appeared again on this specific VM.
During this 3 days 8 VMs providing code-server were running. None of them showed this specific problem in this period except a single installation.

The only metric which is noticeable is the memory page faults:
1st appearance
2nd appearance

@caio-vinicius
Copy link

That's unfortunately annoying. Happening all the time

@nhooyr nhooyr added bug Something isn't working and removed needs-investigation labels Dec 7, 2020
@668168
Copy link

668168 commented Jan 20, 2021

share the method i resolve the bug:

step1. delete the file:
~/.local/share/code-server/User/settings.json

step2. restart the code-server

Done.

@kavinvin
Copy link

In my case, I found that this problem is due to using linux service file without specifying working directory. So I guess it got some permission problem. After I specified WorkingDirectory for the service, the problem was resolved.

[Unit]
Description=code-server
After=network.target

[Service]
Type=exec
ExecStart=/usr/bin/code-server
Restart=always
User=%i
WorkingDirectory=/home/%i

[Install]
WantedBy=default.target

@jsjoeio jsjoeio added this to the Backlog milestone Apr 29, 2021
@stale
Copy link

stale bot commented Oct 26, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days.

@stale stale bot added the stale label Oct 26, 2021
@stale stale bot closed this as completed Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests