vscode-cpptools
vscode-cpptools copied to clipboard
RangeError: WebAssembly.Instance(): Out of memory: Cannot allocate Wasm memory for new instance
Type: Bug
Install C/C++ and Modern Fortran Start remote ssh in VsCode and check "Extension Hoste (Remote)" There is enough space in the directories to expand / save files up to 20 GB that should not be the problem.
024-07-30 15:02:24.434 [info] ExtensionService#_doActivateExtension vscode.emmet, startup: false, activationEvent: 'onLanguage'
2024-07-30 15:02:24.435 [info] ExtensionService#_doActivateExtension ms-vscode.cpptools, startup: false, activationEvent: 'onLanguage:FortranFreeForm', root cause: fortran-lang.linter-gfortran
2024-07-30 15:02:24.770 [error] Activating extension ms-vscode.cpptools failed due to an error:
2024-07-30 15:02:24.770 [error] RangeError: WebAssembly.Instance(): Out of memory: Cannot allocate Wasm memory for new instance
at 1298 (/hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.4-linux-x64/dist/src/main.js:28534:22)
at webpack_require (/hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.4-linux-x64/dist/src/main.js:116162:42)
at 6278 (/hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.4-linux-x64/dist/src/main.js:40823:16)
at webpack_require (/hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.4-linux-x64/dist/src/main.js:116162:42)
at 2277 (/hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.4-linux-x64/dist/src/main.js:83848:22)
at webpack_require (/hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.4-linux-x64/dist/src/main.js:116162:42)
at 1817 (/hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.4-linux-x64/dist/src/main.js:72989:20)
at webpack_require (/hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.4-linux-x64/dist/src/main.js:116162:42)
at /hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.4-linux-x64/dist/src/main.js:116187:27
at /hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.4-linux-x64/dist/src/main.js:116459:3
at Object.
Extension version: 1.21.4 VS Code version: Code 1.91.1 (f1e16e1e6214d7c44d078b1f0607b2388f29d729, 2024-07-09T22:08:12.169Z) OS version: Linux x64 5.14.21-150500.55.68-default Modes: Remote OS version: Linux x64 4.18.0-477.15.1.el8_8.x86_64
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i5-9400 CPU @ 2.90GHz (6 x 900) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_graphite: disabled_off video_decode: enabled video_encode: disabled_software vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: disabled_off |
| Load (avg) | 0, 1, 1 |
| Memory (System) | 15.43GB (9.90GB free) |
| Process Argv | --crash-reporter-id 1fdd5797-c5e2-49c4-aef9-1589525e78ad |
| Screen Reader | no |
| VM | 0% |
| DESKTOP_SESSION | /usr/share/xsessions/plasma5 |
| XDG_CURRENT_DESKTOP | KDE |
| XDG_SESSION_DESKTOP | KDE |
| XDG_SESSION_TYPE | x11 |
| Item | Value |
|---|---|
| Remote | SSH: rcl |
| OS | Linux x64 4.18.0-477.15.1.el8_8.x86_64 |
| CPUs | AMD EPYC 7502 32-Core Processor (64 x 3283) |
| Memory (System) | 250.44GB (111.07GB free) |
| VM | 0% |
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscoreces:30445986
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
pythongtdpath:30769146
welcomedialogc:30910334
pythonnoceb:30805159
asynctok:30898717
pythonregdiag2:30936856
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
724cj586:31013169
pythoncenvpt:31062603
a69g1124:31058053
dvdeprecation:31068756
dwnewjupytercf:31046870
newcmakeconfigv2:31071590
impr_priority:31102340
refactorc:31101458
ccplti:31103428
pythonrstrctxt:31103193
wkspc-onlycs-c:31106320
@mdeberts Does this bug repro with the Modern Fortran extension disabled?
@mdeberts Does this bug repro with the Modern Fortran extension disabled?
I don't install Modern Fortran and also see this error on my remote server. When I reinstall 1.20.5 no error occurs.
Hi @mdeberts . Since this isn't happening for most people, can you tell us more about your remote machine? Is there anything about how it's configured that may be non-standard or different from default?
Between those versions, we upgraded several of our dependencies (for security purposes), including webpack, which appears to be where this issue is coming from (before any of our code actually executes).
@Thomasyse @Colengms I also tried a reinstall of 1.20.5 and now it works. The remote machine is a high performance computer (hpc). I connect to the login node via remote ssh from my linux workstation.
HPC Linux version: NAME="Red Hat Enterprise Linux" VERSION="8.8 (Ootpa)" ID="rhel" ID_LIKE="fedora" VERSION_ID="8.8" PLATFORM_ID="platform:el8" PRETTY_NAME="Red Hat Enterprise Linux 8.8 (Ootpa)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:redhat:enterprise_linux:8::baseos" HOME_URL="https://www.redhat.com/" DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8" BUG_REPORT_URL="https://bugzilla.redhat.com/" @Colengms if you need more specific information, please tell me.
I uninstalled Modern Fortran and opened a .cpp file.
Uninstalled Modern Fortran C++ Extension v 1.20.5 works 2024-07-31 07:44:58.079 [info] Extension host with pid 3631549 started 2024-07-31 07:44:58.093 [info] Lock '/hpc/uhome/mdeberts/.vscode-server/data/User/workspaceStorage/fd259252b3eb06c31daff543bf236fdf/vscode.lock': Lock acquired. 2024-07-31 07:44:58.279 [info] ExtensionService#_doActivateExtension vscode.emmet, startup: false, activationEvent: 'onLanguage' 2024-07-31 07:44:58.397 [info] ExtensionService#_doActivateExtension vscode.git-base, startup: true, activationEvent: '', root cause: vscode.git 2024-07-31 07:44:58.498 [info] ExtensionService#_doActivateExtension vscode.git, startup: true, activationEvent: '' 2024-07-31 07:44:58.498 [info] ExtensionService#_doActivateExtension vscode.github, startup: true, activationEvent: '*' 2024-07-31 07:44:58.731 [info] Eager extensions activated 2024-07-31 07:44:58.732 [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch, startup: false, activationEvent: 'onStartupFinished' 2024-07-31 07:44:58.732 [info] ExtensionService#_doActivateExtension vscode.merge-conflict, startup: false, activationEvent: 'onStartupFinished' 2024-07-31 07:44:58.732 [info] ExtensionService#_doActivateExtension genieai.chatgpt-vscode, startup: false, activationEvent: 'onStartupFinished' 2024-07-31 07:45:02.313 [info] ExtensionService#_doActivateExtension ms-vscode.cpptools, startup: false, activationEvent: 'onLanguage:cpp'
Uninstalled Modern Fortran
C++ Extension v 1.24.1
error
2024-07-31 07:46:12.044 [info] Extension host with pid 3781682 started
2024-07-31 07:46:12.044 [error] Error: EEXIST: file already exists, open '/hpc/uhome/mdeberts/.vscode-server/data/User/workspaceStorage/fd259252b3eb06c31daff543bf236fdf/vscode.lock'
2024-07-31 07:46:12.045 [info] Lock '/hpc/uhome/mdeberts/.vscode-server/data/User/workspaceStorage/fd259252b3eb06c31daff543bf236fdf/vscode.lock': Could not acquire lock, checking if the file is stale.
2024-07-31 07:46:12.055 [info] Lock '/hpc/uhome/mdeberts/.vscode-server/data/User/workspaceStorage/fd259252b3eb06c31daff543bf236fdf/vscode.lock': The lock does not look stale, elapsed: 750 ms, giving up.
2024-07-31 07:46:12.163 [info] Lock '/hpc/uhome/mdeberts/.vscode-server/data/User/workspaceStorage/fd259252b3eb06c31daff543bf236fdf-1/vscode.lock': Lock acquired.
2024-07-31 07:46:12.512 [info] ExtensionService#_doActivateExtension vscode.emmet, startup: false, activationEvent: 'onLanguage'
2024-07-31 07:46:12.513 [info] ExtensionService#_doActivateExtension ms-vscode.cpptools, startup: false, activationEvent: 'onLanguage:cpp'
2024-07-31 07:46:12.939 [error] Activating extension ms-vscode.cpptools failed due to an error:
2024-07-31 07:46:12.940 [error] RangeError: WebAssembly.Instance(): Out of memory: Cannot allocate Wasm memory for new instance
at 1298 (/hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.4-linux-x64/dist/src/main.js:28534:22)
at webpack_require (/hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.4-linux-x64/dist/src/main.js:116162:42)
at 6278 (/hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.4-linux-x64/dist/src/main.js:40823:16)
at webpack_require (/hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.4-linux-x64/dist/src/main.js:116162:42)
at 2277 (/hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.4-linux-x64/dist/src/main.js:83848:22)
at webpack_require (/hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.4-linux-x64/dist/src/main.js:116162:42)
at 1817 (/hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.4-linux-x64/dist/src/main.js:72989:20)
at webpack_require (/hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.4-linux-x64/dist/src/main.js:116162:42)
at /hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.4-linux-x64/dist/src/main.js:116187:27
at /hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.4-linux-x64/dist/src/main.js:116459:3
at Object.
Same error, similar setup (but while trying to solve it, I've mode the vscode cache folder to a custom location outside my tiny home directory which has a limitation of 4 GB), no Fortran extension (just tried plain C/C++ project in the remote ssh project). Downgrading (from 1.21.4) to 1.20.5 worked.
Note: without remote ssh, everything worked on my Windows host.
I suspect the issue has something to do with:
https://github.com/nodejs/node/issues/41319#issuecomment-1001025128
https://github.com/webpack/webpack/issues/15584#issuecomment-1146566931
@mdeberts , @Thomasyse , @kvoronin , Can you confirm whether or not you have a memory limit set, and whether unsetting or increasing it avoids this memory allocation issue in NodeJS?
I suspect the issue has something to do with:
https://github.com/nodejs/node/issues/41319#issuecomment-1001025128
https://github.com/webpack/webpack/issues/15584#issuecomment-1146566931
@mdeberts , @Thomasyse , @kvoronin , Can you confirm whether or not you have a memory limit set, and whether unsetting or increasing it avoids this memory allocation issue in NodeJS?
I set the Max TS Sever Memory to 4096. It seems not a concern?
Update This are my updated ulimits, I can not increase ulimit -v any further by myself. I also updated to 1.21.5 but still I get the same error.
I updated to 1.21.6, and it works again if I use my remote ssh from a linux machine.
But I still get an WebAssembly error, which does not seem to have a negative effect for now. All extensions but C/C++ disabled.
Log of Extension Host (Remote)
2024-08-07 07:40:33.442 [info] Extension host with pid 975811 started 2024-08-07 07:40:33.459 [info] Lock '/hpc/uhome/mdeberts/.vscode-server/data/User/workspaceStorage/fd259252b3eb06c31daff543bf236fdf/vscode.lock': Lock acquired. 2024-08-07 07:40:33.614 [info] ExtensionService#_doActivateExtension vscode.emmet, startup: false, activationEvent: 'onLanguage' 2024-08-07 07:40:33.615 [info] ExtensionService#_doActivateExtension ms-vscode.cpptools, startup: false, activationEvent: 'onLanguage:cpp' 2024-08-07 07:40:34.616 [info] ExtensionService#_doActivateExtension vscode.git-base, startup: true, activationEvent: '', root cause: vscode.git 2024-08-07 07:40:34.863 [info] ExtensionService#_doActivateExtension vscode.git, startup: true, activationEvent: '' 2024-08-07 07:40:34.863 [info] ExtensionService#_doActivateExtension vscode.github, startup: true, activationEvent: '*' 2024-08-07 07:40:35.117 [info] Eager extensions activated 2024-08-07 07:40:35.118 [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch, startup: false, activationEvent: 'onStartupFinished' 2024-08-07 07:40:35.118 [info] ExtensionService#_doActivateExtension vscode.merge-conflict, startup: false, activationEvent: 'onStartupFinished' 2024-08-07 07:40:35.544 [error] RangeError: WebAssembly.instantiate(): Out of memory: Cannot allocate Wasm memory for new instance at lazyllhttp (node:internal/deps/undici/undici:8429:32)
From my windows machine connecting to the hpc via remote ssh the C++ extension is still not working
2024-08-09 10:45:59.371 [info] Extension host with pid 2995090 started
2024-08-09 10:45:59.389 [info] Lock '/hpc/uhome/mdeberts/.vscode-server/data/User/workspaceStorage/fd259252b3eb06c31daff543bf236fdf/vscode.lock': Lock acquired.
2024-08-09 10:45:59.568 [info] ExtensionService#_doActivateExtension vscode.git-base, startup: true, activationEvent: '', root cause: vscode.git
2024-08-09 10:45:59.588 [info] ExtensionService#_doActivateExtension ms-vscode.cmake-tools, startup: true, activationEvent: 'workspaceContains:CMakeLists.txt'
2024-08-09 10:45:59.821 [info] ExtensionService#_doActivateExtension vscode.git, startup: true, activationEvent: ''
2024-08-09 10:45:59.821 [info] ExtensionService#_doActivateExtension vscode.github, startup: true, activationEvent: '*'
2024-08-09 10:46:01.826 [info] Eager extensions activated
2024-08-09 10:46:01.826 [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch, startup: false, activationEvent: 'onStartupFinished'
2024-08-09 10:46:01.826 [info] ExtensionService#_doActivateExtension vscode.merge-conflict, startup: false, activationEvent: 'onStartupFinished'
2024-08-09 10:46:01.827 [info] ExtensionService#_doActivateExtension genieai.chatgpt-vscode, startup: false, activationEvent: 'onStartupFinished'
2024-08-09 10:46:03.727 [info] ExtensionService#_doActivateExtension ms-vscode.cpptools, startup: false, activationEvent: 'onLanguage:cpp'
2024-08-09 10:46:03.727 [info] ExtensionService#_doActivateExtension vscode.emmet, startup: false, activationEvent: 'onLanguage'
2024-08-09 10:46:04.250 [error] Activating extension ms-vscode.cpptools failed due to an error:
2024-08-09 10:46:04.250 [error] RangeError: WebAssembly.Instance(): Out of memory: Cannot allocate Wasm memory for new instance
at 1298 (/hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.6-linux-x64/dist/src/main.js:28534:22)
at webpack_require (/hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.6-linux-x64/dist/src/main.js:116162:42)
at 6278 (/hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.6-linux-x64/dist/src/main.js:40823:16)
at webpack_require (/hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.6-linux-x64/dist/src/main.js:116162:42)
at 2277 (/hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.6-linux-x64/dist/src/main.js:83848:22)
at webpack_require (/hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.6-linux-x64/dist/src/main.js:116162:42)
at 1817 (/hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.6-linux-x64/dist/src/main.js:72989:20)
at webpack_require (/hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.6-linux-x64/dist/src/main.js:116162:42)
at /hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.6-linux-x64/dist/src/main.js:116187:27
at /hpc/uhome/mdeberts/.vscode-server/extensions/ms-vscode.cpptools-1.21.6-linux-x64/dist/src/main.js:116459:3
at Object.
For me 1.21.6 still doesn't work.
[error] Activating extension ms-vscode.cpptools failed due to an error:
[error] RangeError: WebAssembly.Instance(): Out of memory: Cannot allocate Wasm memory for new instance
at 1298 (.vscode-server/extensions/ms-vscode.cpptools-1.21.6/dist/src/main.js:28534:22)
at webpack_require (.vscode-server/extensions/ms-vscode.cpptools-1.21.6/dist/src/main.js:116162:42)
at 6278 (.vscode-server/extensions/ms-vscode.cpptools-1.21.6/dist/src/main.js:40823:16)
at webpack_require (.vscode-server/extensions/ms-vscode.cpptools-1.21.6/dist/src/main.js:116162:42)
at 2277 (.vscode-server/extensions/ms-vscode.cpptools-1.21.6/dist/src/main.js:83848:22)
at webpack_require (.vscode-server/extensions/ms-vscode.cpptools-1.21.6/dist/src/main.js:116162:42)
at 1817 (.vscode-server/extensions/ms-vscode.cpptools-1.21.6/dist/src/main.js:72989:20)
at webpack_require (.vscode-server/extensions/ms-vscode.cpptools-1.21.6/dist/src/main.js:116162:42)
at .vscode-server/extensions/ms-vscode.cpptools-1.21.6/dist/src/main.js:116187:27
at .vscode-server/extensions/ms-vscode.cpptools-1.21.6/dist/src/main.js:116459:3
at Object.
updated my upper post, since somehow connecting via remote shh from my windows machine it is not working, but if I connect via remote ssh from my linux machine it works.
@mdeberts @Thomasyse Fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.22.0
By upgrading to the pre-release version, v1.22.3 (pre-release), this error got resolved on my end! Note that, if this error occurs, trying to edit configurations would experience the following... Have to open the output for Extension Host to figure out the root cause being Out of memory for Wasm
command 'c_cpp.configurationeditui' not found
Thanks it’s working for me again. Really appreciate it.
Closing as fixed.