-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Update Code to 1.98.0 #7249
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
Update Code to 1.98.0 #7249
Conversation
When I try to build within a docker container using Node.js 18.20.1, it errors with
[...]
[07:59:27] Error [ERR_WORKER_OUT_OF_MEMORY]: Worker terminated due to reaching memory limit: JS heap out of memory
at [kOnExit] (node:internal/worker:313:26)
at Worker.<computed>.onexit (node:internal/worker:229:20)
at Worker.callbackTrampoline (node:internal/async_hooks:130:17)
This also happens using a container with very few limits:
RESOURCE DESCRIPTION SOFT HARD UNITS
AS address space limit unlimited unlimited bytes
CORE max core file size unlimited unlimited bytes
CPU CPU time unlimited unlimited seconds
DATA max data size unlimited unlimited bytes
FSIZE max file size unlimited unlimited bytes
LOCKS max number of file locks held unlimited unlimited locks
MEMLOCK max locked-in-memory address space unlimited unlimited bytes
MSGQUEUE max bytes in POSIX mqueues 819200 819200 bytes
NICE max nice prio allowed to raise 0 0
NOFILE max number of open files 1048576 1048576 files
NPROC max number of processes unlimited unlimited processes
RSS max resident set size unlimited unlimited bytes
RTPRIO max real-time priority 0 0
RTTIME timeout for real-time tasks unlimited unlimited microsecs
SIGPENDING max number of pending signals 1029509 1029509 signals
STACK max stack size unlimited unlimited bytes
@code-asher Any idea why this happens? Does the build pipeline here run on a VM or in a container?
Possibly related:
With the following modification to ./lib/vscode/package.json, it built successfully [in a docker container]:
35c35 < "gulp": "node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js", --- > "gulp": "node ./node_modules/gulp/bin/gulp.js",
Before removing, I set --max-old-space-size to 16384, 32768 and 65536 – without success.
Build time: ~25 mins. Build log:
> code-server@0.0.0 build:vscode
> ./ci/build/build-vscode.sh
Updated 1 path from the index
> code-oss-dev@1.98.0 gulp
> node ./node_modules/gulp/bin/gulp.js vscode-reh-web-linux-x64-min
[15:06:52] Using gulpfile ~/projects/coder/code-server/lib/vscode/gulpfile.js
[15:06:52] Starting 'vscode-reh-web-linux-x64-min'...
[15:06:52] Starting clean-out-build ...
[15:06:52] Finished clean-out-build after 10 ms
[15:06:52] Starting build-date-file ...
[15:06:52] Finished build-date-file after 1 ms
[15:06:52] Starting compile-api-proposal-names ...
[15:06:52] Starting compilation api-proposal-names...
[15:06:52] Finished compilation api-proposal-names with 0 errors after 90 ms
[15:06:52] Finished compile-api-proposal-names after 101 ms
[15:06:52] Starting compile-src ...
[15:07:12] [mangler] Done collecting. Classes: 8451. Exported symbols: 10300
[15:07:14] [mangler] Done creating class replacements
[15:07:14] [mangler] Starting prepare rename edits
[15:07:15] Starting compilation...
[15:23:01] [mangler] Done preparing edits: 4181 files
[15:23:08] [mangler] Done: 5233.167kb saved, memory-usage: {"total_heap_size":2290057216,"total_heap_size_executable":8630272,"total_physical_size":2289664000,"total_available_size":2104265216,"used_heap_size":2201951368,"heap_size_limit":4345298944,"malloced_memory":3283096,"peak_malloced_memory":20104920,"does_zap_garbage":0,"number_of_native_contexts":2,"number_of_detached_contexts":0,"total_global_handles_size":5087232,"used_global_handles_size":1993472,"external_memory":107612857}
[15:28:01] Finished compilation with 0 errors after 1245842 ms
[15:28:01] Finished compile-src after 1268851 ms
[15:28:01] Starting compile-build ...
[15:28:01] Finished compile-build after 0 ms
[15:28:01] Starting clean-extensions-build ...
[15:28:01] Finished clean-extensions-build after 1 ms
[15:28:01] Starting bundle-marketplace-extensions-build ...
[15:28:01] Downloading extension from GH: ms-vscode.js-debug-companion@1.1.3 ...
[15:28:01] Downloading extension from GH: ms-vscode.js-debug@1.97.1 ...
[15:28:01] Downloading extension from GH: ms-vscode.vscode-js-profile-table@1.0.10 ...
[15:28:03] Finished bundle-marketplace-extensions-build after 1878 ms
[15:28:03] Starting bundle-non-native-extensions-build ...
[15:28:55] Bundled extension: simple-browser/extension.webpack.config.js...
[15:28:55] Bundled extension: search-result/extension.webpack.config.js...
[15:28:56] Bundled extension: debug-auto-launch/extension.webpack.config.js...
[15:28:58] Bundled extension: debug-server-ready/extension.webpack.config.js...
[15:28:58] Bundled extension: jake/extension.webpack.config.js...
[15:28:58] Bundled extension: gulp/extension.webpack.config.js...
[15:28:58] Bundled extension: grunt/extension.webpack.config.js...
[15:29:01] Bundled extension: tunnel-forwarding/extension.webpack.config.js...
[15:29:03] Bundled extension: markdown-math/extension.webpack.config.js...
[15:29:03] Bundled extension: git-base/extension.webpack.config.js...
[15:29:04] Bundled extension: media-preview/extension.webpack.config.js...
[15:29:04] Bundled extension: terminal-suggest/extension.webpack.config.js...
[15:29:04] Bundled extension: references-view/extension.webpack.config.js...
[15:29:11] Bundled extension: ipynb/extension.webpack.config.js...
[15:29:12] Bundled extension: php-language-features/extension.webpack.config.js...
[15:29:19] Bundled extension: extension-editing/extension.webpack.config.js...
[15:29:21] Bundled extension: emmet/extension.webpack.config.js...
[15:29:27] Bundled extension: configuration-editing/extension.webpack.config.js...
[15:29:32] Bundled extension: npm/extension.webpack.config.js...
[15:29:32] Bundled extension: merge-conflict/extension.webpack.config.js...
[15:29:32] Bundled extension: github-authentication/extension.webpack.config.js...
[15:29:33] Bundled extension: css-language-features/server/extension.webpack.config.js...
[15:29:42] Bundled extension: github/extension.webpack.config.js...
[15:29:42] Bundled extension: typescript-language-features/extension.webpack.config.js...
[15:29:43] Bundled extension: css-language-features/extension.webpack.config.js...
[15:29:44] Bundled extension: json-language-features/server/extension.webpack.config.js...
[15:29:44] Bundled extension: html-language-features/server/extension.webpack.config.js...
[15:29:44] Bundled extension: git/extension.webpack.config.js...
[15:29:44] Bundled extension: html-language-features/extension.webpack.config.js...
[15:29:45] Bundled extension: json-language-features/extension.webpack.config.js...
[15:29:48] Bundled extension: markdown-language-features/extension.webpack.config.js...
[15:29:48] Finished bundle-non-native-extensions-build after 105161 ms
[15:29:48] Starting compile-non-native-extensions-build ...
[15:29:48] Finished compile-non-native-extensions-build after 0 ms
[15:29:48] Starting compile-extension-media-build ...
[15:29:49] Finished esbuilding extension media /home/jovyan/projects/coder/code-server/lib/vscode/extensions/notebook-renderers/esbuild.js with 0 errors.
[15:29:49] Finished esbuilding extension media /home/jovyan/projects/coder/code-server/lib/vscode/extensions/markdown-language-features/esbuild-preview.js with 0 errors.
[15:29:49] Finished esbuilding extension media /home/jovyan/projects/coder/code-server/lib/vscode/extensions/markdown-language-features/esbuild-notebook.js with 0 errors.
[15:29:49] Finished esbuilding extension media /home/jovyan/projects/coder/code-server/lib/vscode/extensions/ipynb/esbuild.js with 0 errors.
[15:29:49] Finished esbuilding extension media /home/jovyan/projects/coder/code-server/lib/vscode/extensions/markdown-math/esbuild.js with 0 errors.
[15:29:49] Finished esbuilding extension media /home/jovyan/projects/coder/code-server/lib/vscode/extensions/simple-browser/esbuild-preview.js with 0 errors.
[15:29:49] Finished compile-extension-media-build after 327 ms
[15:29:49] Starting clean-out-vscode-reh-web ...
[15:29:49] Finished clean-out-vscode-reh-web after 3 ms
[15:29:49] Starting bundle-vscode-reh-web ...
[15:29:49] Bundled entry point: vs/workbench/api/node/extensionHostProcess...
[15:29:49] Bundled entry point: vs/platform/files/node/watcher/watcherMain...
[15:29:49] Bundled entry point: vs/platform/terminal/node/ptyHostMain...
[15:29:49] Bundled entry point: vs/editor/common/services/editorSimpleWorkerMain...
[15:29:49] Bundled entry point: vs/workbench/api/worker/extensionHostWorkerMain...
[15:29:49] Bundled entry point: vs/workbench/contrib/notebook/common/services/notebookSimpleWorkerMain...
[15:29:49] Bundled entry point: vs/workbench/services/languageDetection/browser/languageDetectionSimpleWorkerMain...
[15:29:49] Bundled entry point: vs/workbench/services/search/worker/localFileSearchMain...
[15:29:49] Bundled entry point: vs/workbench/contrib/output/common/outputLinkComputerMain...
[15:29:49] Bundled entry point: vs/workbench/services/textMate/browser/backgroundTokenization/worker/textMateTokenizationWorker.workerMain...
[15:29:49] Bundled entry point: vs/workbench/services/keybinding/browser/keyboardLayouts/layout.contribution.linux...
[15:29:49] Bundled entry point: vs/workbench/services/keybinding/browser/keyboardLayouts/layout.contribution.darwin...
[15:29:49] Bundled entry point: vs/workbench/services/keybinding/browser/keyboardLayouts/layout.contribution.win...
[15:29:49] Bundled entry point: vs/code/browser/workbench/workbench...
[15:29:49] Bundled entry point: server-main...
[15:29:49] Bundled entry point: server-cli...
[15:29:49] Bundled entry point: bootstrap-fork...
[15:29:55] Finished bundle-vscode-reh-web after 6076 ms
[15:29:55] Starting clean-out-vscode-reh-web-min ...
[15:29:55] Finished clean-out-vscode-reh-web-min after 1 ms
[15:29:55] Starting minify-vscode-reh-web ...
[15:30:06] Finished minify-vscode-reh-web after 11426 ms
[15:30:06] Starting compile-native-extensions-build ...
[15:30:17] Bundled extension: microsoft-authentication/extension.webpack.config.js...
[15:30:17] Finished compile-native-extensions-build after 10919 ms
[15:30:17] Starting node ...
[15:30:17] Downloading node.js 20.18.2 linux x64 from https://nodejs.org...
[15:30:17] Using SHA256 checksum for checking integrity: eb5b031bdd728871c3b9a82655dbfa533bc262c0b6da1d09a86842430cef07d4
[15:30:22] Finished node after 5027 ms
[15:30:22] Starting clean-vscode-reh-web-linux-x64 ...
[15:30:22] Finished clean-vscode-reh-web-linux-x64 after 3 ms
[15:30:22] Starting vscode-reh-web-linux-x64-min-ci ...
[15:30:32] Finished vscode-reh-web-linux-x64-min-ci after 9652 ms
[15:30:32] Starting vscode-reh-web-linux-x64-min ...
[15:30:32] Finished vscode-reh-web-linux-x64-min after 0 ms
[15:30:32] Finished 'vscode-reh-web-linux-x64-min' after 24 min
Updated 1 path from the index
"34b8d2ed69811c3315a465f01492e9448c9254aa"
code-server-4.98.0-rc.1-linux-amd64.tar.gz with Code 1.98.0 is deployed at https://coder.jupyter.b-data.ch.
Functionality [modified by patches] tested and found to work:
- base-path
- cli-window-open
- local-storage
- marketplace
- proxy-url
- service-worker
- web view
Workspaces and Jupyter Notebooks also work fine:
ms-toolsai.jupyter@202520ms-python.python@202520
It is erroring about needing a password, but also do we even need to run this as root considering we are not binding to privileged ports?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!!
gaberudy
commented
Mar 9, 2025
@benz0li, thanks for posting this fix! I also ran into this out-of-memory error when doing a build and tried doubling the heap size repeatedly.
But removing the --max-old-space-size worked for me as well!
@gaberudy Another solution:
35c35 < "gulp": "node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js", --- > "gulp": "node --max-old-space-size=8192 --optimize-for-size ./node_modules/gulp/bin/gulp.js",
Cross reference:
Should node segfault around 20 GB of RAM usage: Start the container with --ulimit nofile=1024:65536.
Cross reference:
Should node still segfault around 20 GB of RAM usage: Increase virtual memory on the host.
# To see current value sudo sysctl -a | grep vm.max_map_count # Set it temporarily sudo sysctl -w vm.max_map_count=262144To make this change permanent, edit /etc/sysctl.conf and add the following line:
vm.max_map_count=262144then
sudo sysctl -p
Originally posted by @riverego in nodejs/node#54692 (comment)
Fixes #7244