profile
viewpoint

Ask questionsSegmentation fault (alpine)

<!-- Please search existing issues to avoid creating duplicates. --> <!-- All extension-specific issues should be created with the Extension Bug template. -->

  • code-server version: 1.868-vsc1.33.1
  • OS Version: alpine 3.9.3 (not in docker)

Description

<!-- Describes the problem here -->

If source code folder (code-server-1.868-vsc1.33.1) exists, code-server run fine, otherwise, code-server gets segmentation fault.

Steps to Reproduce

  1. Unzip code-server-1.868-vsc1.33.1.zip in /root
  2. yarn
  3. Add target option as alpine in /root/code-server-1.868-vsc1.33.1/packages/server/scripts/nbin.ts
  4. export NODE_ENV=production
  5. apk add libxkbfile-dev libsecret-dev
  6. yarn task build:server:binary
  7. cp /root/code-server-1.868-vsc1.33.1/packages/server/cli-linux-x64 /usr/local/bin/code-server
  8. code-server -H -N --disable-telemetry (work fine)
  9. mv /root/code-server-1.868-vsc1.33.1 /root/code-server-1.868-vsc1.33 (use mv as rm)
  10. code-server -H -N --disable-telemetry:
(node:13387) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(),
Buffer.allocUnsafe(), or Buffer.from() methods instead.
INFO  code-server development
INFO  Additional documentation: http://github.com/codercom/code-server
INFO  Initializing {"data-dir":"/root/.local/share/code-server","extensions-dir":"/root/.local/share/code-server/extensions","working-d
ir":"/root/work/backup","log-dir":"/root/.cache/code-server/logs/20190418071423996"}
INFO  Starting webserver... {"host":"0.0.0.0","port":8443}
WARN  No certificate specified. This could be insecure.
WARN  Documentation on securing your setup: https://github.com/codercom/code-server/blob/master/doc/security/ssl.md
WARN  Launched without authentication.
INFO
INFO  Started (click the link below to open):
INFO  http://localhost:8443/
INFO
INFO  Starting shared process [1/5]...
WARN  stderr {"data":"(node:13399) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please us
e the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.\n"}
INFO  Connected to shared process
INFO  WebSocket opened / {"client":1,"ip":"192.168.56.1"}
INFO  Starting shared process [1/5]... {"error":"Exited with null"}
WARN  stderr {"data":"(node:13432) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please us
e the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.\n"}
INFO  Connected to shared process
INFO  Starting shared process [1/5]... {"error":"Exited with null"}
[1]    13387 segmentation fault  code-server -H -N --disable-telemetry
cdr/code-server

Answer questions Gooseware

This is an issue because your docker image now suffers from this fault

WARN stderr {"data":"(node:20) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.\n"} internal/child_process.js:366 throw errnoException(err, 'spawn'); ^

Error: spawn ENOMEM at ChildProcess.spawn (internal/child_process.js:366:11) at Object.spawn [as _spawn] (child_process.js:538:9) at t.async (/src/packages/server/out/cli.js:504:34598) at e.exports (/src/packages/server/out/cli.js:504:34099) at e (/src/packages/server/out/cli.js:504:32722) at Timeout.u [as _onTimeout] (/src/packages/server/out/cli.js:504:33015) at ontimeout (timers.js:436:11) at tryOnTimeout (timers.js:300:5) at listOnTimeout (timers.js:263:5) at Timer.processTimers (timers.js:223:10)

useful!
source:https://uonfu.com/
Github User Rank List