Skip to content
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

fd hangs after accepting entry in fuzz finder #353

Closed
Konfekt opened this issue Oct 25, 2018 · 5 comments
Closed

fd hangs after accepting entry in fuzz finder #353

Konfekt opened this issue Oct 25, 2018 · 5 comments

Comments

@Konfekt
Copy link

Konfekt commented Oct 25, 2018

What is the version, OS, architecture?

fd version 7.1.0
the fuzzy finder peco version v0.5.3 (built with go1.10),
OpenSUSE 15.0, 64 bit

Abstract

In bash or zsh, ONLY in the root dir /, the command

 fd | peco

has to be aborted for the terminal to accept input again after hitting enter.

Discussion

In bash or zsh, in the root dir /, type

 fd | peco

search for a term, such as bin, and hit enter.
Expected: the selected term appears in the terminal.
What happens instead: The terminal is inaccessible and the command fd has to be aborted by Ctrl+C.

This does not happen for other grep tools, such as ag or rg. It ONLY occurs for fd and ONLY in the root dir /.

The command peco quit, but fd is still running, consuming nearly 100 % of available CPU time.

See peco/peco#464

@sharkdp
Copy link
Owner

sharkdp commented Oct 26, 2018

Thank you for the detailed bug report.

This sounds very much like #288 which has recently been fixed (but not released yet).

Could you please check if there are any zombie processes on your system (which trigger the bug above)?

ps -ef | grep '<defunct>'

@Konfekt
Copy link
Author

Konfekt commented Oct 27, 2018

Yes, there are

 2376  2355  0 oct.17 ?       00:00:00 [Xsession] <defunct>
 2570  2555  0 oct.17 ?       00:00:00 [sh] <defunct>
14175 14024  0 06:35 pts/7    00:00:00 <defunct>

@sharkdp
Copy link
Owner

sharkdp commented Oct 27, 2018

Ok. This error is caused by a bug in the Rust standard library which I have fixed here: rust-lang/rust#50630

If you don't want to wait for the next release of fd, you can either:

  • compile fd yourself with a recent version of Rust (1.29 or 1.30)
  • or call fd from the root directory with --exclude /proc.
  • or try to get rid of the zombie processes.

@Konfekt
Copy link
Author

Konfekt commented Oct 27, 2018

Thank you!

@Konfekt Konfekt closed this as completed Oct 27, 2018
@sharkdp
Copy link
Owner

sharkdp commented Oct 27, 2018

Fix has been released in fd-7.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants