crash when opening repo with V3 pack files
Summary
I tried to open a VHDL file. It is a V3 version.
The file did not open and Helix crashed.
Update : After some tries, it seems that i can't open any file in a specific folder
Reproduction Steps
I tried this:
-
hx file.v -
hx test.md
Helix log
No details in ~/.cache/helix/helix.log
Error whitout RUST_BACKTRACE=full :
thread 'main' panicked at 'We currently don't support any V3 features or extensions', /home/rodolphe/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gix-pack-0.50.0/src/data/entry/decode.rs:39:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'We currently don't support any V3 features or extensions', /home/rodolphe/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gix-pack-0.50.0/src/data/entry/decode.rs:39:18
stack backtrace:
0: 0x563080cf4c9d - std::backtrace_rs::backtrace::libunwind::trace::h9a6b80bbf328ba5d
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x563080cf4c9d - std::backtrace_rs::backtrace::trace_unsynchronized::hd162ec543a11886b
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x563080cf4c9d - std::sys_common::backtrace::_print_fmt::h78a5099be12f51a6
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:65:5
3: 0x563080cf4c9d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::ha1c5390454d74f71
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:44:22
4: 0x56307ffc0d2f - core::fmt::write::h9ffde816c577717b
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/fmt/mod.rs:1254:17
5: 0x563080cf0a15 - std::io::Write::write_fmt::h88186074961638e4
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/io/mod.rs:1698:15
6: 0x563080cf4a75 - std::sys_common::backtrace::_print::h184198273ed08d59
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:47:5
7: 0x563080cf4a75 - std::sys_common::backtrace::print::h1b4d8e7add699453
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:34:9
8: 0x563080cf678e - std::panicking::default_hook::{{closure}}::h393bcea75423915a
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:269:22
9: 0x563080cf656e - std::panicking::default_hook::h48c64f31d8b3fd03
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:288:9
10: 0x563080cf6c5b - std::panicking::rust_panic_with_hook::hafdc493a79370062
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:691:13
11: 0x563080cf6b35 - std::panicking::begin_panic_handler::{{closure}}::h0a64bc82e36bedc7
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:580:13
12: 0x563080cf50b6 - std::sys_common::backtrace::__rust_end_short_backtrace::hc203444fb7416a16
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:150:18
13: 0x563080cf6902 - rust_begin_unwind
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:578:5
14: 0x56307fecf713 - core::panicking::panic_fmt::h0f6ef0178afce4f2
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/panicking.rs:67:14
15: 0x56308014c543 - gix_pack::data::entry::decode::<impl gix_pack::data::Entry>::from_bytes::ha76a538ca1ec7af5
16: 0x563080082916 - gix_odb::store_impls::dynamic::find::<impl gix_odb::store_impls::dynamic::Handle<S>>::try_find_cached_inner::h4061a5ffc9715489
17: 0x563080080449 - gix_odb::store_impls::dynamic::find::<impl gix_pack::find_traits::Find for gix_odb::store_impls::dynamic::Handle<S>>::try_find_cached::h26fc23e4c31b6ed2
18: 0x56308003857e - gix_odb::cache::impls::<impl gix_pack::find_traits::Find for gix_odb::Cache<S>>::try_find_cached::h7721758d97855028
19: 0x563080038901 - gix_odb::cache::impls::<impl gix_object::traits::find::Find for gix_odb::Cache<S>>::try_find::hf641e5b68d9f2f25
20: 0x563080027ff7 - gix::repository::object::<impl gix::types::Repository>::find_object::h1819f158c7b54023
21: 0x56308001aa0c - gix::object::commit::<impl gix::types::Commit>::tree::hfa1fd7b5de5a30ae
22: 0x56308096d023 - helix_vcs::git::get_diff_base::hb29d26aeb331f976
23: 0x56308097a3a1 - helix_vcs::DiffProviderRegistry::get_diff_base::hca79e870d3c1ccc4
24: 0x563080a2812d - helix_view::editor::Editor::open::h86d519314869b45c
25: 0x56308075b052 - helix_term::application::Application::new::h875a0fd4a6e2537a
26: 0x563080b02970 - tokio::runtime::park::CachedParkThread::block_on::hbd163c8f69110143
27: 0x563080aa6a65 - tokio::runtime::context::runtime::enter_runtime::h09b0db91c363325b
28: 0x563080a84161 - tokio::runtime::runtime::Runtime::block_on::hf1f7cf78ead93458
29: 0x563080aaa023 - hx::main::ha0f544ece0142b6f
30: 0x563080af5f73 - std::sys_common::backtrace::__rust_begin_short_backtrace::he7bf8758cf4b9e5e
31: 0x563080af626d - std::rt::lang_start::{{closure}}::h6b8dd6ff44ae0dcd
32: 0x563080ce8a55 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hb1327dc2ef3fecdf
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ops/function.rs:287:13
33: 0x563080ce8a55 - std::panicking::try::do_call::h4044173225fe83dd
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:485:40
34: 0x563080ce8a55 - std::panicking::try::hd8a722c09d156a53
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:449:19
35: 0x563080ce8a55 - std::panic::catch_unwind::hd2ca07971cf0119b
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panic.rs:140:14
36: 0x563080ce8a55 - std::rt::lang_start_internal::{{closure}}::h26d89d595cf47b70
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/rt.rs:148:48
37: 0x563080ce8a55 - std::panicking::try::do_call::hf47aa1aa005e5f1a
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:485:40
38: 0x563080ce8a55 - std::panicking::try::h73d246b2423eaf4e
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:449:19
39: 0x563080ce8a55 - std::panic::catch_unwind::hbaaeae8f1b2f9915
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panic.rs:140:14
40: 0x563080ce8a55 - std::rt::lang_start_internal::h76f3e81e6b8f13f9
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/rt.rs:148:20
41: 0x563080aaa115 - main
42: 0x7fa588de324a - __libc_start_call_main
at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
43: 0x7fa588de3305 - __libc_start_main_impl
at ./csu/../csu/libc-start.c:360:3
44: 0x56307ff41a91 - _start
45: 0x0 - <unknown>
Platform
Linux Debian 12, kernel 6.1.0-20-amd64
Terminal Emulator
Alacritty 0.11.0
Installation Method
source
Helix Version
helix 24.3 (a1d7997f)
Is there anything special about the git repository used in this project? From the backtrace it looks like gitoxide is having trouble parsing some of the git data
CC @Byron
I think this is related to the sha-256 transisition. Maybe some new git versions now generate v3 pack files? It would be nice to support them but if gix can't do that for now not panicking and just emitting an error would be good.
Yes, I agree! I will see to add support for whatever that is - it's not pack V3 I think as that would fail gracefully elsewhere. It's surprising that older Git can handle this in a fashion that doesn't involve dying.
I have looked into this and couldn't find evidence of a new pack-entry type in the Git codebase.
It also looks like that Git will never write packs that aren't V2 - initially I thought it might write V3 based on some other criteria.
It seems what Git would do in this case is to mark the object as bad and fail to decode it. Now gitoxide will fail gracefully here, but it will probably mean that some operations that rely on this object will fail, but it's better than panicking.