Exa: Another panic: NotFound

Created on 26 Feb 2020  Â·  3Comments  Â·  Source: ogham/exa

I get this in a directory with a git repo running this command: exa --long --all --git --ignore-glob=node_modules

I see many issues just report panics here, but this one may be different because of the error: No such file or directory.

If the error included the file it was looking for, I could potentially find the problem.

> RUST_BACKTRACE=full ls
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/libcore/result.rs:999:5
stack backtrace:
   0:        0x10c419ee3 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h9ee514c692b21f1f
   1:        0x10c40e4b4 - std::panicking::default_hook::{{closure}}::h965a565a39a5c6a6
   2:        0x10c40d7cd - std::panicking::rust_panic_with_hook::hfb66282f4c2ad4bd
   3:        0x10c40d3bc - std::panicking::continue_panic_fmt::h968476d35e0218a2
   4:        0x10c40f998 - rust_begin_unwind
   5:        0x10c422869 - core::panicking::panic_fmt::h9ae3f9e1e367adff
   6:        0x10c3ea860 - core::result::unwrap_failed::h5867f5a7756603e8
   7:        0x10c3ed633 - exa::fs::feature::git::reorient::hbfca3c686c442325
   8:        0x10c3ece65 - exa::fs::feature::git::Git::status::h96b27e919797deb7
   9:        0x10c3cbdda - exa::output::table::Table::display::h0126c180bedcd47c
  10:        0x10c3d43d5 - <F as scoped_threadpool::FnBox>::call_box::hded7cbd175ad9dc1
  11:        0x10c3fcd8e - std::sys_common::backtrace::__rust_begin_short_backtrace::h0b2895b91c97f366
  12:        0x10c3fd3fa - core::ops::function::FnOnce::call_once{{vtable.shim}}::h55da96ad0c0b45da
  13:        0x10c41a57c - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::hf9b88d2d2fe073fd
  14:        0x10c41a356 - std::sys::unix::thread::Thread::new::thread_start::h34c632283a609b53
  15:     0x7fff766e12ea - _pthread_body
  16:     0x7fff766e4248 - _pthread_start
[1]    94364 abort      RUST_BACKTRACE=full exa --long --all --git --ignore-glob=node_modules

Most helpful comment

FYI I got this panic with version v0.9.0 (installed on macOS via homebrew) in a directory that had a broken soft link (link that pointed to a source file that no longer existed), but only when including the --git command line option. If I omit the git option, this avoids the panic. If I delete the broken soft link, but use the git option, this also avoids the panic.

All 3 comments

I had this problem too. Here's mine:

$ env RUST_BACKTRACE=full exa -la --git # note: fish shell syntax

thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/libcore/result.rs:999:5
stack backtrace:
   0:        0x10825eee3 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h9ee514c692b21f1f
   1:        0x1082534b4 - std::panicking::default_hook::{{closure}}::h965a565a39a5c6a6
   2:        0x1082527cd - std::panicking::rust_panic_with_hook::hfb66282f4c2ad4bd
   3:        0x1082523bc - std::panicking::continue_panic_fmt::h968476d35e0218a2
   4:        0x108254998 - rust_begin_unwind
   5:        0x108267869 - core::panicking::panic_fmt::h9ae3f9e1e367adff
   6:        0x10822f860 - core::result::unwrap_failed::h5867f5a7756603e8
   7:        0x108232633 - exa::fs::feature::git::reorient::hbfca3c686c442325
   8:        0x108231e65 - exa::fs::feature::git::Git::status::h96b27e919797deb7
   9:        0x108210dda - exa::output::table::Table::display::h0126c180bedcd47c
  10:        0x1082193d5 - <F as scoped_threadpool::FnBox>::call_box::hded7cbd175ad9dc1
  11:        0x108241d8e - std::sys_common::backtrace::__rust_begin_short_backtrace::h0b2895b91c97f366
  12:        0x1082423fa - core::ops::function::FnOnce::call_once{{vtable.shim}}::h55da96ad0c0b45da
  13:        0x10825f57c - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::hf9b88d2d2fe073fd
  14:        0x10825f356 - std::sys::unix::thread::Thread::new::thread_start::h34c632283a609b53
  15:     0x7fff6c8bd2ea - _pthread_body
  16:     0x7fff6c8c0248 - _pthread_start
fish: 'env RUST_BACKTRACE=full exa -la…' terminated by signal SIGABRT (Abort)

This is on Mac OS X 10.14.6 with exa v0.9.0.

Unfortunately I've not quite figured out how to reproduce it. It happens to me only for a specific Git repo that I zipped on another machine and then unpacked on this machine. But I can't get it to happen with a clean clone of the repo, even after zipping and unzipping. I would be willing to share it (it's FOSS) but it's over 400 MB unpacked. 👀

The bug does not trigger when I omit --git.

I'll try some more things to see if I can trigger it.

FYI I got this panic with version v0.9.0 (installed on macOS via homebrew) in a directory that had a broken soft link (link that pointed to a source file that no longer existed), but only when including the --git command line option. If I omit the git option, this avoids the panic. If I delete the broken soft link, but use the git option, this also avoids the panic.

Awesome. Now it's reproducible. 🙂

Test case:

~> cd ~
~> mkdir test
~> cd test
~/test> git init
Initialized empty Git repository in /Users/msikma/test/.git/
~/test> ln -s /nonexistent nonexistent
~/test> exa -l --git
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/libcore/result.rs:999:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
fish: 'exa -l --git' terminated by signal SIGABRT (Abort)
~/test> rm nonexistent
~/test> exa -l --git # no output, as expected
~/test>
Was this page helpful?
0 / 5 - 0 ratings