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

guitui crashs when switching to Log tab "Too many open files; class=Os (2)" #2433

Open
m4salah opened this issue Nov 23, 2024 · 4 comments
Open
Labels
bug Something isn't working

Comments

@m4salah
Copy link

m4salah commented Nov 23, 2024

Describe the bug
gitui crashes when switching to the Log tab.

To Reproduce
Steps to reproduce the behavior:

  1. Open gitui
  2. Press 2 to switch to the Log tab when the Status tab still loading
  3. 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.

@m4salah m4salah added the bug Something isn't working label Nov 23, 2024
@extrawurst
Copy link
Collaborator

can't reproduce, is this a public repository?

@m4salah
Copy link
Author

m4salah commented Nov 24, 2024

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)

@naseschwarz
Copy link
Contributor

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?

@m4salah
Copy link
Author

m4salah commented Mar 21, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants