Environment
OS: Ubuntu 24.04.1 (kernel 6.17.0-14-generic), x86_64
VS Code: 1.109.5 (commit 072586267e68ece9a47aa43f8c108e0dcbf44622)
Mojo VS Code extension: modular-mojotools.vscode-mojo@26.2.0
Mojo toolchain used for project: mojo==0.25.6.1 (installed via pip into venv; MMMAudio main branch is tied to 0.25.6.1)
Python: 3.12.3
Project/workspace: https://github.com/spluta/MMMAudio at commit 0f9d24caadc38d41f1c248c5e7fce76afbde651c
What happens
When opening the MMMAudio workspace in VS Code, the Mojo language server process mojo-lsp-server steadily grows in memory usage until the system becomes sluggish/unresponsive, and then the Linux OOM killer terminates mojo-lsp-server. In one run, mojo-lsp-server also segfaulted prior to OOM.
This causes Mojo IDE features to stop working (hover/highlighting/completions) and VS Code may appear to “crash”/freeze due to system-wide memory pressure.
Evidence (kernel logs)
From sudo dmesg -T:
less
[Thu Mar 12 17:04:28 2026] 🔥 Thread2[15329]: segfault at 5c222084d000 ip 00005c1e37eb16f0 sp 000078ecc7ffd940 error 4 in mojo-lsp-server[9576f0,5c1e37dc8000+13c8000] likely on CPU 7 (core 12, socket 0)
[Thu Mar 12 17:07:25 2026] VizCompositorTh invoked oom-killer: gfp_mask=0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), order=0, oom_score_adj=200
[Thu Mar 12 17:07:25 2026] [ 15321] 1000 15321 5207860 3351645 3351517 128 0 35373056 700800 100 mojo-lsp-server
[Thu Mar 12 17:07:25 2026] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/user@1000.service/app.slice/app-org.chromium.Chromium-14557.scope,task=mojo-lsp-server,pid=15321,uid=1000
[Thu Mar 12 17:07:25 2026] Out of memory: Killed process 15321 (mojo-lsp-server) total-vm:20831440kB, anon-rss:13406068kB, file-rss:512kB, shmem-rss:0kB, UID:1000 pgtables:34544kB oom_score_adj:100
(anon-rss ~13.4GB)
Steps to reproduce
Install modular-mojotools.vscode-mojo@26.2.0
Clone MMMAudio and open the repo root in VS Code:
git clone https://github.com/spluta/MMMAudio
open folder in VS Code
Wait for Mojo language features to initialize / indexing to occur; open a .mojo file and/or trigger hover/completions
Observe mojo-lsp-server memory growth; system becomes sluggish; eventually OOM kills mojo-lsp-server (see dmesg above)
Expected
Mojo LSP remains stable and bounded in memory usage
No segfaults
VS Code remains responsive, Mojo language features continue to work
Actual
mojo-lsp-server memory grows without bound (eventually ~13GB anon RSS)
System becomes sluggish/unresponsive
Kernel OOM killer terminates mojo-lsp-server
Sometimes mojo-lsp-server segfaults
Notes
This may be related to workspace indexing scope. In earlier experiments, having a large in-workspace Python venv/ (many GB) seemed to exacerbate the issue. Even after moving the venv outside the repo, the issue still reproduces.
Environment
What happens
When opening the MMMAudio workspace in VS Code, the Mojo language server process mojo-lsp-server steadily grows in memory usage until the system becomes sluggish/unresponsive, and then the Linux OOM killer terminates mojo-lsp-server. In one run, mojo-lsp-server also segfaulted prior to OOM.
This causes Mojo IDE features to stop working (hover/highlighting/completions) and VS Code may appear to “crash”/freeze due to system-wide memory pressure.
Evidence (kernel logs)
From sudo dmesg -T:
less
[Thu Mar 12 17:04:28 2026] 🔥 Thread2[15329]: segfault at 5c222084d000 ip 00005c1e37eb16f0 sp 000078ecc7ffd940 error 4 in mojo-lsp-server[9576f0,5c1e37dc8000+13c8000] likely on CPU 7 (core 12, socket 0)
[Thu Mar 12 17:07:25 2026] VizCompositorTh invoked oom-killer: gfp_mask=0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), order=0, oom_score_adj=200
[Thu Mar 12 17:07:25 2026] [ 15321] 1000 15321 5207860 3351645 3351517 128 0 35373056 700800 100 mojo-lsp-server
[Thu Mar 12 17:07:25 2026] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/user@1000.service/app.slice/app-org.chromium.Chromium-14557.scope,task=mojo-lsp-server,pid=15321,uid=1000
[Thu Mar 12 17:07:25 2026] Out of memory: Killed process 15321 (mojo-lsp-server) total-vm:20831440kB, anon-rss:13406068kB, file-rss:512kB, shmem-rss:0kB, UID:1000 pgtables:34544kB oom_score_adj:100
(anon-rss ~13.4GB)
Steps to reproduce
Expected
Actual
Notes
This may be related to workspace indexing scope. In earlier experiments, having a large in-workspace Python venv/ (many GB) seemed to exacerbate the issue. Even after moving the venv outside the repo, the issue still reproduces.