Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic when running jj st: must have one more adds than removes #4396

Closed
paulzzy opened this issue Sep 5, 2024 · 2 comments
Closed

Panic when running jj st: must have one more adds than removes #4396

paulzzy opened this issue Sep 5, 2024 · 2 comments

Comments

@paulzzy
Copy link

paulzzy commented Sep 5, 2024

Description

RUST_BACKTRACE=1 jj st results in the following error:

Snapshotting <snipped file, I'm not allowed to share this>thread '<unnamed>' panicked at lib/src/merge.rs:163:45:
must have one more adds than removes
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::option::expect_failed
   3: jj_lib::conflicts::parse_conflict
   4: jj_lib::local_working_copy::TreeState::get_updated_tree_value
   5: rayon::iter::plumbing::bridge_producer_consumer::helper
   6: <rayon_core::job::StackJob<L,F,R> as rayon_core::job::Job>::execute
   7: rayon_core::registry::WorkerThread::wait_until_cold
   8: rayon_core::join::join_context::{{closure}}
   9: rayon::iter::plumbing::bridge_producer_consumer::helper
  10: jj_lib::local_working_copy::TreeState::visit_directory
  11: rayon::iter::plumbing::bridge_producer_consumer::helper
  12: <rayon_core::job::StackJob<L,F,R> as rayon_core::job::Job>::execute
  13: rayon_core::registry::WorkerThread::wait_until_cold
  14: rayon_core::registry::ThreadBuilder::run
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Steps to Reproduce the Problem

Honestly not quite sure how to reach this state, but note that I'm trying to resolve a merge conflict in a big monorepo. These are the jj commands I ran prior to the panic:

jj new zutk
jj new zm
jj new t
jj squash # This is where the panic occurred

Expected Behavior

jj st should succeed.

Actual Behavior

Panic. This also occurs with jj log and jj squash. I'm not sure how to revert to a working state, short of deleting the .jj directory and starting over.

Specifications

  • Platform: Ubuntu jammy 22.04 x86_64
  • Version: jj 0.21.0-d002a5ad35e624a731e96e85f490f28febc7797e, although note that I was running 0.20 when the panic occurred. I upgraded in case it fixed the issue (which it did not).
@paulzzy
Copy link
Author

paulzzy commented Sep 5, 2024

Full backtrace from RUST_BACKTRACE=full jj st:

Snapshotting <snipped file, different from the first backtrace>thread '<unnamed>' panicked at lib/src/merge.rs:163:45:
must have one more adds than removes
stack backtrace:
   0:     0x7fd26d876015 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h706c9783aace6373
   1:     0x7fd26d8c424b - core::fmt::write::h7221bf2763310748
   2:     0x7fd26d8711af - std::io::Write::write_fmt::h5f543a3ea7d45c3d
   3:     0x7fd26d875dee - std::sys_common::backtrace::print::hf2079bcf21b5d607
   4:     0x7fd26d8778c9 - std::panicking::default_hook::{{closure}}::hd6a41ed4ba4d9cdd
   5:     0x7fd26d87766a - std::panicking::default_hook::h2becca4d115c088a
   6:     0x7fd26d877d63 - std::panicking::rust_panic_with_hook::he62aa99a29ab1fe6
   7:     0x7fd26d877c44 - std::panicking::begin_panic_handler::{{closure}}::h4295830cbed5c147
   8:     0x7fd26d8764d9 - std::sys_common::backtrace::__rust_end_short_backtrace::h29724adceafc0e2c
   9:     0x7fd26d877977 - rust_begin_unwind
  10:     0x7fd26c97d023 - core::panicking::panic_fmt::h5822797b7c57c9a6
  11:     0x7fd26c97cfeb - core::option::expect_failed::hcee61ae7a71c72c3
  12:     0x7fd26cf294d0 - jj_lib::conflicts::parse_conflict::h518f945a4b2c8bed
  13:     0x7fd26cf9abed - jj_lib::local_working_copy::TreeState::get_updated_tree_value::ha5989b3b874e8b39
  14:     0x7fd26ceeec6c - rayon::iter::plumbing::bridge_producer_consumer::helper::h280adb7f568bb458
  15:     0x7fd26cf07a1b - <rayon_core::job::StackJob<L,F,R> as rayon_core::job::Job>::execute::hf39b237f115b5b02
  16:     0x7fd26c95f4ad - rayon_core::registry::WorkerThread::wait_until_cold::h2e0c8ad5af569127
  17:     0x7fd26cdf2ea3 - rayon_core::join::join_context::{{closure}}::hfb9516d701113170
  18:     0x7fd26ceef260 - rayon::iter::plumbing::bridge_producer_consumer::helper::h280adb7f568bb458
  19:     0x7fd26cf07a1b - <rayon_core::job::StackJob<L,F,R> as rayon_core::job::Job>::execute::hf39b237f115b5b02
  20:     0x7fd26c95f4ad - rayon_core::registry::WorkerThread::wait_until_cold::h2e0c8ad5af569127
  21:     0x7fd26d17e262 - rayon_core::registry::ThreadBuilder::run::h2036cd72aa47c9f0
  22:     0x7fd26d17c097 - std::sys_common::backtrace::__rust_begin_short_backtrace::hf7abae546bb645f9
  23:     0x7fd26d17c502 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hd68799d914490bee
  24:     0x7fd26d87e7ab - std::sys::pal::unix::thread::Thread::new::thread_start::h396eb0d4d539b415

@PhilipMetzger
Copy link
Contributor

Hello, we are aware of this, so I'm closing it as a duplicate of #2611. Thanks for reporting it though.

@PhilipMetzger PhilipMetzger closed this as not planned Won't fix, can't repro, duplicate, stale Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants