The sound distributed version control system

#537 [LINUX, RECORD, CRASH] source slice length (4) does not match destination slice length (3)

Closed on September 15, 2021
tankf33der on September 15, 2021

linux2x repo, add.sh script:

$ cd linux2x
$ ./add.sh
+ source ./functions.sh
+ cd ..
+ rm -rf linux2x-data
+ mkdir linux2x-data
+ cd linux2x-data
+ pijul init repo
+ cd repo
+ tar -xJf ../../linux2x/kernel/linux-2.0.1.tar.xz --strip-components=1
+ pijul add -r .
++ pijul ls
++ wc -l
+ eq 2143 2143
+ '[' 2143 -ne 2143 ']'
+ pijul record -am.
Well, this is embarrassing.

pijul had a problem and crashed. To help us diagnose the problem you can send us a crash report.

We have generated a report file at "/tmp/report-8304a4c9-99db-4cf6-a48c-e05f6b90a00a.toml". Submit an issue or email with the subject of "pijul Crash Report" and include the report as an attachment.

- Authors: Pierre-Étienne Meunier <pe@pijul.org>

We take privacy seriously, and do not perform any automated error collection. In order to improve the software, we rely on people to submit reports.

Thank you kindly!
$
tankf33der on September 15, 2021
$ cat /tmp/report-8304a4c9-99db-4cf6-a48c-e05f6b90a00a.toml
name = 'pijul'
operating_system = 'unix:Manjaro'
crate_version = '1.0.0-alpha.54'
explanation = '''
Panic occurred in file '/build/rust/src/rustc-1.54.0-src/library/core/src/slice/mod.rs' at line 3058
'''
cause = 'source slice length (4) does not match destination slice length (3)'
method = 'Panic'
backtrace = '''

   0: 0x5d0f180f3742 - core::slice::<impl [T]>::copy_from_slice::len_mismatch_fail::h504a2dac7f50a311
                at /build/rust/src/rustc-1.54.0-src/library/core/src/slice/mod.rs:3051
   1: 0x5d0f1875fa1c - zstd_seekable::compress::framelog::FrameLog::write_seek_table::hc83fd70ebf6f57af
   2: 0x5d0f1875f638 - zstd_seekable::compress::SeekableCStream::end_stream::h45f1c1281870bc14
   3: 0x5d0f1860a30b - libpijul::change::compress::h87df6c0f5c739b83
   4: 0x5d0f1860ad2e - libpijul::change::LocalChange<libpijul::change::Hunk<core::option::Option<libpijul::pristine::hash::Hash>,libpijul::change::Local>,libpijul::change::Author>::serialize::h1d8b2179c71678c5
   5: 0x5d0f186461e8 - <libpijul::changestore::filesystem::FileSystem as libpijul::changestore::ChangeStore>::save_change::ha39b288c4968e5c7
   6: 0x5d0f183ae399 - pijul::commands::record::Record::record::hd07adfae233f300b
   7: 0x5d0f183aa7bc - pijul::commands::record::Record::run::h967ade91dc80dea2
   8: 0x5d0f183c29fa - pijul::run::{{closure}}::hd24973cb58f9463f
   9: 0x5d0f18393604 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::he1eb405d61c695db
  10: 0x5d0f182a9c18 - tokio::park::thread::CachedParkThread::block_on::h8f5fa310bcdeb47d
  11: 0x5d0f182a9d2d - tokio::runtime::thread_pool::ThreadPool::block_on::hb7614ad47c5d71c6
  12: 0x5d0f1817ea2e - tokio::runtime::Runtime::block_on::h17f112c7ad28785f
  13: 0x5d0f182f90aa - pijul::main::h96237f117a276f03
  14: 0x5d0f18169083 - std::sys_common::backtrace::__rust_begin_short_backtrace::h939beb09dc2ed4d1
  15: 0x5d0f1833c159 - std::rt::lang_start::{{closure}}::h6693bb21aeeae5e5
  16: 0x5d0f1890ad89 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h23da4485ce9c2fa2
                at /build/rust/src/rustc-1.54.0-src/library/core/src/ops/function.rs:259
                 - std::panicking::try::do_call::h26656c7c8049ab32
                at /build/rust/src/rustc-1.54.0-src/library/std/src/panicking.rs:401
                 - std::panicking::try::hafa31606aae6b61d
                at /build/rust/src/rustc-1.54.0-src/library/std/src/panicking.rs:365
                 - std::panic::catch_unwind::h12fc93c48e24c0bf
                at /build/rust/src/rustc-1.54.0-src/library/std/src/panic.rs:434
                 - std::rt::lang_start_internal::hb67ef9ab47b75f78
                at /build/rust/src/rustc-1.54.0-src/library/std/src/rt.rs:34
  17: 0x5d0f182f91c2 - main
  18: 0x6ca39d61b25 - __libc_start_main
  19: 0x5d0f180f3c0e - _start
  20:        0x0 - <unresolved>'''
$
pmeunier on September 15, 2021

Excellent! Thanks for this report.

pmeunier on September 15, 2021

I just fixed it in zstd-seekable 0.2.1. cargo update should be enough, I’ll push a patch here anyway to do that.

pmeunier added a change on September 15, 2021
AKARNWLHKVH4477BX2KZ6VY4YPTMXQFVPUSFCWHG4LZ4OCW2F5CQC
main
tankf33der on September 15, 2021

Fixed.

tankf33der closed this discussion on September 15, 2021