Skip to content

Crash on Debian 8 #67

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
RookieZoe opened this issue Mar 7, 2019 · 27 comments
Closed

Crash on Debian 8 #67

RookieZoe opened this issue Mar 7, 2019 · 27 comments
Labels
bug Something isn't working

Comments

@RookieZoe
Copy link

  • code-server version: 1.31.1-100
  • OS Version: debian 8
$ uname -a
Linux iZ28iwnpx2bZ 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u2 (2017-06-26) x86_64 GNU/Linux

$ cat /etc/debian_version
8.11

Steps to Reproduce

error message:

$ ./code-server -d /home/zoe/codes/vscode-workdir -h 127.0.0.1 -p 60443 --allow-http
INFO  code-server v1.31.1-100
INFO  Additional documentation: http://github.com/codercom/code-server
INFO  Initializing {"data-dir":"/home/zoe/codes/vscode-workdir","working-dir":"/home/zoe/codes/vscode-workdir/code-server-1.31.1-100-linux-x64","log-dir":"/home/zoe/codes/vscode-workdir/logs/20190307051426515"}
INFO  Starting shared process [1/5]...
INFO  Starting webserver... {"host":"127.0.0.1","port":60443}
WARN  No certificate specified. This could be insecure.
WARN  Documentation on securing your setup: https://coder.com/docs
INFO
INFO  Password: e9eb8d0a4d8c913247d49cc0
INFO
INFO  Started (click the link below to open):
INFO  http://localhost:60443/
INFO
INFO  Connected to shared process
ERROR SHARED stderr {"data":"Uncaught Exception:  Error: ENOENT: no such file or directory, open '/home/zoe/codes/vscode-workdir/Backups/workspaces.json'\n\nError: ENOENT: no such file or directory, open '/home/zoe/codes/vscode-workdir/Backups/workspaces.json'\n    at Timeout.eval [as _onTimeout] (eval at exports.requireModule (/home/zoe/codes/vscode-workdir/code-server-1.31.1-100-linux-x64/code-server:468:27371), <anonymous>:71445:31)\n    at ontimeout (timers.js:475:11)\n    at tryOnTimeout (timers.js:310:5)\n    at Timer.listOnTimeout (timers.js:270:5)\n"}
INFO  WebSocket opened / {"client":1,"ip":"127.0.0.1"}
INFO  Created data directory
internal/child_process.js:323
    throw errnoException(err, 'spawn');
    ^

Error: spawn ENOMEM
    at _errnoException (util.js:1024:11)
    at ChildProcess.spawn (internal/child_process.js:323:11)
    at Object.exports.spawn [as _spawn] (child_process.js:502:9)
    at t.async (/home/zoe/codes/vscode-workdir/code-server-1.31.1-100-linux-x64/code-server:716:35021)
    at e.exports (/home/zoe/codes/vscode-workdir/code-server-1.31.1-100-linux-x64/code-server:716:34522)
    at e (/home/zoe/codes/vscode-workdir/code-server-1.31.1-100-linux-x64/code-server:716:33324)
    at Timeout.c [as _onTimeout] (/home/zoe/codes/vscode-workdir/code-server-1.31.1-100-linux-x64/code-server:716:33617)
    at ontimeout (timers.js:475:11)
    at tryOnTimeout (timers.js:310:5)
    at Timer.listOnTimeout (timers.js:270:5)
@kylecarbs
Copy link
Member

Seems like you're out of memory.

@wogong
Copy link

wogong commented Mar 7, 2019

Exactly the same crash on ubuntu 16.04 machine with 8 cpu core and 48G ram, this might not be caused by out of memory.

@jerodev
Copy link

jerodev commented Mar 7, 2019

Same problem on Debian 9.

INFO  Started (click the link below to open):
INFO  http://localhost:8443/
INFO   
INFO  Starting shared process [1/5]...
INFO  Connected to shared process
ERROR SHARED stderr {"data":"Uncaught Exception:  Error: ENOENT: no such file or directory, open '/home/jerodev/.code-server/Backups/workspaces.json'\n\nError: ENOENT: no such file or directory, open '/home/jerodev/.code-server/Backups/workspaces.json'\n    at Timeout.eval [as _onTimeout] (eval at exports.requireModule (/home/jerodev/codercom/code-server:468:27371), <anonymous>:71445:31)\n    at ontimeout (timers.js:475:11)\n    at tryOnTimeout (timers.js:310:5)\n    at Timer.listOnTimeout (timers.js:270:5)\n"}

