-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Orphaned fish @ 100% cpu after 3.0.0 upgrade #5528
Comments
Can you please reinstall with |
@mqudsi sure. might take a few days to know if it reproduces though. |
Sounds good, thanks. |
|
I recall seeing this from time to time when running |
I have the same issue on Arch Linux
Trying to figure out what is causing this. |
@raichoo, yes, around 2.4.0 there were ongoing problems with orphaned processes. I never really got to the bottom of it. @devsnek, sometimes the build fails like that if you have GNU binutils installed (see #5296). You could try unlinking or removing it first ( @Gonzih could you try getting a backtrace from a spinning process? |
|
Huh I get a different backtrace every time
But it looks like this is all related to readline call. Reproducing is very simple:
This should endup in fish shell daemon process being stuck in a loop on 100% of cpu usage. |
Is this the case when shell instance looses STDIN because terminal emulator was closed or something? Just speculating based on behavior I experienced. |
@Gonzih: That should be basically it, yeah. It appears we're not checking an error somewhere. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This issue has gotten very messy. Please do not comment unless you are building from Thanks! |
Happened again on the HEAD install @mqudsi
|
@devsnek with 100% cpu? |
@mqudsi bouncing between 94ish and 100% |
On commit c66b312 .
|
happened again, same backtrace
|
What should happen here is that the Unfortunately I think we need steps to reproduce - any hints on how to trigger this @devsnek or @exrok? Does it happen after pasting...? What OS, terminal, etc? |
@ridiculousfish macos 10.14.3 beta, but i don't have any reproduction steps. i've tried a few times and can't find anything that triggers it. |
@ridiculousfish os: Arch Linux, urxvt terminal, does not seam to happen after pasting. I only ever notice it because high CPU usage and then find in my htop. Even after closing all terminals and tmux sessions the process will still exist and has to be killed directly. I have tried to reproduce it to no avail. It has happened over 10 times combined between my desktop and laptop. |
yes, I do use vi mode |
This happens to me too. I use vi key bindings and I am able to reproduce by killing a terminal when it is in normal mode. |
@kbrah: Please try |
@faho I am using vi mode as well, |
So, I think I almost understand this. To get it to trigger, set up vi-mode, then enter normal mode and immediately quit the terminal - I think it has to be before the escape timeout has elapsed. That causes us, for reasons not yet clear to me, to have R_NULL in the input queue, followed by (I think) R_EOF. We read R_NULL, and since we can't do anything with it, put it back. So we never get to the R_EOF, so we never quit. But I don't quite get what R_NULL is for. Is it a separator between mappings? So you only ever read one at the end of a mapping? |
Yes I also do use vi mode in shell. I noticed since update to 3.0.0 that exiting back to normal mode "felt" a bit off. |
Okay, I think I got it. There's two different issues. One is with The other is actually looping on R_EOF (the "symbol" we assign to getting an EOF on stdin)! Because there's no generic binding to read an R_EOF, in this case it'll read R_EOF, try to execute a mapping on it, find nothing, put it back, and repeat, without ever returning. So the solution is simply to do an early return - R_EOF can only ever signal that we need to quit anyway. |
If we read an R_EOF, we'd try to match mappings to it. In emacs mode, that's not an issue because the generic binding was always available, but in vi-normal mode there is no generic binding, so we'd endlessly loop, waiting for another character. Fixes #5528.
And cherry-picked to Integration_3.0.1 as 8feabae. |
Was annoyed by this issue. Thanks @devsnek a lot for reporting this. |
version is 3.0.0
macos 10.14.2
Every other day or so, i notice my laptop is running hot and slow, and i open up activity monitor and notice this:
These processes are seemingly left over, as my terminal isn't usually even open in these cases.
It started happening after i upgraded to 3.0.0
The text was updated successfully, but these errors were encountered: