fzf nondeterministically hangs, can't be interrupted or quit

Created on 28 Apr 2020  Â·  3Comments  Â·  Source: junegunn/fzf

  • [x] I have read through the manual page (man fzf)
  • [x] I have the latest version of fzf
  • [x] I have searched through the existing issues

Info

  • OS

    • [X] Linux

    • [ ] Mac OS X

    • [ ] Windows

    • [ ] Etc.

  • Shell

    • [X] bash

    • [ ] zsh

    • [ ] fish

Problem / Steps to reproduce

Every once in a while, when I press Ctrl-R to trigger history completion
with fzf, the fzf process hangs and locks the whole shell.

What I see in my shell is:

$ `__fzf_history__`

(where $ is my prompt). The text cursor is on the next line, and the
mouse cursor is in “pointer” mode (indicating that I can use the mouse
to click a selection), like it is when fzf is running properly, whereas
usually in a terminal the cursor is in “text” mode (looks like “工”).

Screenshot of broken state

I can’t get out of this state with Ctrl-C or Ctrl-Backslash (SIGQUIT).
If I find the fzf process and send SIGKILL to it, then I recover my
shell session and there’s usually some gibberish in the command line:

Screenshot after SIGKILLing fzf

(In the above screenshot, '-web was the start of an fzf query that I
had started typing; I don’t know what the rest is.)

I have to run tput reset or reset to get my shell fully back to its
normal state (e.g., mouse cursor).

This happens both on a local machine and over SSH, in case that matters.

Next time this happens I’ll try to remember to grab a dump with gcore
in case that’s helpful.

I invoke fzf probably hundreds of times per day, and this happens maybe
once every few days, so it’s not super common. It can happen in a shell
where Ctrl-R has just worked a moment before.

Other than this, I’m super happy with fzf and recommend it to lots of
people; thanks very much for your continued work on it. :-)

not-reproducible

Most helpful comment

If you use fish 3.1.1, you should upgrade because it's broken. See #2008.

As for bash, I've never experienced the problem so I can't really tell what's going on. I'd suggest that you 1. use a different version of bash, 2. see if the problem is reproducible with a minimal shell configuration (i.e. nothing but fzf)

All 3 comments

I have similar problem in fish shell. Ctrl-R or Alt-C hangs the shell every time. Ctrl-C works for me.

I'm seeing this in fish shell also, but not in bash. Running fzf works fine, but fzf-history-widget with fish_trace enabled hangs on fzf --read0 --print0 -q '', which I think is this line: https://github.com/junegunn/fzf/blob/0.21.0/shell/key-bindings.fish#L50

If you use fish 3.1.1, you should upgrade because it's broken. See #2008.

As for bash, I've never experienced the problem so I can't really tell what's going on. I'd suggest that you 1. use a different version of bash, 2. see if the problem is reproducible with a minimal shell configuration (i.e. nothing but fzf)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chrisamow picture chrisamow  Â·  3Comments

jan-warchol picture jan-warchol  Â·  3Comments

natemara picture natemara  Â·  3Comments

fenuks picture fenuks  Â·  3Comments

alistaircolling picture alistaircolling  Â·  3Comments