The sound distributed version control system

#405 Crash trying to import git repository.

Closed on April 24, 2021
Jonathan on April 2, 2021

I’ve recently discovered that Pijul is able to import git repositories when compiled with git feature, so I cloned the pijul repository and compiled with the git feature enabled, I’ve successfully converted some git repositories into Pijul with the exception of some bigger ones, which causes Pijul to crash with the following error:

thread 'main' panicked at 'assertion failed: is_alive(txn, channel, &c).unwrap()', /home/jonathan/pijul/libpijul/src/apply.rs:795:17
stack backtrace:
0: rust_begin_unwind
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/panicking.rs:493:5
1: core::panicking::panic_fmt
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/core/src/panicking.rs:92:14
2: core::panicking::panic
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/core/src/panicking.rs:50:5
3: libpijul::apply::reconnect_pseudo_edges
at /home/jonathan/pijul/libpijul/src/apply.rs:795:17
4: libpijul::apply::put_newedge
at /home/jonathan/pijul/libpijul/src/apply.rs:653:17
5: libpijul::apply::apply_change_to_channel
at /home/jonathan/pijul/libpijul/src/apply.rs:261:25
6: libpijul::apply::apply_local_change_ws
at /home/jonathan/pijul/libpijul/src/apply.rs:330:13
7: libpijul::apply::apply_local_change
at /home/jonathan/pijul/libpijul/src/apply.rs:350:5
8: libpijul::MutTxnTExt::apply_local_change
at /home/jonathan/pijul/libpijul/src/lib.rs:175:9
9: pijul::commands::git::record_apply
at /home/jonathan/pijul/pijul/src/commands/git.rs:760:18
10: pijul::commands::git::import_commit
at /home/jonathan/pijul/pijul/src/commands/git.rs:644:15
11: pijul::commands::git::import::{{closure}}
at /home/jonathan/pijul/pijul/src/commands/git.rs:325:29
12: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at /home/jonathan/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80:19
13: pijul::commands::git::Git::run::{{closure}}
at /home/jonathan/pijul/pijul/src/commands/git.rs:89:9
14: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at /home/jonathan/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80:19
15: pijul::run::{{closure}}
at /home/jonathan/pijul/pijul/src/main.rs:199:33
16: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at /home/jonathan/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80:19
17: pijul::main::{{closure}}
at /home/jonathan/pijul/pijul/src/main.rs:138:21
18: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at /home/jonathan/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80:19
19: tokio::park::thread::CachedParkThread::block_on::{{closure}}
at /home/jonathan/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.2.0/src/park/thread.rs:263:54
20: tokio::coop::with_budget::{{closure}}
at /home/jonathan/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.2.0/src/coop.rs:121:9
21: std::thread::local::LocalKey<T>::try_with
at /home/jonathan/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:272:16
22: std::thread::local::LocalKey<T>::with
at /home/jonathan/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:248:9
23: tokio::coop::with_budget
at /home/jonathan/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.2.0/src/coop.rs:114:5
24: tokio::coop::budget
at /home/jonathan/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.2.0/src/coop.rs:98:5
25: tokio::park::thread::CachedParkThread::block_on
at /home/jonathan/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.2.0/src/park/thread.rs:263:31
26: tokio::runtime::enter::Enter::block_on
at /home/jonathan/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.2.0/src/runtime/enter.rs:151:13
27: tokio::runtime::thread_pool::ThreadPool::block_on
at /home/jonathan/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.2.0/src/runtime/thread_pool/mod.rs:71:9
28: tokio::runtime::Runtime::block_on
at /home/jonathan/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.2.0/src/runtime/mod.rs:452:43
29: pijul::main
at /home/jonathan/pijul/pijul/src/main.rs:131:1
30: core::ops::function::FnOnce::call_once
at /home/jonathan/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

One of the repositories I was trying to convert is Kores.

pmeunier on April 2, 2021

Thanks (and welcome here!). If you remember (or timed it), how long did it take to reach that state?

Jonathan on April 2, 2021

I timed it this time:

$ time ~/pijul/target/debug/pijul git .
thread 'main' panicked at 'assertion failed: is_alive(txn, channel, &c).unwrap()', /home/jonathan/pijul/libpijul/src/apply.rs:795:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

________________________________________________________
Executed in  183,60 secs    fish           external
usr time  175,21 secs    5,00 micros  175,21 secs
sys time    4,26 secs  361,00 micros    4,26 secs

It takes a long time, I found myself that this repo had a lot of binaries a long time ago, nothing big, just very tiny binaries that was deleted in newer revisions, also this repo has some “empty commits” (10 to be exact), they has different hashes but the file contents haven’t changed, maybe the file permissions changed, but I’m not sure. Hope this helps with the context.

pmeunier on April 2, 2021

183s isn’t a very long time. A few months ago I had to wait for many days to see a crash! I’ll take a look this week-end.

Jonathan on April 2, 2021

I can’t imagine how it is to keep something running for days, I like how Pijul is envolving as time goes by and I’m loving it (I’m even writing an IntelliJ IDEA plugin for it), let me know if you need some additional input, and thanks for the attention!!!

pmeunier added a change on April 24, 2021
5SLOJYHGPMZVCOE3IS7ICNMJJYX3RBT6CDG5MAV6T4CJIOW7YZ6QC
main
pmeunier on April 24, 2021

Alright, I fixed a few things in a number of places in Pijul since this bug, and tested pijul git on Kores again. It works now, I could import the entire history.

pmeunier closed this discussion on April 24, 2021
Jonathan on May 2, 2021

Awesome, thanks for the attention, now I was able to import the entire Kores history as well.

danimesq on December 9, 2021

@Jonathan, what Rust flags you’ve used to enable the git import feature?