Helix crashes and kills terminal emulator when opening a large file with clangd. #7754
Replies: 3 comments
-
This issue is likely tree-sitter-related. It looks like something got stuck somewhere and consumed all your memory. The linux OOM killer is fairly indiscriminate and likely killed the terminal because helix was a child process. I can't reproduce this problem on latest master. The file opens fairly quickly and scrolling it is actually quite smooth. Please test if the problem still occurs for you with a build from the master branch. |
Beta Was this translation helpful? Give feedback.
-
I compiled helix from the main branch and tried again, same result. Clangd goes up to 100% memory usage and the linux OOM killer shuts down clangd, helix, and the terminal emulator. I'll do some research to see if this has been found before with clangd. |
Beta Was this translation helpful? Give feedback.
-
Terminal is killed likely because systemd kills whole cgroup during oom condition. I assume you are using a DE which starts it's child processes in independent cgroups like Gnome, otherwise it would kill whole session. |
Beta Was this translation helpful? Give feedback.
-
Summary
When opening a large file with helix (
cosmopolitan.h
), my computer (Ryzen 9 5900x, 16GB RAM) goes up to 100% memory and not only does helix crash, my terminal emulator crashes too. It's not that unexpected to see a text editor crash opening a huge file, but I didn't expect it to also take my terminal emulator on the way.This crash is not terminal-emulator specific, I've reproduced it in both kitty and alacritty.
The errors I get from the system and from helix say that it's related to clangd. If this is a clangd bug should I report it there/should helix find a way to avoid this type of crash? Completely crashing the whole editor as well as the surrounding terminal emulator seems like something that should be pretty high-priority.
Reproduction Steps
From what I can tell, the only thing required to reproduce this is opening cosmopolitan.h (presumably with clangd installed as I'll get to).
Helix log
I was unable to collect any panic info as it takes the terminal emulator on its way out, but I was able to scrounge up some information from journalctl's logs as well as helix's log file.
Error in system logs:
I assume the system log says that it killed the process because it ran out of memory (makes sense). My main question is why the system decided to take out the what I assume are its parent processes.
Here's the last thing in
~/.cache/helix/helix.log
:Platform
Arch Linux
Terminal Emulator
Kitty 0.27.1 / Alacritty 0.11.0
Helix Version
Helix 22.12
Beta Was this translation helpful? Give feedback.
All reactions