close
The Wayback Machine - https://web.archive.org/web/20200919205446/https://github.com/ogham/exa/issues/711
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

`exa --long --git` crashes in a directory with a dangling symlink #711

Open
christianlavoie opened this issue Aug 3, 2020 · 4 comments
Open

Comments

@christianlavoie
Copy link

@christianlavoie christianlavoie commented Aug 3, 2020

v0.9.0:

$ exa --version
exa v0.9.0
$ RUST_BACKTRACE=1 exa --long --git
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /home/clavoie/.cargo/registry/src/github.com-1ecc6299db9ec823/exa-0.9.0/src/fs/feature/git.rs:268:5
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:78
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1076
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1537
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:198
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:218
  10: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:486
  11: rust_begin_unwind
             at src/libstd/panicking.rs:388
  12: core::panicking::panic_fmt
             at src/libcore/panicking.rs:101
  13: core::option::expect_none_failed
             at src/libcore/option.rs:1272
  14: exa::fs::feature::git::reorient
  15: exa::fs::feature::git::Git::status
  16: exa::output::table::Table::display
  17: <F as scoped_threadpool::FnBox>::call_box
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Aborted (core dumped)

Interestingly, you need both arguments to crash it, neither is enough alone. Also, $ exa --long --git dangling-symlink does NOT crash at all, it seems to only be when listing a directory that happens to contain a dangling symlink, not the symlink itself.

@nikeee
Copy link

@nikeee nikeee commented Aug 18, 2020

I just ran into the same issue on my machine.

Steps to reproduce:

mkdir /tmp/a
cd /tmp/a
ln -s ../../test
git init

exa --long --git
@felixyz
Copy link

@felixyz felixyz commented Aug 28, 2020

I have the same or a similar issue under fish, but crashes when --long is present, regardless of other flags.

❯ RUST_BACKTRACE=1 exa --long
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: SystemTimeError(2147483648s)', src/libcore/result.rs:999:5
stack backtrace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: start_thread
  14: __clone
fish: “RUST_BACKTRACE=1 exa --long” terminated by signal SIGABRT (Abort)
@flamendless
Copy link

@flamendless flamendless commented Aug 29, 2020

I also experience this issue (even without the --git)

 :: RUST_BACKTRACE=1 exa -l                                                                                                                       [b643746]
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: SystemTimeError(2147483648s)', src/fs/file.rs:331:9
stack backtrace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: start_thread
  15: __GI___clone
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
[1]    2618380 abort (core dumped)  RUST_BACKTRACE=1 exa -l
@peikk0
Copy link

@peikk0 peikk0 commented Aug 30, 2020

Same issue here with exa --long --git, the panic is gone after removing the dangling symlink.

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

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.