Ripgrep: System immediately freezes on keyboard interrupt / kill

Created on 20 Jun 2019  路  8Comments  路  Source: BurntSushi/ripgrep

What version of ripgrep are you using?

ripgrep 11.0.1
-SIMD -AVX (compiled)
+SIMD +AVX (runtime)

How did you install ripgrep?

Using cargo, but I also got the same error when running the brew version.

What operating system are you using ripgrep on?

Mac OS v.10.14.5 (18F132)

Describe your question, feature request, or bug.

Attempting to interrupt ripgrep is causing my system to freeze. This is true both of ^C keyboard interrupt and of using another terminal window to issue a kill command for the ripgrep process. The system freeze is immediate and includes the mouse, the spinner at the top of the terminal tab window, etc.

The system remained frozen for perhaps 10 minutes before I restarted it.

If this is a bug, what are the steps to reproduce the behavior?

This occurs on a large directory of Ruby on Rails code. I was searching for the word hello.

If this is a bug, what is the actual behavior?

It isn't possible to copy output, as the system immediately and apparently irremediably freezes.

question

All 8 comments

Sorry, but this bug report is not actionable. The only way I'd even be able to begin to diagnose this is if you provide the corpus you're searching.

From experience, it kind of smells like your system is out of memory, but I am not a macOS user, so I'm not sure. You'll probably need to debug this yourself. Try looking at system stats (such as memory/CPU usage via htop just before the freeze). Try also running ripgrep in single threaded mode, e.g., with the -j1 flag.

I followed the guidance in the previous "My Mac is freezing" issue, including having htop running. Memory usage is relatively low, and the crash is nearly instantaneous on sending the interrupt. I will see if I can get it to happen with a corpus that's not a proprietary codebase.

Was able to reproduce with

git clone https://github.com/torvalds/linux.git
cd linux
rg hello
# ^C

Apparently work has been pushing out BitDefender or messing with its settings in some way, which I've learned is causing coworkers issues with a variety of applications. If my issue isn't reproducible, that may be the cause. I will close the issue pending someone's reproducing it.

@Ethan826 Thanks! If you find out anything more about BitDefender or are able to draw any conclusions, then updating this issue would be great for posterity.

FWIW, I was able to checkout the Linux kernel, run your query and ^C it successfully on my mac dev box.

The security team at work whitelisted the various install locations (i.e. /usr/local/bin/rg, ~/.cargo/bin/rg, and in the Homebrew directory somewhere) in the configuration files for BitDefender, and the issue is fixed.

@Ethan826 Awesome, thanks for the follow up!

Thanks for your responsiveness and for making such a great application.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

daxim picture daxim  路  3Comments

davidtwco picture davidtwco  路  3Comments

kenorb picture kenorb  路  3Comments

bastienbc picture bastienbc  路  3Comments

danpintara picture danpintara  路  3Comments