guitui crashs when switching to Log tab "Too many open files; class=Os (2)"
Describe the bug gitui crashes when switching to the Log tab.
To Reproduce Steps to reproduce the behavior:
- Open gitui
- Press 2 to switch to the Log tab when the Status tab still loading
- Crashs with
Error: git error:failed to resolve path '.': Too many open files; class=Os (2)
Caused by:
failed to resolve path '.': Too many open files; class=Os (2)
Expected behavior Expect to see the logs without any crashes.
Screenshots If applicable, add screenshots to help explain your problem.
Context (please complete the following information):
- OS/Distro + Version:
macOS 15.1.1 (24B91) - GitUI Version:
0.26.3 - Rust version:
1.82
Additional context The repo is huge. The count of logs is: 26900.
When switching to Logs after the Status stopped loading there is no crashs.
can't reproduce, is this a public repository?
Unfortunately, it's not a public repository This is the log file if it helps
17:54:43 [TRACE] (1) gitui::app: [src/app.rs:154] open repo at: RefCell { value: Path(".") }
17:54:43 [TRACE] (6) mio::poll: [/Users/brew/Library/Caches/Homebrew/cargo_cache/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.11/src/poll.rs:551] registering event source with poller: token=Token(0), interests=READABLE
17:54:43 [TRACE] (6) mio::poll: [/Users/brew/Library/Caches/Homebrew/cargo_cache/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.11/src/poll.rs:551] registering event source with poller: token=Token(1), interests=READABLE
17:54:43 [TRACE] (1) asyncgit::tags: [asyncgit/src/tags.rs:67] request
17:54:43 [TRACE] (1) gitui: [src/main.rs:215] app start: 23 ms
17:54:43 [TRACE] (1) gitui::app: [src/app.rs:375] update
17:54:43 [TRACE] (1) asyncgit::tags: [asyncgit/src/tags.rs:67] request
17:54:43 [TRACE] (1) gitui::app: [src/app.rs:395] update_async: Git(Tags)
17:54:43 [TRACE] (1) gitui::app: [src/app.rs:395] update_async: Git(Log)
17:54:43 [TRACE] (1) asyncgit::tags: [asyncgit/src/tags.rs:67] request
17:54:43 [TRACE] (1) gitui::app: [src/app.rs:395] update_async: Git(Tags)
17:54:43 [TRACE] (1) asyncgit::tags: [asyncgit/src/tags.rs:67] request
17:54:43 [TRACE] (1) gitui::app: [src/app.rs:395] update_async: Git(Log)
17:54:43 [TRACE] (1) asyncgit::tags: [asyncgit/src/tags.rs:67] request
17:54:44 [TRACE] (1) gitui::app: [src/app.rs:395] update_async: Git(Log)
17:54:44 [TRACE] (1) asyncgit::tags: [asyncgit/src/tags.rs:67] request
17:54:44 [TRACE] (1) gitui::app: [src/app.rs:395] update_async: Git(Log)
17:54:44 [TRACE] (1) asyncgit::tags: [asyncgit/src/tags.rs:67] request
17:54:44 [TRACE] (1) gitui::app: [src/app.rs:395] update_async: Git(Log)
17:54:44 [TRACE] (1) asyncgit::tags: [asyncgit/src/tags.rs:67] request
17:54:44 [TRACE] (1) gitui::app: [src/app.rs:395] update_async: Git(Log)
17:54:44 [TRACE] (1) asyncgit::tags: [asyncgit/src/tags.rs:67] request
17:54:44 [TRACE] (1) gitui::app: [src/app.rs:395] update_async: Git(Log)
17:54:44 [TRACE] (1) asyncgit::tags: [asyncgit/src/tags.rs:67] request
17:54:44 [TRACE] (1) gitui::app: [src/app.rs:395] update_async: Git(Log)
17:54:44 [TRACE] (1) asyncgit::tags: [asyncgit/src/tags.rs:67] request
17:54:44 [TRACE] (1) gitui::app: [src/app.rs:395] update_async: Git(Log)
17:54:44 [TRACE] (4) asyncgit::revlog: [asyncgit/src/revlog.rs:234] revlog visited: 25430
17:54:44 [TRACE] (1) asyncgit::tags: [asyncgit/src/tags.rs:67] request
17:54:44 [TRACE] (1) gitui::app: [src/app.rs:395] update_async: Git(Log)
Could you provide an output from launchctl limit?
Would it be possible for you to give us an idea of how many files are in your index? For reference, I have tried to reproduce this with gitui on > 1000000 commits, file descriptor limit set to 50, 50000 files in the index or untracked, 90000 files altogether. Is this large enough or is your project larger?
Could you provide an output from
launchctl limit?
cpu unlimited unlimited
filesize unlimited unlimited
data unlimited unlimited
stack 8372224 67092480
core 0 unlimited
rss unlimited unlimited
memlock unlimited unlimited
maxproc 2666 4000
maxfiles 256 unlimited
Would it be possible for you to give us an idea of how many files are in your index? For reference, I have tried to reproduce this with gitui on > 1000000 commits, with the file descriptor limit set to 50, 50000 files in the index or untracked, 90000 files altogether. Is this large enough or is your project larger?
❯ git ls-files | wc -l
7133
❯ git rev-list --all --count
35607
❯ ulimit -n
256