mojo-lsp-server crashing

Is it crashing for anybody else? I'm using it with neovim and I can reliably make it crash after a couple of minutes of using it.
20 Replies
xentropy
xentropyOP3mo ago
[ERROR][2024-08-27 15:40:05] .../vim/lsp/rpc.lua:770 "rpc" "/home/xentropy/.modular/pkg/packages.modular.com_max/bin/mojo-lsp-server" "stderr" "[18617:18617:20240827,154005.398678:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)\n[18617:18617:20240827,154005.398728:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)\n"
[ERROR][2024-08-27 15:40:05] .../vim/lsp/rpc.lua:770 "rpc" "/home/xentropy/.modular/pkg/packages.modular.com_max/bin/mojo-lsp-server" "stderr" "Please submit a bug report to https://github.com/modularml/mojo/issues and include the crash backtrace along with all the relevant source codes with the contents they had at crash time.\n"
[ERROR][2024-08-27 15:40:05] .../vim/lsp/rpc.lua:770 "rpc" "/home/xentropy/.modular/pkg/packages.modular.com_max/bin/mojo-lsp-server" "stderr" "[18617:18617:20240827,154005.398678:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)\n[18617:18617:20240827,154005.398728:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)\n"
[ERROR][2024-08-27 15:40:05] .../vim/lsp/rpc.lua:770 "rpc" "/home/xentropy/.modular/pkg/packages.modular.com_max/bin/mojo-lsp-server" "stderr" "Please submit a bug report to https://github.com/modularml/mojo/issues and include the crash backtrace along with all the relevant source codes with the contents they had at crash time.\n"
Looks like the issue is related to /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq From what I just found in a quick search, could be related to WSL2 or Hyper-V
a2svior
a2svior3mo ago
Yeah it's crashing for me quite often on nightly with VSCode, I think it's somehow connected with code having e.g compilation errors, if these are present or there's a lot of them it crashes
xentropy
xentropyOP3mo ago
Yep same behavior for me. What OS are you using?
Caroline
Caroline3mo ago
Hi! It sounds like this might be the same issue folks are discussing here https://discord.com/channels/1087530497313357884/1224434323193594059/1278068604696264766 – which @Walter Erquinigo is working on a fix for 🙏
ModularBot
ModularBot3mo ago
Congrats @Caroline, you just advanced to level 2!
Walter Erquinigo
Could one share some code snippet that makes the LSP crash?
ModularBot
ModularBot3mo ago
Congrats @Walter Erquinigo, you just advanced to level 3!
xentropy
xentropyOP3mo ago
Well, that's tricky because it's not just one code snippet. It's kind of as a2svior described. Let me try yeah it's kind of dynamic. I can't just do it with a certain code snippet. I have to produce a lot of errors pretty quickly The best info I can give you is it is crashing because it tries to open this: /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq that file is not implemented for me in WSL2 perhaps it is trying to throttle itself from using too much cpu
a2svior
a2svior3mo ago
I'm on Mac M1 Sonoma Not sure if this helps, but for me if I clone e.g. the Lightbug repo https://github.com/saviorand/lightbug_http and try to open some files when running a nightly version of the VSCode extension (e.g. if I open external/libc.mojo) it crashes at some point, because the code is not yet migrated to nightly and there's a lot of errors
Walter Erquinigo
Has this gotten better with the last nightly?
xentropy
xentropyOP3mo ago
I'll check and let you know.
ModularBot
ModularBot3mo ago
Congrats @xentropy, you just advanced to level 3!
xentropy
xentropyOP3mo ago
Looks like it's still trying to access this non-existent file: /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq I'm running WSL2 with Ubuntu and that whole cpufreq path is missing.
Walter Erquinigo
I'm almost sure that the scaling_cur_freq error message is benign. It's used to compute some performance bits when available for telemetry. What I think is the actual error is the following:
pure virtual method called\nterminate called without an active exception
pure virtual method called\nterminate called without an active exception
I'll have someone on the team debug this
xentropy
xentropyOP3mo ago
awesome! Would it help if I gave a more complete log? I just gave the last 15 lines
Walter Erquinigo
Plesae, send the entire log @Lily Brown should be able to help with this next week because I'll be on vacations
a2svior
a2svior3mo ago
I'm not getting the crashes anymore on the latest nightly 🙏
Walter Erquinigo
Awesome! Now it's just about the issue that xentry po is running into
xentropy
xentropyOP3mo ago
Still crashing. Tried the latest nightly today.
Want results from more Discord servers?
Add your server