Skip to content

Crash on Debian 8 #67

Closed
Closed

Description

@RookieZoe
  • 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)

Activity

  1. kylecarbs commented on Mar 7, 2019

    @kylecarbs
    Member

    Seems like you're out of memory.

  2. wogong commented on Mar 7, 2019

    @wogong

    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.

  3. jerodev commented on Mar 7, 2019

    @jerodev

    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"}
    
  4. jerodev commented on Mar 7, 2019

    @jerodev

    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.

  5. kylecarbs commented on Mar 7, 2019

    @kylecarbs
    Member

    Interesting. Will investigate.

  6. zanhk commented on Mar 8, 2019

    @zanhk

    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)
    
  7. NGTmeaty commented on Mar 8, 2019

    @NGTmeaty
    Contributor

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

  8. zanhk commented on Mar 8, 2019

    @zanhk

    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

  9. NiklasMerz commented on Mar 8, 2019

    @NiklasMerz

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

  10. NGTmeaty commented on Mar 8, 2019

    @NGTmeaty
    Contributor

    Which version are you running on @NiklasMerz ?

  11. zanhk commented on Mar 8, 2019

    @zanhk

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

  12. kylecarbs commented on Mar 8, 2019

    @kylecarbs
    Member

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

  13. zanhk commented on Mar 8, 2019

    @zanhk

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

  14. NiklasMerz commented on Mar 8, 2019

    @NiklasMerz

    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.

  15. zanhk commented on Mar 8, 2019

    @zanhk

    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

  16. NGTmeaty commented on Mar 8, 2019

    @NGTmeaty
    Contributor

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

  17. kylecarbs commented on Mar 8, 2019

    @kylecarbs
    Member

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

  18. kylecarbs commented on Mar 8, 2019

    @kylecarbs
    Member

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

  19. bdodroid commented on Mar 8, 2019

    @bdodroid

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

  20. zanhk commented on Mar 8, 2019

    @zanhk

    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.

  21. NGTmeaty commented on Mar 8, 2019

    @NGTmeaty
    Contributor

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

  22. NiklasMerz commented on Mar 8, 2019

    @NiklasMerz

    @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.

  23. zanhk commented on Mar 8, 2019

    @zanhk

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

  24. zanhk commented on Mar 9, 2019

    @zanhk

    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
    
    
    
  25. kylecarbs commented on Apr 4, 2019

    @kylecarbs
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions