The sound distributed version control system

#506 [crash+corruption] pijul unrecord while having unrecorded changes

Closed on August 5, 2021
fogti on August 4, 2021
name = 'pijul'
operating_system = 'unix:Unknown'
crate_version = '1.0.0-alpha.52'
explanation = '''
Panic occurred in file '/build/pijul-1.0.0-alpha.52-vendor.tar.gz/libpijul/src/change.rs' at line 1034
'''
cause = 'introduced by ChangeId(WJAOPZ6BGADQO)'
method = 'Panic'
backtrace = '''

   0: 0x559ad9e08a82 - <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold::hf39cb08abdfede2c
   1: 0x559ad9de8726 - <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter::h4b374aa6656e568f
   2: 0x559ad9e03ae4 - libpijul::change::Atom<core::option::Option<libpijul::pristine::change_id::ChangeId>>::globalize::h0c071221a7e6d63b
   3: 0x559ad9e04f87 - libpijul::change::Hunk<core::option::Option<libpijul::pristine::change_id::ChangeId>,Local>::globalize::hbbbca5ac3db68588
   4: 0x559ad9e07c35 - <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold::hb2ad3d3c8baae1ec
   5: 0x559ad9dcea78 - alloc::vec::source_iter_marker::<impl alloc::vec::spec_from_iter::SpecFromIter<T,I> for alloc::vec::Vec<T>>::from_iter::h4aa8fbb39dcf0f35
   6: 0x559ad9f7c361 - pijul::run::{{closure}}::h307181c51078410e
   7: 0x559ad9f1533d - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h32885e00e1e13f06
   8: 0x559ad9e5dfc8 - tokio::runtime::enter::Enter::block_on::h88022af8b45f6795
   9: 0x559ad9d8fc54 - tokio::runtime::Runtime::block_on::h1d77d886673bcf52
  10: 0x559ad9fb9c4a - pijul::main::h364e2987ca79d7f8
  11: 0x559ad9fc0843 - std::sys_common::backtrace::__rust_begin_short_backtrace::h0b909f50a18ad016
  12: 0x559ad9fc15d9 - std::rt::lang_start::{{closure}}::h664860b0b4c6a060
  13: 0x559ada501019 - std::rt::lang_start_internal::hc844bd4873d4c473
  14: 0x559ad9fb9d62 - main
  15: 0x7ff87a25f780 - __libc_start_main
  16: 0x559ad9ce15ea - _start
  17:        0x0 - <unresolved>'''

The code which panicked was: https://docs.rs/libpijul/1.0.0-alpha.45/src/libpijul/change.rs.html#1034 The change mentioned in the error message was the given change to unrecord.

fogti on August 4, 2021

pijul diff now also fails, because the change would be present in the dependency list, but the last pijul command errored out half-way through the unrecording of that change…

name = 'pijul'
operating_system = 'unix:Unknown'
crate_version = '1.0.0-alpha.52'
explanation = '''
Panic occurred in file '/build/pijul-1.0.0-alpha.52-vendor.tar.gz/libpijul/src/change.rs' at line 1034
'''
cause = 'introduced by ChangeId(WJAOPZ6BGADQO)'
method = 'Panic'
backtrace = '''

   0: 0x55768463ea82 - <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold::hf39cb08abdfede2c
   1: 0x55768461e726 - <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter::h4b374aa6656e568f
   2: 0x557684639ae4 - libpijul::change::Atom<core::option::Option<libpijul::pristine::change_id::ChangeId>>::globalize::h0c071221a7e6d63b
   3: 0x55768463af87 - libpijul::change::Hunk<core::option::Option<libpijul::pristine::change_id::ChangeId>,Local>::globalize::hbbbca5ac3db68588
   4: 0x55768463dc35 - <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold::hb2ad3d3c8baae1ec
   5: 0x557684604a78 - alloc::vec::source_iter_marker::<impl alloc::vec::spec_from_iter::SpecFromIter<T,I> for alloc::vec::Vec<T>>::from_iter::h4aa8fbb39dcf0f35
   6: 0x5576847b2361 - pijul::run::{{closure}}::h307181c51078410e
   7: 0x55768474b33d - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h32885e00e1e13f06
   8: 0x557684693fc8 - tokio::runtime::enter::Enter::block_on::h88022af8b45f6795
   9: 0x5576845c5c54 - tokio::runtime::Runtime::block_on::h1d77d886673bcf52
  10: 0x5576847efc4a - pijul::main::h364e2987ca79d7f8
  11: 0x5576847f6843 - std::sys_common::backtrace::__rust_begin_short_backtrace::h0b909f50a18ad016
  12: 0x5576847f75d9 - std::rt::lang_start::{{closure}}::h664860b0b4c6a060
  13: 0x557684d37019 - std::rt::lang_start_internal::hc844bd4873d4c473
  14: 0x5576847efd62 - main
  15: 0x7f2d8e36f780 - __libc_start_main
  16: 0x5576845175ea - _start
  17:        0x0 - <unresolved>'''

the corrupted pijul tree is available at https://ytrizja.de/misc/c135f2f6a5ee25028b72e21a918f2e3a076c1eb6cab59f0b4f5172ffb89570fb.tar.zst (~5.8 MiB)

pmeunier on August 4, 2021

Thanks a lot for having saved the corrupted repo, this is extremely useful.

pmeunier added a change on August 5, 2021
44HXAOMJAKQJEZNE5ESE4HZ2NOOMFKMH2GYIG5WOSAOWN6GTNN6QC
main
pmeunier on August 5, 2021

Ok, this is fixed! Thanks again!

pmeunier closed this discussion on August 5, 2021
pmeunier on August 5, 2021

I don’t think your repo can be fixed though, you’d better start from a fresh clone. Note that you can even clone the corrupt repo, no need to download it again.

fogti on August 5, 2021

I already recloned it… And lucky I accidentially pushed all relevant patches before I made that mistake.