Fork me on GitHub
#emacs
<
2022-04-13
>
diego.videco15:04:24

I’ve been having a huge amount of emacs crashes lately, where the UI just freezes and CPU usage goes to 100% (in MacOS), does anyone know how can I debug what’s going on?

dorab16:04:53

Is this happening in a bare emacs (with no additional packages loaded) as well? I'd try to isolate the package causing the problem by removing them one by one (or binary search).

diego.videco16:04:53

Haven’t tried on a bare emacs, but debuging like that sounds kind of painful. Is there any way to log what’s going on?

genmeblog16:04:36

Do you use clojure-lsp?

genmeblog16:04:44

Are you able to look at the processes? Also, please check lsp backend version.

genmeblog16:04:52

It was my case.

diego.videco16:04:00

hmm, yeah that might be the problem. I’ll try without that package and see if it gets fixed.

genmeblog16:04:59

My case is fixed so it's important to have the latest version of the backend.

diego.videco16:04:32

I see. Do you know if I update the clojure-lsp package does it update the lsp backend as well?

genmeblog17:04:34

No, it should be done separately.

plexus08:04:04

A trick that might or might not help you, if send emacs a SIGUSR2 signal it will interrupt whatever it's doing and enter the debugger. I've used this countless times to unjam an Emacs that's spinning at 100%, and the stacktrace can give you a hint of where the problem lies.

plexus08:04:01

e.g. killall -USR2 emacs on linux

plexus08:04:20

sometimes it's so stuck that even this doesn't help, but it's worth trying

plexus08:04:58

this will also turn on debut-on-quit, so it will enter the debugger every time you press C-g afterwards. You can turn that back off with M-x toggle-debug-on-quit

diego.videco17:04:46

thanks plexus will try that