GitUI was close due to an unexpected panic (I think it is an async issue)
Describe the bug I can't open gitui.
To Reproduce
Go in a git project and launch gitui. Then, navigate to the second tab (log). Then, it closes with the error message and I can't open it anymore.
Expected behavior Launch gitui.
Screenshots
Context (please complete the following information):
- OS/Distro + Version: Arch Linux (everything is up-to-date as Jan 16th, 2025).
- GitUI Version: Unsure, when I install with pacman I have
❯ pacman -Qs gitui
local/gitui 0.26.3-2
Blazing fast terminal-ui for git written in Rust
At the same time
❯ gitui --version
gitui nightly 2024-09-12 (0f5cf89)
- Rust version: 1.84
Additional context
This is the repo I am using https://github.com/tracel-ai/cubecl
This is the content of the log file when running gitui -l
14:51:31 [TRACE] (1) gitui::app: [src/app.rs:154] open repo at: RefCell { value: Path(".") }
14:51:31 [TRACE] (6) mio::poll: [/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.11/src/poll.rs:551] registering event source with poller: token=Token(0), interests=READABLE
14:51:31 [TRACE] (6) mio::poll: [/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.11/src/poll.rs:551] registering event source with poller: token=Token(1), interests=READABLE
14:51:31 [TRACE] (1) asyncgit::tags: [asyncgit/src/tags.rs:67] request
14:51:31 [TRACE] (1) gitui: [src/main.rs:215] app start: 14 ms
14:51:31 [TRACE] (1) gitui::app: [src/app.rs:375] update
14:51:31 [TRACE] (1) asyncgit::tags: [asyncgit/src/tags.rs:67] request
14:51:31 [ERROR]
GitUI was close due to an unexpected panic.
Please file an issue on https://github.com/extrawurst/gitui/issues with the following info:
PanicHookInfo { payload: Any { .. }, location: Location { file: "asyncgit/src/revlog.rs", line: 186, col: 14 }, can_unwind: true, force_no_backtrace: false }
trace:
0: <unknown>
1: <unknown>
2: <unknown>
3: <unknown>
4: <unknown>
5: <unknown>
6: <unknown>
7: <unknown>
8: <unknown>
9: <unknown>
10: <unknown>
11: <unknown>
12: <unknown>
13: <unknown>
14: <unknown>
14:51:31 [ERROR]
GitUI was close due to an unexpected panic.
Please file an issue on https://github.com/extrawurst/gitui/issues with the following info:
Any { .. }
trace:
0: <unknown>
1: <unknown>
2: <unknown>
3: <unknown>
4: <unknown>
5: <unknown>
6: <unknown>
7: <unknown>
Maybe this is also helpful
❯ gitui --bugreport
Software version
gitui 0.26.3 (v0.19.0-789-g0f5cf893)
Operating system
Linux 6.12.9-arch1-1
Compile time information
- Profile: release
- Target triple: x86_64-unknown-linux-gnu
- Family: unix
- OS: linux
- Architecture: x86_64
- Pointer width: 64
- Endian: little
- CPU features: fxsr,sse,sse2
- Host: x86_64-unknown-linux-gnu
Environment variables
SHELL=/usr/bin/bash
EDITOR=/usr/bin/hx
GIT_EDITOR=<not set>
VISUAL=<not set>
Command-line
gitui --bugreport
@maxtremblay thanks for your report I think this one should be fixed in 0.27 - could you upgrade?
I can reproduce it with gitui 0.27.0 2025-01-14 (99f6967)
This is related to this piece of code:
https://github.com/gitui-org/gitui/blob/35b2529c52d601d9640530c55c3805e3a9882fea/asyncgit/src/revlog.rs#L179-L186
Unfortunately, I can’t seem to be able to reproduce (on my Ubuntu system).
@maxtremblay @cpfeiffer Are you able to reproduce with a build that gives a more detailed stacktrace, e. g. by compiling from source?
@cruessler this points to the same location as https://github.com/gitui-org/gitui/issues/2316 - which has a Gix Error in there and a bit more reporduction details. Can you see if this helps you reproduce this?
Here you go. I could also inspect with gdb, if that would help.
~/.cargo/bin/gitui
GitUI was close due to an unexpected panic.
Please file an issue on https://github.com/extrawurst/gitui/issues with the following info:
PanicHookInfo { payload: Any { .. }, location: Location { file: "asyncgit/src/revlog.rs", line: 186, col: 14 }, can_unwind: true, force_no_backtrace: false }
trace:
0: gitui::set_panic_handlers::{{closure}}
at /tmp/gitui/src/main.rs:382:19
1: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
at /usr/src/rustc-1.85.0/library/alloc/src/boxed.rs:2007:9
std::panicking::rust_panic_with_hook
at /usr/src/rustc-1.85.0/library/std/src/panicking.rs:836:13
2: std::panicking::begin_panic_handler::{{closure}}
at /usr/src/rustc-1.85.0/library/std/src/panicking.rs:701:13
3: std::sys::backtrace::__rust_end_short_backtrace
at /usr/src/rustc-1.85.0/library/std/src/sys/backtrace.rs:168:18
4: rust_begin_unwind
at /usr/src/rustc-1.85.0/library/std/src/panicking.rs:692:5
5: core::panicking::panic_fmt
at /usr/src/rustc-1.85.0/library/core/src/panicking.rs:75:14
6: core::result::unwrap_failed
at /usr/src/rustc-1.85.0/library/core/src/result.rs:1704:5
7: core::result::Result<T,E>::expect
at /usr/src/rustc-1.85.0/library/core/src/result.rs:1061:23
8: asyncgit::revlog::AsyncLog::fetch::{{closure}}
at /tmp/gitui/asyncgit/src/revlog.rs:179:4
9: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
at /usr/src/rustc-1.85.0/library/core/src/panic/unwind_safe.rs:272:9
10: std::panicking::try::do_call
at /usr/src/rustc-1.85.0/library/std/src/panicking.rs:584:40
11: __rust_try
12: std::panicking::try
at /usr/src/rustc-1.85.0/library/std/src/panicking.rs:547:19
std::panic::catch_unwind
at /usr/src/rustc-1.85.0/library/std/src/panic.rs:358:14
13: rayon_core::unwind::halt_unwinding
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rayon-core-1.12.1/src/unwind.rs:17:5
14: rayon_core::registry::Registry::catch_unwind
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rayon-core-1.12.1/src/registry.rs:367:27
15: rayon_core::spawn::spawn_job::{{closure}}
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rayon-core-1.12.1/src/spawn/mod.rs:97:13
16: <rayon_core::job::HeapJob<BODY> as rayon_core::job::Job>::execute
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rayon-core-1.12.1/src/job.rs:169:9
17: rayon_core::job::JobRef::execute
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rayon-core-1.12.1/src/job.rs:64:9
18: rayon_core::registry::WorkerThread::execute
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rayon-core-1.12.1/src/registry.rs:860:9
19: rayon_core::registry::WorkerThread::wait_until_cold
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rayon-core-1.12.1/src/registry.rs:794:21
20: rayon_core::registry::WorkerThread::wait_until
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rayon-core-1.12.1/src/registry.rs:769:13
21: rayon_core::registry::WorkerThread::wait_until_out_of_work
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rayon-core-1.12.1/src/registry.rs:818:9
22: rayon_core::registry::main_loop
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rayon-core-1.12.1/src/registry.rs:923:5
23: rayon_core::registry::ThreadBuilder::run
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rayon-core-1.12.1/src/registry.rs:53:18
24: <rayon_core::registry::DefaultSpawn as rayon_core::registry::ThreadSpawn>::spawn::{{closure}}
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rayon-core-1.12.1/src/registry.rs:98:20
25: std::sys::backtrace::__rust_begin_short_backtrace
at /usr/src/rustc-1.85.0/library/std/src/sys/backtrace.rs:152:18
26: std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}
at /usr/src/rustc-1.85.0/library/std/src/thread/mod.rs:564:17
27: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
at /usr/src/rustc-1.85.0/library/core/src/panic/unwind_safe.rs:272:9
28: std::panicking::try::do_call
at /usr/src/rustc-1.85.0/library/std/src/panicking.rs:584:40
29: __rust_try
30: std::panicking::try
at /usr/src/rustc-1.85.0/library/std/src/panicking.rs:547:19
std::panic::catch_unwind
at /usr/src/rustc-1.85.0/library/std/src/panic.rs:358:14
std::thread::Builder::spawn_unchecked_::{{closure}}
at /usr/src/rustc-1.85.0/library/std/src/thread/mod.rs:562:30
31: core::ops::function::FnOnce::call_once{{vtable.shim}}
at /usr/src/rustc-1.85.0/library/core/src/ops/function.rs:250:5
32: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
at /usr/src/rustc-1.85.0/library/alloc/src/boxed.rs:1993:9
<alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
at /usr/src/rustc-1.85.0/library/alloc/src/boxed.rs:1993:9
std::sys::pal::unix::thread::Thread::new::thread_start
at /usr/src/rustc-1.85.0/library/std/src/sys/pal/unix/thread.rs:106:17
33: start_thread
at ./nptl/pthread_create.c:448:8
34: __GI___clone3
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78:0
GitUI was close due to an unexpected panic.
Please file an issue on https://github.com/extrawurst/gitui/issues with the following info:
Any { .. }
trace:
0: gitui::set_panic_handlers::{{closure}}
at /tmp/gitui/src/main.rs:390:20
1: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
at /usr/src/rustc-1.85.0/library/alloc/src/boxed.rs:2007:9
2: rayon_core::registry::Registry::catch_unwind
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rayon-core-1.12.1/src/registry.rs:371:17
3: rayon_core::spawn::spawn_job::{{closure}}
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rayon-core-1.12.1/src/spawn/mod.rs:97:13
4: <rayon_core::job::HeapJob<BODY> as rayon_core::job::Job>::execute
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rayon-core-1.12.1/src/job.rs:169:9
5: rayon_core::job::JobRef::execute
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rayon-core-1.12.1/src/job.rs:64:9
6: rayon_core::registry::WorkerThread::execute
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rayon-core-1.12.1/src/registry.rs:860:9
7: rayon_core::registry::WorkerThread::wait_until_cold
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rayon-core-1.12.1/src/registry.rs:794:21
8: rayon_core::registry::WorkerThread::wait_until
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rayon-core-1.12.1/src/registry.rs:769:13
9: rayon_core::registry::WorkerThread::wait_until_out_of_work
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rayon-core-1.12.1/src/registry.rs:818:9
10: rayon_core::registry::main_loop
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rayon-core-1.12.1/src/registry.rs:923:5
11: rayon_core::registry::ThreadBuilder::run
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rayon-core-1.12.1/src/registry.rs:53:18
12: <rayon_core::registry::DefaultSpawn as rayon_core::registry::ThreadSpawn>::spawn::{{closure}}
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rayon-core-1.12.1/src/registry.rs:98:20
13: std::sys::backtrace::__rust_begin_short_backtrace
at /usr/src/rustc-1.85.0/library/std/src/sys/backtrace.rs:152:18
14: std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}
at /usr/src/rustc-1.85.0/library/std/src/thread/mod.rs:564:17
15: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
at /usr/src/rustc-1.85.0/library/core/src/panic/unwind_safe.rs:272:9
16: std::panicking::try::do_call
at /usr/src/rustc-1.85.0/library/std/src/panicking.rs:584:40
17: __rust_try
18: std::panicking::try
at /usr/src/rustc-1.85.0/library/std/src/panicking.rs:547:19
std::panic::catch_unwind
at /usr/src/rustc-1.85.0/library/std/src/panic.rs:358:14
std::thread::Builder::spawn_unchecked_::{{closure}}
at /usr/src/rustc-1.85.0/library/std/src/thread/mod.rs:562:30
19: core::ops::function::FnOnce::call_once{{vtable.shim}}
at /usr/src/rustc-1.85.0/library/core/src/ops/function.rs:250:5
20: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
at /usr/src/rustc-1.85.0/library/alloc/src/boxed.rs:1993:9
<alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
at /usr/src/rustc-1.85.0/library/alloc/src/boxed.rs:1993:9
std::sys::pal::unix::thread::Thread::new::thread_start
at /usr/src/rustc-1.85.0/library/std/src/sys/pal/unix/thread.rs:106:17
21: start_thread
at ./nptl/pthread_create.c:448:8
22: __GI___clone3
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78:0
I do start gitui from the toplevel directory (where the .git subdir is) and the .git/HEAD file does exist.
Thanks a lot! Judging by the stack trace, this seems to be the location of the original error: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/x86_64/clone3.S;h=3e26bd7c3f65245ce7218c2d257609b9925524f8;hb=HEAD#l78. This does not necessarily seem to be related to either gitui or gitoxide. Is there any other information you can gather about the panic?
My command that triggers an immediate abend: gitui --watcher --directory ./ which cites file: "src/watcher.rs", line: 79, col: 10