I'm currently attempting to debug an Emacs freeze that occurs when I attempt to open a new Rust project that lives in a particular folder using rust-analyzer. When I open one of these projects, my Emacs hangs using 100% CPU.
Following the the advice here about debugging a frozen Emacs and using lldb I am able to get a stack trace from Emacs and Emacs lisp which I have pasted below in the dropdowns.
It looks to me (and I could very well be completely wrong) that the problem is that lsp--directory-files-recursively is doing an incorrect traversal of the root folder that has been chosen. The part from the stack trace that makes me think that is this:
Notice how it starts in the zekemedley/projects folder and then ends up traversing zekemedley/Desktop. My guess is that this is what is causing the high cpu usage and hang. Note that lsp also appears to be choosing the wrong root folder as the file being opened is in projects/emacstest/src/main.rs.
I'm wondering if anyone has thoughts on if this behavior is actually incorrect and any tips on debugging these. I'm happy to look into this more myself if it seems like I'm correctly identifying the problem.
I'm currently attempting to debug an Emacs freeze that occurs when I attempt to open a new Rust project that lives in a particular folder using
rust-analyzer
. When I open one of these projects, my Emacs hangs using100%
CPU.Following the the advice here about debugging a frozen Emacs and using lldb I am able to get a stack trace from Emacs and Emacs lisp which I have pasted below in the dropdowns.
It looks to me (and I could very well be completely wrong) that the problem is that
lsp--directory-files-recursively
is doing an incorrect traversal of the root folder that has been chosen. The part from the stack trace that makes me think that is this:Notice how it starts in the
zekemedley/projects
folder and then ends up traversingzekemedley/Desktop
. My guess is that this is what is causing the high cpu usage and hang. Note thatlsp
also appears to be choosing the wrong root folder as the file being opened is inprojects/emacstest/src/main.rs
.I'm wondering if anyone has thoughts on if this behavior is actually incorrect and any tips on debugging these. I'm happy to look into this more myself if it seems like I'm correctly identifying the problem.
Emacs Lisp stack trace
lldb stack trace