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

thread 'main' panicked at 'commit.secure_sig was set', lib/src/git_backend.rs:909:9 #2652

Closed
ocharles opened this issue Nov 29, 2023 · 7 comments

Comments

@ocharles
Copy link

Description

I'm not quite sure how I've got myself into this situation, but any jj command is now throwing:

❯ jj co master
Abandoned 4 commits that are no longer reachable.
thread 'main' panicked at 'commit.secure_sig was set', lib/src/git_backend.rs:909:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Here is with backtraces:

circuithub-jj (f9fcf20) via λ 9.4.8 via ❄️  impure (circuithub-shell-env) 
❯ RUST_BACKTRACE=1 jj co master
Abandoned 4 commits that are no longer reachable.
thread 'main' panicked at 'commit.secure_sig was set', lib/src/git_backend.rs:909:9
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: <jj_lib::git_backend::GitBackend as jj_lib::backend::Backend>::write_commit
   3: jj_lib::store::Store::write_commit
   4: jj_lib::commit_builder::CommitBuilder::write
   5: jj_lib::rewrite::rebase_commit_with_options
   6: jj_lib::rewrite::DescendantRebaser::rebase_next
   7: jj_lib::rewrite::DescendantRebaser::rebase_all
   8: jj_lib::repo::MutableRepo::rebase_descendants_with_options
   9: jj_lib::repo::MutableRepo::rebase_descendants
  10: jj_cli::cli_util::WorkspaceCommandHelper::snapshot
  11: jj_cli::cli_util::CommandHelper::workspace_helper_internal
  12: jj_cli::commands::run_command
  13: core::ops::function::FnOnce::call_once{{vtable.shim}}
  14: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
  15: jj_cli::cli_util::CliRunner::run
  16: jj::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

circuithub-jj (f9fcf20) via λ 9.4.8 via ❄️  impure (circuithub-shell-env) 
❯ RUST_BACKTRACE=full jj co master
Abandoned 4 commits that are no longer reachable.
thread 'main' panicked at 'commit.secure_sig was set', lib/src/git_backend.rs:909:9
stack backtrace:
   0:     0x56282306db01 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hded4932df41373b3
   1:     0x5628230994df - core::fmt::write::hb1cb56105a082ad9
   2:     0x562823068d41 - std::io::Write::write_fmt::h797fda7085c97e57
   3:     0x56282306d915 - std::sys_common::backtrace::print::hf74aa2eef05af215
   4:     0x56282306f507 - std::panicking::default_hook::{{closure}}::h8cad394227ea3de8
   5:     0x56282306f2f4 - std::panicking::default_hook::h249cc184fec99a8a
   6:     0x56282306f9bc - std::panicking::rust_panic_with_hook::h82ebcd5d5ed2fad4
   7:     0x56282306f871 - std::panicking::begin_panic_handler::{{closure}}::h810bed8ecbe66f1a
   8:     0x56282306df36 - std::sys_common::backtrace::__rust_end_short_backtrace::h1410008071796261
   9:     0x56282306f602 - rust_begin_unwind
  10:     0x56282289aeb3 - core::panicking::panic_fmt::ha0a42a25e0cf258d
  11:     0x562822da5547 - <jj_lib::git_backend::GitBackend as jj_lib::backend::Backend>::write_commit::hf8f740826deaafb1
  12:     0x562822d7725d - jj_lib::store::Store::write_commit::h5d530d07c0e132f6
  13:     0x562822c9d46d - jj_lib::commit_builder::CommitBuilder::write::h682af88ce4707fdb
  14:     0x562822d53b45 - jj_lib::rewrite::rebase_commit_with_options::hb26ee8780861e8a4
  15:     0x562822d5f2bb - jj_lib::rewrite::DescendantRebaser::rebase_next::h914567ebea62f9a4
  16:     0x562822d5fca2 - jj_lib::rewrite::DescendantRebaser::rebase_all::hfe8fc9cc7f38f40c
  17:     0x562822d30da8 - jj_lib::repo::MutableRepo::rebase_descendants_with_options::hdeafca011e8e0b61
  18:     0x562822d30ffc - jj_lib::repo::MutableRepo::rebase_descendants::h3e9c6f85953984ec
  19:     0x562822a0ed96 - jj_cli::cli_util::WorkspaceCommandHelper::snapshot::h4460504e67a80cd5
  20:     0x562822a07b8c - jj_cli::cli_util::CommandHelper::workspace_helper_internal::hfa338281d1a20992
  21:     0x562822a86ab0 - jj_cli::commands::run_command::h579659a2e19f4d85
  22:     0x5628228d8d70 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hb16a193bcc793fd1
  23:     0x5628229483e5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc3fbcd15b937ce87
  24:     0x562822a19a41 - jj_cli::cli_util::CliRunner::run::h2a6e6d34ec899ed1
  25:     0x56282289b761 - jj::main::ha85a5d8a60b9f30d
  26:     0x56282289b6e3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h1ccfb9bfb61c066a
  27:     0x56282289b6f9 - std::rt::lang_start::{{closure}}::h884d974d77a1f502
  28:     0x56282305f8b5 - std::rt::lang_start_internal::hd66bf6b7da144005
  29:     0x56282289b795 - main
  30:     0x7f8314a3cb0e - __libc_start_call_main
  31:     0x7f8314a3cbc9 - __libc_start_main@@GLIBC_2.34
  32:     0x56282289b615 - _start
  33:                0x0 - <unknown>

Steps to Reproduce the Problem

I have no idea! The last thing I did was a jj git fetch, after GitHub & Mergify automatically merged some pull requests.

Expected Behavior

I can use jj 🙂

Actual Behavior

I can't use jj at all 😅

Specifications

  • Platform: NixOS
  • Version: jj 0.11.0-bb72def464541f068ff9f177fbdf6a2d9eeaa887
@martinvonz
Copy link
Member

@necauqua, can you look into that?

@martinvonz
Copy link
Member

I think you can work around it by downgrading to 0.11.0 or at least something that's more than a week or two old.

@ocharles
Copy link
Author

For now I've moved the repo and re-cloned. I'm happy to keep this broken repo around to help debug

@necauqua
Copy link
Contributor

necauqua commented Nov 29, 2023

Your repo is not broken, it seems that you have a signed child commit that it tries to automatically rebase.

And.. atm rewriting a signed commit causes this assert to go off in main, it's a dumb bug that's fixed in #2634

If we want to fix it separately, we just need to add commit.secure_sig = None in CommitBuilder::write before calling write_commit

@martinvonz
Copy link
Member

And.. atm rewriting a signed commit causes this assert to go off in main, it's a dumb bug that's fixed in #2634

Ah, nice. I have just finished my other obligations at my dayjob so I was just about to review that PR. Since Yuya has already reviewed it (thanks!), I don't expect to find anything major, and we can hopefully land that soon.

@necauqua
Copy link
Contributor

necauqua commented Nov 30, 2023

We merged #2634, so I'm pretty sure this is fixed, but you can check that repo you have with the latest main, @ocharles

@ocharles
Copy link
Author

ocharles commented Dec 4, 2023

Yep, looks good! Now when I ran jj I got

Abandoned 4 commits that are no longer reachable.
Rebased 1 descendant commits off of commits rewritten from git
Done importing changes from the underlying Git repo.

and then a log as expected. Thanks both!

@ocharles ocharles closed this as completed Dec 4, 2023
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

3 participants