Repository navigation
Closed
Labels
bugIssue identified by VS Code Team member as probable bugchromiumIssues and items related to Chromiumfreeze-slow-crash-leakVS Code crashing, performance, freeze and memory leak issuesinsiders-releasedPatch has been released in VS Code InsidersupstreamIssue identified as 'upstream' component related (exists outside of VS Code)verifiedVerification succeeded
Milestone
Description
Type: Bug
- Enable a extension that use
tree-sitter(e.g.sourcegraph.cody-ai) to parse code when the document was opened. - Open the file
HabitApp/ViewModels/HabitViewModel.swiftin the provided repo and reload VS Code. - The Extension Host Keeps Crashing and Restart.
- But We Cannot Reproduce the Bug under the development mode, only can Reproduce under the production build VS Code.
- When downgraded the VS Code to 1.97.2 or lower, all goes well again.
VS Code version: Code 1.98.1 (Universal) (2fc07b8, 2025-03-10T15:38:08.854Z)
OS version: Darwin arm64 24.3.0
Modes:
System Info
| Item | Value |
|---|---|
| CPUs | Apple M1 Pro (10 x 2400) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: enabled_on 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: enabled webgl: enabled webgl2: enabled webgpu: enabled webnn: disabled_off |
| Load (avg) | 7, 6, 5 |
| Memory (System) | 32.00GB (0.07GB free) |
| Process Argv | --crash-reporter-id ee6c6063-dc4d-4046-86aa-3ecac86adba5 |
| Screen Reader | no |
| VM | 0% |
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyonecf:30548226
962ge761:30959799
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dwnewjupytercf:31046870
nativerepl2:31139839
pythonrstrctxt:31112756
nativeloc2:31192216
iacca1:31171482
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
9064b325:31222308
copilot_t_ci:31222730
f5992895:31259995
jda6j935:31233686
fh1c7952:31258891
6h6a5794:31261449
h6j33387:31256343
0339e702:31259951
Reacted by Paulius, Saulė Jonynaitė, Dmitrij Purynzin, PauliusJaskutelis, Mattwmaster58, Jimmy (Ho Jun Lee), Eglė, Andreas Arvidsson, Pokey Rule and Rei Schädeli
Reacted by Eglė and PauliusJaskutelis
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugchromiumIssues and items related to Chromiumfreeze-slow-crash-leakVS Code crashing, performance, freeze and memory leak issuesinsiders-releasedPatch has been released in VS Code InsidersupstreamIssue identified as 'upstream' component related (exists outside of VS Code)verifiedVerification succeeded
Activity
vs-code-engineering commentedon Mar 17, 2025
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.98.2. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!
lyngai commentedon Mar 17, 2025
Can reproduce using the latest version.
Extension Bisect points out a abnormal extension. But I'm sure this is a bug related to VS Code itself.
deepak1556 commentedon Mar 18, 2025
crash is in the turboshaft optimizing compiler, I haven't looked into why it is crashing yet. Following can serve as a workaround,
lyngai commentedon Mar 18, 2025
it works fine using this patch
lyngai commentedon Mar 18, 2025
Robo (@deepak1556) Will this problem be fixed in the next patch release of VS Code 1.98?
deepak1556 commentedon Mar 18, 2025
I haven't been able to repro the issue in an example extension, using the same steps as cody to load the tree-sitter wasm on the provided swift files. So without identifying the root cause I can't guarantee a fix just yet, will post updates here as I make progress
lyngai commentedon Mar 18, 2025
Robo (@deepak1556) Thanks. Waiting for good news.
Maybe you can try to parse more file in one instance. It is really hard to repro.
We first discovered the problem in our in-house extension, which uses tree-sitter in a
worker_threadto parse all files in the opened workspace. It doesn't always crash on large repos or files, it even crashes during parsing multiple small files. In our case, the crash point most occurs after invokingparser.parse.Finally, we found it stop crashing after changing this module to run as a forked process. Hope this helps.
29 remaining items
RedCMD commentedon Jul 26, 2025
lyngai I notice theres an extra bracket in that file
https://github.com/lyngai/swift-repo-crashes/blob/4c822f09f18f4bcbf75f7c4ce73d311c38eb6789/HabitApp/ViewModels/HabitViewModel.swift#L22
but I'm not seeing any crash regardless
eglekaz commentedon Sep 30, 2025
Robo (@deepak1556)
Are there any news on this one?
aventurella-netflix commentedon Oct 7, 2025
Just wanted to add a data point on this. I was experiencing the same thing. Using web-tree-sitter, loads the tree-sitter.wasm just fine:
Parser.init(). I would create the parser and the language usingtree-sitter-swift.wasmfrom : https://github.com/alex-pinkus/tree-sitter-swift, also just fine. It seemed to be triggered by tree-sitter parsing code.If I ran the extension in the developer extension host there was not an issue. It was only when I packaged the extension and attempted to execute the same code paths, where in the developer extension host ran without incident, I received the
Fatal process out of memory: Zoneerror in the non-developer vscode process.I did a few things to see investigate. The Swift file I was loading for parsing was quite large, so I trimmed it down to ~ 50 lines; Same issue:
Fatal process out of memory: Zone.Next I figured I would try runnign it in a Worker thread to see if that would have any impact. The code ran, but then it failed with
Fatal process out of memory: Zone. Here at least the code did execute, but again it was immediately followed by the error.Finally, I did the same test, but ran the code in a child process via
spawn. No Error.So it seems to be scoped vscode process. It was not happening when I ran the extension under the development extension host. It only occurred for me when running the packaged extension in vscode. It didn't happen at all when I ran the code in a child process from vscode.
deepak1556 commentedon Oct 8, 2025
Sorry I don't have any additional updates on this
Thanks, this would be from the heap limit set for VSCode process via V8 sandbox. We cannot bump the heap limit however doing that would only be a workaround.
Early on in the issue it was confirmed issue only started happening with turboshaft backend for wasm compilation, so there must be some improvements missing or bug in the new backend that should be pursued upstream.
deepak1556 commentedon Nov 7, 2025
Update, we were able to narrow down the source of the crash and a fix will be available with 1.107 Insiders. More details in #273191