@jerodev
Copy link

jerodev commented Mar 7, 2019

I've got it working now by creating Backups/workspaces.json manually in the workdir directory with the following content:

{"rootWorkspaces":[],"folderURIWorkspaces":[],"emptyWorkspaceInfos":[],"emptyWorkspaces":[]}

And then creating the folder {workdir}/User/workspaceStorage.

@kylecarbs
Copy link
Member

Interesting. Will investigate.

@kylecarbs kylecarbs added the bug Something isn't working label Mar 7, 2019
@zanhk
Copy link

zanhk commented Mar 8, 2019

Posting mine too maybe it help. OS: fresh installation of Debian 9 64 bit
Running it as Root

INFO  Started (click the link below to open):
INFO  http://localhost:443/
INFO
INFO  Starting shared process [1/5]...
INFO  Connected to shared process
INFO  WebSocket opened / {"client":1,"ip":"XXXXXXXX"}
INFO  Created data directory
internal/child_process.js:323
    throw errnoException(err, 'spawn');
    ^

Error: spawn ENOMEM
    at _errnoException (util.js:1024:11)
    at ChildProcess.spawn (internal/child_process.js:323:11)
    at Object.exports.spawn [as _spawn] (child_process.js:502:9)
    at t.async (/root/code-server/code-server:716:35021)
    at e.exports (/root/code-server/code-server:716:34522)
    at e (/root/code-server/code-server:716:33324)
    at Timeout.c [as _onTimeout] (/root/code-server/code-server:716:33617)
    at ontimeout (timers.js:475:11)
    at tryOnTimeout (timers.js:310:5)
    at Timer.listOnTimeout (timers.js:270:5)

@NGTmeaty
Copy link
Contributor

NGTmeaty commented Mar 8, 2019

How much memory do you have available when getting this error?

@zanhk
Copy link

zanhk commented Mar 8, 2019

With a 2gb vps, 1 gb remain avaible and code-server process still working, while the interface return ERR_CONNECTION_REFUSED.
I keep code-server running with Screen

@NiklasMerz
Copy link

I get no error while starting it on Ubuntu 18.04 but the browser loads endlessly.

@NGTmeaty
Copy link
Contributor

NGTmeaty commented Mar 8, 2019

Which version are you running on @NiklasMerz ?

@zanhk
Copy link

zanhk commented Mar 8, 2019

When I look at process running with htop, code-server appear pretty strange, the commands calling code-server are like ∞ length.

@kylecarbs
Copy link
Member

Could you post a snippet of one @ZK-G ?

@zanhk
Copy link

zanhk commented Mar 8, 2019

I m figuring out how to copy the full htop command string, whit Shift I just can copy what I see on screen

@NiklasMerz
Copy link

NiklasMerz commented Mar 8, 2019

Which version are you running on @NiklasMerz ?

The latest Version of the Code-Server binary . In an Ubuntu 18.04 LXC container

Is there any kind of verbose mode? I will try it on another machine.

@zanhk
Copy link

zanhk commented Mar 8, 2019

