bupstash icon indicating copy to clipboard operation
bupstash copied to clipboard

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: invalid value: integer `19`, expected `Unix` or `Windows`', src/index.rs:874:31

Open pschyska opened this issue 2 years ago • 6 comments

Hey, I have a bupstash repo with history since ~ June 2021 with 29 snapshots. Weekly, I test a few randomly selected snapshots by recovering to /dev/null. Since about a week this keeps failing with:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: invalid value: integer `19`, expected `Unix` or `Windows`'

I assume it coincides with the bupstash 0.11 release, but I didn't test this yet.

I couldn't find a reference in bupstash to this, I believe it comes from serde trying to deserialize OsString (or PathBuf?) With bupstash restore I'm able to get a backtrace:

$ RUST_BACKTRACE=1 bupstash restore --into . id="…"
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: invalid value: integer `19`, expected `Unix` or `Windows`', src/index.rs:874:31
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: bupstash::index::diff
   4: bupstash::client::restore_to_local_dir
   5: bupstash::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

$ RUST_BACKTRACE=full bupstash restore --into . id="…"
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: invalid value: integer `19`, expected `Unix` or `Windows`', src/index.rs:874:31
stack backtrace:
   0:     0x560e8b9bc55a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h4ceec17bcbdb5c25
   1:     0x560e8b8f78ec - core::fmt::write::h58e5282d62be0ade
   2:     0x560e8b9a7c74 - std::io::Write::write_fmt::h66f7942ff99c956d
   3:     0x560e8b9a802e - std::panicking::default_hook::{{closure}}::hfa0c5e485657cde8
   4:     0x560e8b9a8c65 - std::panicking::rust_panic_with_hook::h671957801cdd213a
   5:     0x560e8b9bca1d - std::panicking::begin_panic_handler::{{closure}}::h95e203bb3e1d7b92
   6:     0x560e8b9bc996 - std::sys_common::backtrace::__rust_end_short_backtrace::h2e335f70cf5032de
   7:     0x560e8b9a83e2 - rust_begin_unwind
   8:     0x560e8b7a6a10 - core::panicking::panic_fmt::hbdb7c8dba8be62e6
   9:     0x560e8b7a67b2 - core::result::unwrap_failed::h2c385645c0c07bd3
  10:     0x560e8b843201 - bupstash::index::diff::h9899ce8e223a83f5
  11:     0x560e8b81ac30 - bupstash::client::restore_to_local_dir::h72c3258687f7554e
  12:     0x560e8b8b94e8 - bupstash::main::h26f3236c70200ba0
  13:     0x560e8b7c8473 - std::sys_common::backtrace::__rust_begin_short_backtrace::h6f0f88c658c82dad
  14:     0x560e8b8c5929 - main
  15:     0x7f733eaaa790 - __libc_start_main
  16:     0x560e8b7ad8ba - _start
  17:                0x0 - <unknown>

Any idea what could be the issue?

pschyska avatar Mar 22 '22 12:03 pschyska

Thanks for the report, this is seems like a high priority issue and I will investigate, I have a fair idea about the cause - I do not think there is a data loss issue.

andrewchambers avatar Mar 22 '22 21:03 andrewchambers

I think this will resolve the issue.

If you are able to, could you test that branch? Once we confirm I will do a point release to address this.

andrewchambers avatar Mar 22 '22 22:03 andrewchambers

@andrewchambers Any chance to get that point release 😄 ?

pschyska avatar Apr 15 '22 16:04 pschyska

Yes, sorry for the delay. It will be very soon.

andrewchambers avatar Apr 15 '22 22:04 andrewchambers

Just want to apologize again for the delay, I have recently been a bit sick - I really appreciate your patience and help.

andrewchambers avatar Apr 23 '22 03:04 andrewchambers

No worries! I'm just building bupstash for my Pi using qemu-aarch64 from my main machine, and it's a bit painful, so I want to use the nixos binary caches. Other than that the derivation I posted in the PR works fine.

Get well soon!

pschyska avatar Apr 25 '22 15:04 pschyska

This is long overdue, my apologies!

andrewchambers avatar Sep 07 '22 13:09 andrewchambers

Thank you!

pschyska avatar Sep 07 '22 21:09 pschyska