question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ARM64 Event Emitter Memory Leak

See original GitHub issue

Environment

  • Web Browser: Safari & Chrome
  • Local OS: Ubuntu 20.04
  • Remote OS: Mac OS and iPad OS
  • Remote Architecture: ARM64 - Raspberry Pi 4, 4GB
  • code-server --version: 3.4.1

Installation Via the script curl -fsSL https://code-server.dev/install.sh | sh

Error

(node:1725) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added to [ChildProcess]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1725) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [ChildProcess]. Use emitter.setMaxListeners() to increase limit
events.js:292
     throw er; // Unhandled 'error' event
     ^

Error: write EPIPE
   at afterWriteDispatched (internal/stream_base_commons.js:154:25)
   at writeGeneric (internal/stream_base_commons.js:145:3)
   at Socket._writeGeneric (net.js:782:11)
   at Socket._write (net.js:794:8)
   at writeOrBuffer (_stream_writable.js:352:12)
   at Socket.Writable.write (_stream_writable.js:303:10)
   at h.write (/usr/lib/code-server/lib/vscode/out/vs/server/entry.js:169:115)
   at g.write (/usr/lib/code-server/lib/vscode/out/vs/server/entry.js:170:363)
   at g._writeNow (/usr/lib/code-server/lib/vscode/out/vs/server/entry.js:160:350)
   at Immediate.<anonymous> (/usr/lib/code-server/lib/vscode/out/vs/server/entry.js:160:288)
   at processImmediate (internal/timers.js:456:21)
Emitted 'error' event on Socket instance at:
   at emitErrorNT (internal/streams/destroy.js:100:8)
   at emitErrorCloseNT (internal/streams/destroy.js:68:3)
   at processTicksAndRejections (internal/process/task_queues.js:84:21) {
 errno: -32,
 code: 'EPIPE',
 syscall: 'write'
}
error VS Code exited unexpectedly with code 1

Attempted Fixes

  • Read on other issues it could be a memory issue with the fact we keep loosing connection. Using the top command I could see 2.8GB+ of ram free and the 4GB swap file we created untouched.
  • Tried both Safari and Chrome to ensure we weren’t creating an issue with a certain browser. This was tried on both Mac OS and iPad OS.
  • Read on other issues the auth could be an issue however after setting code-server --auth none it didn’t help.

Screenshots Screen Shot 2020-06-27 at 9 27 37 AM Screen Shot 2020-06-27 at 9 34 55 AM

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ZhangYongChangcommented, Aug 19, 2020

