The sound distributed version control system

#292 channel switch crash

Closed on August 4, 2021
tankf33der on February 2, 2021

If in one channel ‘a’ is file and a dir in another, then “channel switch” should handle this too.

$ pijul channel switch m1
Well, this is embarrassing.

pijul had a problem and crashed. To help us diagnose the problem you can send us a crash report.
<SKIP>
# cat /tmp/report-dc08d492-a820-407f-acaf-6cf6ab1cb5e1.toml
name = 'pijul'
operating_system = 'unix:Unknown'
crate_version = '1.0.0-alpha.38'
explanation = '''
Panic occurred in file '/root/.cargo/registry/src/github.com-1ecc6299db9ec823/libpijul-1.0.0-alpha.34/src/fs.rs' at line 842
'''
cause = 'called `Result::unwrap()` on an `Err` value: Block { block: Position { change: ChangeId(AJA63IYL443R4), pos: ChangePosition(4) } }'
method = 'Panic'
backtrace = '''

   0: 0x55860fec02a3 - core::result::unwrap_failed::h0fcfc49c27fca26a
   1: 0x55860f84cdc9 - libpijul::fs::find_path::h45ffa21c6fa50ee3
   2: 0x55860f787231 - pijul::commands::reset::Reset::reset::{{closure}}::hbda38f9c2d0a1356
   3: 0x55860f79f87a - pijul::run::{{closure}}::h371b41259c4a7bd1
   4: 0x55860f75f370 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hd9a4eb16b7c7f6a1
   5: 0x55860f621cd5 - tokio::park::thread::CachedParkThread::block_on::hb4e7e62817f7b151
   6: 0x55860f6f0a4d - tokio::runtime::thread_pool::ThreadPool::block_on::h0f68e063662a4a6b
   7: 0x55860f89144b - tokio::runtime::Runtime::block_on::h08eaafbb61929dec
   8: 0x55860f80183e - pijul::main::h2beb1bf053b031f3
   9: 0x55860f656cf3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h8a4f18eb683287d1
  10: 0x55860f7cbbe9 - std::rt::lang_start::{{closure}}::h98381dbdda7c2a44
  11: 0x55860fe9d417 - std::rt::lang_start_internal::h0c3fae9f987cf9c0
  12: 0x55860f801902 - main
  13: 0x7ff99b7f4e0a - __libc_start_main
                at /builddir/glibc-2.32/csu/../csu/libc-start.c:314
  14: 0x55860f5f12ba - _start
                at /builddir/glibc-2.32/csu/../sysdeps/x86_64/start.S:120
  15:        0x0 - <unresolved>'''
$
tankf33der on February 2, 2021

After this crash consistency of repo db corrupted and pijul crashes on every command:

name = 'pijul'
operating_system = 'unix:Unknown'
crate_version = '1.0.0-alpha.38'
explanation = '''
Panic occurred in file '/root/.cargo/registry/src/github.com-1ecc6299db9ec823/libpijul-1.0.0-alpha.34/src/record.rs' at line 418
'''
cause = 'assertion failed: !self.former_parents.is_empty()'
method = 'Panic'
backtrace = '''

   0: 0x564de6e18b51 - libpijul::record::Builder::record::h64264276b1fbef3d
   1: 0x564de6f820de - pijul::run::{{closure}}::h371b41259c4a7bd1
   2: 0x564de6f41370 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hd9a4eb16b7c7f6a1
   3: 0x564de6e03cd5 - tokio::park::thread::CachedParkThread::block_on::hb4e7e62817f7b151
   4: 0x564de6ed2a4d - tokio::runtime::thread_pool::ThreadPool::block_on::h0f68e063662a4a6b
   5: 0x564de707344b - tokio::runtime::Runtime::block_on::h08eaafbb61929dec
   6: 0x564de6fe383e - pijul::main::h2beb1bf053b031f3
   7: 0x564de6e38cf3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h8a4f18eb683287d1
   8: 0x564de6fadbe9 - std::rt::lang_start::{{closure}}::h98381dbdda7c2a44
   9: 0x564de767f417 - std::rt::lang_start_internal::h0c3fae9f987cf9c0
  10: 0x564de6fe3902 - main
  11: 0x7f96369e4e0a - __libc_start_main
                at /builddir/glibc-2.32/csu/../csu/libc-start.c:314
  12: 0x564de6dd32ba - _start
                at /builddir/glibc-2.32/csu/../sysdeps/x86_64/start.S:120
  13:        0x0 - <unresolved>'''
$
tankf33der on March 26, 2021

No crash, but no correct handle.

pmeunier on August 4, 2021

Ah! Sounds like a classic pre-fire bug with Sanakirja corruption and all that. I believe these are a thing of the past now, but feel free to reopen if not.

pmeunier closed this discussion on August 4, 2021