You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
After quitting MacVim a vim process consuming 99.8% CPU is left #1423
Huh that's not great. So basically Vim crashed and yet is using max CPU? One thing that's been on my TODO list is to expose crash logs better so it's easier for users to find them.
I posted some instructions at this comment before (#1407 (comment)). Basically you can directly find them in Console.app, or ~/Library/Logs/DiagnosticReports. If you see it again (or if it's recent), feel free to see if you find the crash log. I would be interested to see where it's crashing. Thanks.
After some initial investigation, this is a weird confluence of factors due to how the IPC mechanism works (which is quite outdated and needs to be replaced in #1157). In particular, during shutdown, an autocmd triggers a serverlist() call in your configs, which ends up calling the invalidated connection since it's been shutdown. It only happens sometimes because usually shutdown is done cleanly.
I will submit a fix, but for now, if this bugs you, you could identify which plugin/config is calling serverlist() when BufWinLeave is triggered and disable that and I think it would alleviate the issue. You will still see a "dropping incoming DO message" message on terminal but it should at least shut down cleanly.
Actually are you sure you were doing Cmd-W when that happened? Or do you think you could be hitting Cmd-Q instead? It's fine if you don't remember, but it's just that the callstack makes me believe that was a Cmd-Q instead, although I'm still not sure.
Actually when I observed more carefully most of the time the issue happens is when Cmd + Q is clicked. 🙄
What usually happens is I Cmd + Q and then work on something else. There I do Cmd + W and then notice the error and Activity Log, I wrongly associated this with Cmd + W. Sorry for misleading
Cool, thanks. There are actually a fair bit of issues with the current way that MacVim is structured as it's vulnerable to zombie orphaned Vim processes if something went wrong, so I'm trying to prioritize fixing the immediate issue first. I think the Cmd + Q one is easy to identify and fix so that's good to hear.
Activity
ychin commentedon Aug 11, 2023
Huh that's not great. So basically Vim crashed and yet is using max CPU? One thing that's been on my TODO list is to expose crash logs better so it's easier for users to find them.
I posted some instructions at this comment before (#1407 (comment)). Basically you can directly find them in Console.app, or
~/Library/Logs/DiagnosticReports. If you see it again (or if it's recent), feel free to see if you find the crash log. I would be interested to see where it's crashing. Thanks.RStankov commentedon Aug 15, 2023
@ychin Here is the
DiagnosticReportsVim-2023-08-15-120214_ips.txt
I also had the following in the terminal:
ychin commentedon Aug 15, 2023
Oh interesting. That helps a lot! I just happen to be looking at that part of the code for unrelated reasons. Thanks for the logs.
ychin commentedon Aug 16, 2023
After some initial investigation, this is a weird confluence of factors due to how the IPC mechanism works (which is quite outdated and needs to be replaced in #1157). In particular, during shutdown, an autocmd triggers a
serverlist()call in your configs, which ends up calling the invalidated connection since it's been shutdown. It only happens sometimes because usually shutdown is done cleanly.I will submit a fix, but for now, if this bugs you, you could identify which plugin/config is calling
serverlist()whenBufWinLeaveis triggered and disable that and I think it would alleviate the issue. You will still see a "dropping incoming DO message" message on terminal but it should at least shut down cleanly.ychin commentedon Aug 17, 2023
Actually are you sure you were doing Cmd-W when that happened? Or do you think you could be hitting Cmd-Q instead? It's fine if you don't remember, but it's just that the callstack makes me believe that was a Cmd-Q instead, although I'm still not sure.
RStankov commentedon Aug 19, 2023
Thanks.
I think in this case I did cmd + Q.
RStankov commentedon Aug 20, 2023
Actually when I observed more carefully most of the time the issue happens is when Cmd + Q is clicked. 🙄
What usually happens is I Cmd + Q and then work on something else. There I do Cmd + W and then notice the error and Activity Log, I wrongly associated this with Cmd + W. Sorry for misleading
ychin commentedon Aug 21, 2023
Cool, thanks. There are actually a fair bit of issues with the current way that MacVim is structured as it's vulnerable to zombie orphaned Vim processes if something went wrong, so I'm trying to prioritize fixing the immediate issue first. I think the Cmd + Q one is easy to identify and fix so that's good to hear.
Fix Vim crashing when querying serverlist when quitting
Fix Vim crashing when querying serverlist when quitting
Fix Vim crashing when querying serverlist when quitting