debug setting up vs code… debug vscode got message from code-server {“message”:{“type”:“init”,“id”:“UOcgATbuElikOaVl0eG0EaQi”,“options”:{“args”:{“_”:[],“bind-addr”:“0.0.0.0:8081”,“auth”:“none”,“password”:“3019ae9a6af090677adeefe2”,“log”:“debug”,“verbose”:false,“config”:“/root/.config/code-server/config.yaml”,“user-data-dir”:“/root/.local/share/code-server”,“extensions-dir”:“/root/.local/share/code-server/extensions”},“remoteAuthority”:“10.170.1.8:8081”}}} debug got message from vs code {“message”:{“type”:“options”,“id”:“UOcgATbuElikOaVl0eG0EaQi”,“options”:{“workbenchWebConfiguration”:{“remoteAuthority”:“10.170.1.8:8081”,“logLevel”:1,“workspaceProvider”:{“payload”:[[“userDataPath”,“/root/.local/share/code-server”]]}},“remoteUserDataUri”:{“$mid”:1,“path”:“/root/.local/share/code-server”,“scheme”:“vscode-remote”,“authority”:“10.170.1.8:8081”},“productConfiguration”:{“nameShort”:“Code - OSS”,“nameLong”:“Code - OSS”,“applicationName”:“code-oss”,“dataFolderName”:“.vscode-oss”,“win32MutexName”:“vscodeoss”,“licenseName”:“MIT”,“licenseUrl”:“https://github.com/Microsoft/vscode/blob/master/LICENSE.txt",“win32DirName”:"Microsoft Code OSS”,“win32NameVersion”:“Microsoft Code OSS”,“win32RegValueName”:“CodeOSS”,“win32AppId”:“{{E34003BB-9E10-4501-8C11-BE3FAA83F23F}”,“win32x64AppId”:“{{D77B7E06-80BA-4137-BCF4-654B95CCEBC5}”,“win32UserAppId”:“{{C6065F05-9603-4FC4-8101-B9781A25D88E}”,“win32x64UserAppId”:“{{C6065F05-9603-4FC4-8101-B9781A25D88E}”,“win32AppUserModelId”:“Microsoft.CodeOSS”,“win32ShellNameShort”:“C&ode - OSS”,“darwinBundleIdentifier”:“com.visualstudio.code.oss”,“linuxIconName”:“com.visualstudio.code.oss”,“licenseFileName”:“LICENSE.txt”,“reportIssueUrl”:“https://github.com/cdr/code-server/issues/new",“urlProtocol”:“code-oss”,“extensionAllowedProposedApi”:[“ms-vscode.vscode-js-profile-table”,“ms-vscode.references-view”],“builtInExtensions”:[{“name”:“ms-vscode.node-debug”,“version”:“1.44.5”,“repo”:“https://github.com/Microsoft/vscode-node-debug”,“metadata”:{“id”:“b6ded8fb-a0a0-4c1c-acbd-ab2a3bc995a6”,“publisherId”:{“publisherId”:“5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee”,“publisherName”:“ms-vscode”,“displayName”:“Microsoft”,“flags”:“verified”},“publisherDisplayName”:“Microsoft”}},{“name”:“ms-vscode.node-debug2”,“version”:“1.42.2”,“repo”:“https://github.com/Microsoft/vscode-node-debug2”,“metadata”:{“id”:“36d19e17-7569-4841-a001-947eb18602b2”,“publisherId”:{“publisherId”:“5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee”,“publisherName”:“ms-vscode”,“displayName”:“Microsoft”,“flags”:“verified”},“publisherDisplayName”:“Microsoft”}},{“name”:“ms-vscode.references-view”,“version”:“0.0.51”,“repo”:“https://github.com/Microsoft/vscode-reference-view”,“metadata”:{“id”:“dc489f46-520d-4556-ae85-1f9eab3c412d”,“publisherId”:{“publisherId”:“5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee”,“publisherName”:“ms-vscode”,“displayName”:“Microsoft”,“flags”:“verified”},“publisherDisplayName”:“Microsoft”}},{“name”:“ms-vscode.js-debug-companion”,“version”:“1.0.0”,“repo”:“https://github.com/microsoft/vscode-js-debug-companion”,“metadata”:{“id”:“99cb0b7f-7354-4278-b8da-6cc79972169d”,“publisherId”:{“publisherId”:“5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee”,“publisherName”:“ms-vscode”,“displayName”:“Microsoft”,“flags”:“verified”},“publisherDisplayName”:“Microsoft”}},{“name”:“ms-vscode.js-debug-nightly”,“version”:“2020.4.2917”,“repo”:“https://github.com/Microsoft/vscode-js-debug”,“metadata”:{“id”:“7acbb4ce-c85a-49d4-8d95-a8054406ae97”,“publisherId”:{“publisherId”:“5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee”,“publisherName”:“ms-vscode”,“displayName”:“Microsoft”,“flags”:“verified”},“publisherDisplayName”:“Microsoft”}},{“name”:“ms-vscode.vscode-js-profile-table”,“version”:“0.0.2”,“repo”:“https://github.com/Microsoft/vscode-js-debug”,“metadata”:{“id”:“7e52b41b-71ad-457b-ab7e-0620f1fc4feb”,“publisherId”:{“publisherId”:“5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee”,“publisherName”:“ms-vscode”,“displayName”:“Microsoft”,“flags”:“verified”},“publisherDisplayName”:“Microsoft”}}],“commit”:“69ad52907e8ea109345831d29da5425cb2a55047”,“date”:“2020-05-27T23:38:22Z”,“version”:“1.45.1”,“extensionsGallery”:{“serviceUrl”:“https://extensions.coder.com/api”,“itemUrl”:“”,“controlUrl”:“”,“recommendationsUrl”:“”}},“nlsConfiguration”:{“locale”:“en”,“availableLanguages”:{}},“commit”:"69ad52907e8ea109345831d29da5425cb2a55047”}}} events.js:292 throw er; // Unhandled ‘error’ event ^

Error: write EPIPE at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:92:16) Emitted ‘error’ event on Socket instance at: at emitErrorNT (internal/streams/destroy.js💯8) at emitErrorCloseNT (internal/streams/destroy.js:68:3) at processTicksAndRejections (internal/process/task_queues.js:84:21) { errno: -32, code: ‘EPIPE’, syscall: ‘write’ } error VS Code exited unexpectedly with code 1 warn discarding socket connection: vscode is not running

1reaction
teamsuperpandacommented, Sep 1, 2020

Installed 3.5.0 on our Raspberry Pi 4 which is running Ubuntu and code-server has been working fine. No crashing and no errors in the logs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ARM64 Event Emitter Memory Leak - coder/code-server - GitHub
ARM64 Event Emitter Memory Leak #1839 ... Remote Architecture: ARM64 - Raspberry Pi 4, 4GB; code-server --version: 3.4.1. Installation
Read more >
Event Emitter memory leak because of ReactJS Rerendering
The issue I'm dealing with is EventEmitter leaks. My React frontend sends an event, and the backend returns data.
Read more >
Node.js ChangeLog - Google Git
Possible remaining TLS-related memory leak(s), details at #1075. Surrogate pair in REPL can freeze terminal #690; Not possible to build io.js as a...
Read more >
Xcode Server | Apple Developer Forums
Use emitter.setMaxListeners() to increase limit (node:99988) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message listeners added ...
Read more >
process
The process object is an instance of EventEmitter . ... MaxListenersExceededWarning: Possible EventEmitter memory leak detected.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found