xplr: panicked at 'assertion failed: tv_nsec >= 0 && tv_nsec < NSEC_PER_SEC as i64

With the latest update 0.20.2, when I try to run the xplr command in the terminal, I’m getting this error:

thread 'main' panicked at 'assertion failed: tv_nsec >= 0 && tv_nsec < NSEC_PER_SEC as i64', library/std/src/sys/unix/time.rs:66:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
nushell: oops, process 'xplr' core dumped

OS: Arch Linux Terminal: Alacritty Shell: Nushell (I tried with Bash too but still the same error) Rust: 1.66.1 stable Compositor: Labwc (Wayland)

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 26 (10 by maintainers)

Most upvoted comments

https://github.com/rust-lang/rust/issues/108277 is closed now, the fix will be in Rust 1.78.0

I found out what was the problem on my machine (running arch with btrfs as FS) . xlpr crashes when there is a file or directory in the folder you are launching it (most likely your users home folder when you launch it the first time 😃 and there is a file/folder with an invalid time inside this directory. In my case the ‘birth time’ was way off (i think negative). Just check with ls -la --time-birthtime. The only way to change it (touch is not capable of changing this time) was to copy it to a temporal location, delete the original and move the copied folder/file. stat returns the birth time of a specific file. unfortunately i was not able to use find to search for such occurrences, the parameter --newerBB did not work, falsely telling that the system does not provide a way to find the birth time of a file. I suggest a ‘soft check’ with some output before the assert and the following panic, so that the user gets informed in some way what file caused the crash.

Apparently it’s a filesystem/kernel bug, not related to xplr or other rust tools. Formatting the system might work, but doesn’t guarantee it won’t happen again. Until a solution is available, the best thing we can do now is find out exactly which systems are affected, and avoid them.

Fix: typo

Same error on xplr-linux.tar.gz, but works fine on xplr-linux-musl.tar.gz