I didn't figure out how to copy the full string I ll just post the first part and a middle part
/root/code-server/code-server --bootstrap-fork vs/workbench/services/extensions/node/extensionHostProcess --args ["--type=extensionHost"] --env {" ":"/root/code-server/code-server"STY":"32514.code-server","SSH_CONNECTION":"XXX.XXX.XXX.XX 50263 XXX.XXX.XXX.XX 22","LANG":"en_US.UTF-8","OLDPWD":"/root","USER":"root","PWD":"E[19~:k9=\\E[20~:k;=\\E[21~:F1=\\E[23~:F2=\\E[24~:\\\n\t:F3=\\E[1;2P:F4=\\E[1;2Q:F5=\\E[1;2R:F6=\\E[1;2S:\\\n\t:F7=\\E[15;2~:F8=\\E[17;2~:F9=\\E[18;2~:FA=\\E[19;2~:\\\n\t:FB=\\E[20; --> then it keep like that

@NGTmeaty
Copy link
Contributor

NGTmeaty commented Mar 8, 2019

@ZK-G I wonder if this could be a Screen issue? Could you try running it without screen?

@kylecarbs
Copy link
Member

@NiklasMerz you can export LOG_LEVEL to debug and it'll provide verbose output.

@kylecarbs
Copy link
Member

@ZK-G that command appears to be mostly correct. The PWD looks odd. Does it work for you?

@bdodroid
Copy link

bdodroid commented Mar 8, 2019

I get this exact same error only when trying to run Debug->Start Debugging from the VScode menu for a node.js project.

@zanhk
Copy link

zanhk commented Mar 8, 2019

Now I killed the screen but when running htop I still can see all code-server process running.
I started code-server without the screen with the command
./code-server --password=XXX --cert /etc/letsencrypt/live/XXX/cert.pem --cert-key /etc/letsencrypt/live/XXX/privkey.pem -d /home/vscode -p 443
and i got the same error:
Error: spawn ENOMEM at _errnoException (util.js:1024:11) at ChildProcess.spawn (internal/child_process.js:323:11) at Object.exports.spawn [as _spawn] (child_process.js:502:9) at t.async (/root/code-server/code-server:716:35021) at e.exports (/root/code-server/code-server:716:34522) at e (/root/code-server/code-server:716:33324) at Timeout.c [as _onTimeout] (/root/code-server/code-server:716:33617) at ontimeout (timers.js:475:11) at tryOnTimeout (timers.js:310:5) at Timer.listOnTimeout (timers.js:270:5)
While the interface return the error "Lost connection to socket. Retrying in Xs."

After that all the code-server process on htop are still running and using around 800MB of ram.
Now I restart the vps and try again.

@NGTmeaty
Copy link
Contributor

NGTmeaty commented Mar 8, 2019

@ZK-G are you still getting the weird super long code-server in htop?

@NiklasMerz
Copy link

NiklasMerz commented Mar 8, 2019

@NiklasMerz you can export LOG_LEVEL to debug and it'll provide verbose output.

Thanks but still no error. Just a high CPU load and no response in the browser. It is stuck at

INFO Starting shared process [1/5]...

EDIT:
It works on my client machine (Mint). Maybe something strange with the server. I have to do more tests.

@zanhk
Copy link

zanhk commented Mar 8, 2019

Yes, but for be sure It s not still a screen bug related I ll try restart the vps and I try again
Tomorrow

@zanhk
Copy link

zanhk commented Mar 9, 2019

Update: After restarting and starting code-server without screen, the htop command seem more 'normal' length, I still get the same usual error ERROR SHARED stderr but for now still not crash, CPU load is normal and code-server take around 700 mb of ram.


root@xxx:~/code-server# ./code-server --cert /etc/letsencrypt/live/xxx/cert.pem --cert-key /etc/letsencrypt/live/xxx/privkey.pem -d /home/vscode -p 443
INFO  code-server v1.0.0
INFO  Additional documentation: http://github.com/codercom/code-server
INFO  Initializing {"data-dir":"/home/vscode","working-dir":"/root/code-server","log-dir":"/home/vscode/logs/20190309121854195"}
INFO  Starting webserver... {"host":"0.0.0.0","port":443}
INFO
INFO  Password: 4ecDQQlGR7Hb
INFO
INFO  Started (click the link below to open):
INFO  http://localhost:443/
INFO
INFO  Starting shared process [1/5]...
INFO  Connected to shared process
INFO  WebSocket opened / {"client":1,"ip":"xxx"}
INFO  Created data directory
ERROR SHARED stderr {"data":"Uncaught Exception:  Error: ENOENT: no such file or directory, open '/home/vscode/Backups/workspaces.json'\n\nError: ENOENT: no such file or directory, open '/home/vscode/Backups/workspaces.json'\n    at Timeout.eval [as _onTimeout] (eval at exports.requireModule (/root/code-server/code-server:468:27371), <anonymous>:71434:31)\n    at ontimeout (timers.js:475:11)\n    at tryOnTimeout (timers.js:310:5)\n    at Timer.listOnTimeout (timers.js:270:5)\n"}
INFO  WebSocket closed / {"client":1,"code":1001}
INFO  WebSocket opened / {"client":2,"ip":"xxx"}
INFO  Created data directory


@kylecarbs
Copy link
Member

Likely helped by the latest release. Closing in favor of #169.

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

10 participants