Repository: vscode
Issue: Occasionally fails to launch
Labels: freeze-slow-crash-leak

Type: <b>Bug</b>

Run: code --disable-extensions

VS Code version: Code 1.87.0 (019f4d1419fbc8219a181fab7892ebccf7ee29a2, 2024-02-27T23:41:57.585Z)
OS version: Linux arm64 6.6.3-413.asahi.fc39.aarch64+16k
Modes:

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|unknown (8 x 2424)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: disabled_off<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_graphite: disabled_off<br>video_decode: enabled<br>video_encode: disabled_software<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: disabled_off|
|Load (avg)|5, 3, 2|
|Memory (System)|22.92GB (14.26GB free)|
|Process Argv|--crash-reporter-id 51db9f8a-de32-42b1-a0dc-4b272906e496|
|Screen Reader|no|
|VM|0%|
|DESKTOP_SESSION|gnome|
|XDG_CURRENT_DESKTOP|GNOME|
|XDG_SESSION_DESKTOP|gnome|
|XDG_SESSION_TYPE|wayland|
</details><details><summary>Extensions (13)</summary>

Extension|Author (truncated)|Version
---|---|---
vscode-clangd|llv|0.1.26
vscode-docker|ms-|1.29.0
jupyter-keymap|ms-|1.1.2
remote-ssh|ms-|0.109.0
remote-ssh-edit|ms-|0.86.0
cmake-tools|ms-|1.17.17
cpptools|ms-|1.19.5
cpptools-extension-pack|ms-|1.3.0
hexeditor|ms-|1.9.14
remote-explorer|ms-|0.4.3
scala|sca|0.5.7
ruby-lsp|Sho|0.5.11
cmake|twx|0.0.17

(1 theme extensions excluded)

</details><details>
<summary>A/B Experiments</summary>

```
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscoreces:30445986
vscod805:30301674
binariesv615:30325510
vsaa593:30376534
py29gd2263:30899288
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
pythongtdpath:30769146
welcomedialogc:30910334
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
h48ei257:30968133
pythontbext0:30879054
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
bf62j303:30959262
cppperfnew:30979542
d34g3935:30971562
edj9j583:30969295
fegfb526:30973843
bg6jg535:30979843
dsvsc020:30976470

```

</details>

<!-- generated by issue reporter -->

This is a regression. I didn't see this error months ago. I attached stdout/stderr output and backtrace generated with lldb:

<details>
<summary>stdout/stderr</summary>

```
<--- Last few GCs --->

[41511:0x2000490000]       73 ms: Mark-Compact (reduce) 0.7 (2.9) -> 0.7 (1.9) MB, 0.91 / 0.00 ms  (average mu = 0.361, current mu = 0.014) last resort; GC in old space requested
[41511:0x2000490000]       74 ms: Mark-Compact (reduce) 0.7 (1.9) -> 0.7 (1.9) MB, 0.99 / 0.00 ms  (average mu = 0.213, current mu = 0.003) last resort; GC in old space requested


<--- JS stacktrace --->


#
# Fatal JavaScript out of memory: CALL_AND_RETRY_LAST
#

/usr/bin/code: line 62: 41511 Trace/breakpoint trap   (Core dumped) ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@"
```
</details>

<details>
<summary>Backtrace generated by lldb</summary>

```
* thread #1, name = 'code', stop reason = signal SIGTRAP
  * frame #0: 0x0000aaaab38dd8ec code
    frame #1: 0x0000aaaab06c1e74 code`v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) + 2132
    frame #2: 0x0000aaaab069fda8 code`v8::internal::Factory::CodeBuilder::AllocateUninitializedInstructionStream(bool) + 228
    frame #3: 0x0000aaaab069f7d8 code`v8::internal::Factory::CodeBuilder::BuildInternal(bool) + 100
    frame #4: 0x0000aaaab06a0424 code`v8::internal::Factory::CodeBuilder::Build() + 20
    frame #5: 0x0000aaaab0ddc8b4 code`v8::internal::RegExpMacroAssemblerARM64::GetCode(v8::internal::Handle<v8::internal::String>) + 6424
    frame #6: 0x0000aaaab0a8db50 code
    frame #7: 0x0000aaaab0ab57a8 code
    frame #8: 0x0000aaaab0ab4ea0 code
    frame #9: 0x0000aaaab0ab3984 code`v8::internal::RegExp::Exec(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSRegExp>, v8::internal::Handle<v8::internal::String>, int, v8::internal::Handle<v8::internal::RegExpMatchInfo>, v8::internal::RegExp::ExecQuirks) + 7696
    frame #10: 0x0000aaaab0ad73b0 code
    frame #11: 0x0000aaaaf7ee2fc4
    frame #12: 0x0000aaaaf7f568b8
    frame #13: 0x0000aaaaf7e4e024
    frame #14: 0x0000aaaaf7ef79e4
    frame #15: 0x0000aaaaf7e4e024
    frame #16: 0x0000aaaaf7e4e024
    frame #17: 0x0000aaaaf7e4e024
    frame #18: 0x0000aaaaf7e4e024
    frame #19: 0x0000aaaaf7e4e024
    frame #20: 0x0000aaaaf7e4e024
    frame #21: 0x0000aaaaf7e4e024
    frame #22: 0x0000aaaaf7e4b910
    frame #23: 0x0000aaaaf7e4b5a4
    frame #24: 0x0000aaaab0622114 code
    frame #25: 0x0000aaaab0621de8 code`v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) + 168
    frame #26: 0x0000aaaab0505450 code`v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) + 768
    frame #27: 0x0000aaaab61aad98 code
    frame #28: 0x0000aaaab61ab0b8 code
    frame #29: 0x0000aaaab61ab284 code
    frame #30: 0x0000aaaab607f180 code`node::CreateEnvironment(node::IsolateData*, v8::Local<v8::Context>, std::__Cr::vector<std::__Cr::basic_string<char, std::__Cr::char_traits<char>, std::__Cr::allocator<char>>, std::__Cr::allocator<std::__Cr::basic_string<char, std::__Cr::char_traits<char>, std::__Cr::allocator<char>>>> const&, std::__Cr::vector<std::__Cr::basic_string<char, std::__Cr::char_traits<char>, std::__Cr::allocator<char>>, std::__Cr::allocator<std::__Cr::basic_string<char, std::__Cr::char_traits<char>, std::__Cr::allocator<char>>>> const&, node::EnvironmentFlags::Flags, node::ThreadId, std::__Cr::unique_ptr<node::InspectorParentHandle, std::__Cr::default_delete<node::InspectorParentHandle>>, std::__Cr::function<void (node::Environment*, v8::Local<v8::Value>, v8::Local<v8::Value>)>) + 296
    frame #31: 0x0000aaaaaf3a2c5c code
    frame #32: 0x0000aaaaaf39e174 code
```
</details>