Repository: jj-vcs/jj

Issue #27: `jj close` (and some others) sometimes crashes on first attempt with Git backend
Created: 2021-09-13T15:32:31Z
jj prune, like most commands, first commit the working copy. When using the Git backend, that produces a Git commit with some hash. The next step for jj prune is to prune the commit. That's done by creating a successor commit with a is_pruned flag set. The problem is that both the predecessors field and the is_pruned field are stored outside of the Git commit and the timestamps are typically the same as well (it happens in much less than a second), so the resulting Git commit remains the same. The Git backend then fails the write (it doesn't allow two Git commits with different non-Git metadata).
I've known about this bug for a long time, but I figured it can be useful to track it. I'm working on removing support for evolution. The bug should be resolved by that work.

Duplicate issue #29: Error clonning GIT repo
Created: 2021-09-16T02:59:30Z
Expected Behavior
Repository is cloned successful.
Actual Behavior
Application crashes.
Fetching into new repo in "/home/pjamar/prj/l/pusharrow"
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Other("note for '34d090b9239bf59911ef5365911d2322ae854e19' exists already; class=Repository (6); code=Exists (-4)")', lib/src/store_wrapper.rs:157:58
stack backtrace:
   0:     0x55ad2c3abadc - std::backtrace_rs::backtrace::libunwind::trace::h788b2853b7016c32
                               at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x55ad2c3abadc - std::backtrace_rs::backtrace::trace_unsynchronized::h3626590e16510efa
                               at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x55ad2c3abadc - std::sys_common::backtrace::_print_fmt::ha76294ed367b5eb6
                               at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x55ad2c3abadc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h4244b134876ede81
                               at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x55ad2c3d311c - core::fmt::write::h9a6d9c74526a6c1b
                               at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/core/src/fmt/mod.rs:1150:17
   5:     0x55ad2c3a6815 - std::io::Write::write_fmt::h7f8a2ef72f011ad9
                               at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/std/src/io/mod.rs:1667:15
   6:     0x55ad2c3adb00 - std::sys_common::backtrace::_print::h4b3c9553c91f7522
                               at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x55ad2c3adb00 - std::sys_common::backtrace::print::h36fb46a493801fb8
                               at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x55ad2c3adb00 - std::panicking::default_hook::{{closure}}::hf28f6810f0e04677
                               at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/std/src/panicking.rs:210:50
   9:     0x55ad2c3ad6bb - std::panicking::default_hook::hadb819fa279f9d7b
                               at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/std/src/panicking.rs:227:9
  10:     0x55ad2c3ae1b4 - std::panicking::rust_panic_with_hook::h015085c4aa271d26
                               at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/std/src/panicking.rs:624:17
  11:     0x55ad2c3adc90 - std::panicking::begin_panic_handler::{{closure}}::h15a8a2888dd1ba59
                               at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/std/src/panicking.rs:521:13
  12:     0x55ad2c3abf84 - std::sys_common::backtrace::__rust_end_short_backtrace::h673e204498e49379
                               at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/std/src/sys_common/backtrace.rs:141:18
  13:     0x55ad2c3adbf9 - rust_begin_unwind
                               at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/std/src/panicking.rs:517:5
  14:     0x55ad2be56e01 - core::panicking::panic_fmt::hcf5f6d96e1dd7099
                               at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/core/src/panicking.rs:101:14
  15:     0x55ad2be56ef3 - core::result::unwrap_failed::he898b02f57993c42
                               at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/core/src/result.rs:1617:5
  16:     0x55ad2bfb09e5 - jujutsu_lib::store_wrapper::StoreWrapper::write_commit::h9b4109d36480039e
  17:     0x55ad2bfa2216 - jujutsu_lib::commit_builder::CommitBuilder::write_to_repo::h3d4a0ec6ef15a7ee
  18:     0x55ad2bfca9d6 - jujutsu_lib::repo::MutableRepo::check_out::h9dfbc2734f8d444a
  19:     0x55ad2bea559f - jujutsu::commands::cmd_git::h0d1a626b077d18bc
  20:     0x55ad2be6983c - jujutsu::commands::dispatch::h02e220f6b48def76
  21:     0x55ad2be5fdbd - jj::main::h34cd1dbad16e65e9
  22:     0x55ad2be5f193 - std::sys_common::backtrace::__rust_begin_short_backtrace::h829bc614a367e7e5
  23:     0x55ad2be6aa89 - std::rt::lang_start::{{closure}}::h2077ed056203f4bb
  24:     0x55ad2c3ae7ba - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h61c8e7c7ad965d8f
                               at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/core/src/ops/function.rs:259:13
  25:     0x55ad2c3ae7ba - std::panicking::try::do_call::ha62fd0271612a1de
                               at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/std/src/panicking.rs:403:40
  26:     0x55ad2c3ae7ba - std::panicking::try::hedc869fcd25323d8
                               at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/std/src/panicking.rs:367:19
  27:     0x55ad2c3ae7ba - std::panic::catch_unwind::h19fc164e1562e43f
                               at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/std/src/panic.rs:129:14
  28:     0x55ad2c3ae7ba - std::rt::lang_start_internal::{{closure}}::hb7a70d47e691e1da
                               at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/std/src/rt.rs:45:48
  29:     0x55ad2c3ae7ba - std::panicking::try::do_call::h7af85a6c8d4e17cd
                               at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/std/src/panicking.rs:403:40
  30:     0x55ad2c3ae7ba - std::panicking::try::h2006fd79c11839e7
                               at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/std/src/panicking.rs:367:19
  31:     0x55ad2c3ae7ba - std::panic::catch_unwind::h554c0031cfe57735
                               at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/std/src/panic.rs:129:14
  32:     0x55ad2c3ae7ba - std::rt::lang_start_internal::h0a872604597b44c0
                               at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/std/src/rt.rs:45:20
  33:     0x55ad2be5fe42 - main
  34:     0x7fc7ab8060b3 - __libc_start_main
  35:     0x55ad2be575de - _start
  36:                0x0 - <unknown>

Steps to Reproduce the Problem

jj git clone ssh://git@xxx.xxx.com:10022/pjamar/pusharrow.git pusharrow

Specifications

Version: Jujutsu 0.2.0
Platform: Linux/x86

Edit: Added full backtrace

Closing comment (2021-09-16T15:29:26Z): Duplicate of #27