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

Panic when cannot create a file descriptor #3877

Open
Andrew15-5 opened this issue Dec 16, 2024 · 1 comment
Open

Panic when cannot create a file descriptor #3877

Andrew15-5 opened this issue Dec 16, 2024 · 1 comment

Comments

@Andrew15-5
Copy link

2. Issues with the Zellij UI / behavior / crash

Issue description

It's mostly the OS/user problem, but maybe this can be improved by zellij as it panics if there are no more file descriptiors + it creates a yet another server with --server every time I try to run zellij and it crashes. I'm using entr to update MuPDF when working with Typst. And I noticed that I have accumulated way too many entr processes. After I pkill them the issue is gone. But since I can open new windows for different apps, this means that zellij may be able to run as well, just without a server or something. I didn't look into the architecture, but if you can eliminate the panic by either creating a descriptive message of why I can't run zellij or just making it run as usual, that would be great.

Minimal reproduction

Run out of file descriptors?

Other relevant information

backtrace
 RUST_BACKTRACE=1 zellij


  × Thread 'signal_listener' panicked.
  ├─▶ At zellij-client/src/lib.rs:708:14
  ╰─▶ called `Result::unwrap()` on an `Err` value: Error { kind: Io(Os { code: 24, kind: Uncategorized, message: "No file descriptors available" }), paths: [] }
      
      Panic backtrace:
         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>
      
  help: If you are seeing this message, it means that something went wrong.
        
        -> To get additional information, check the log at: /tmp/zellij-1000/zellij-log/zellij.log
        -> To see a backtrace next time, reproduce the error with: RUST_BACKTRACE=1 zellij [...]
        -> To help us fix this, please open an issue: https://github.com/zellij-org/zellij/issues

From the logs:

ERROR  |zellij_server::background| 2024-12-16 21:27:57.394 [async-std/runti] [zellij-server/src/background_jobs.rs:485]: Failed to read created stamp of resurrection file: Error { kind: Unsupported, message: "creation time is not available on this platform currently" }
big logs
INFO   |zellij_client            | 2024-12-16 21:28:31.255 [main      ] [zellij-client/src/lib.rs:182]: Starting Zellij client! 
INFO   |zellij_server            | 2024-12-16 21:28:31.272 [main      ] [zellij-server/src/lib.rs:522]: Starting Zellij server! 
WARN   |zellij_utils::kdl        | 2024-12-16 21:28:31.278 [main      ] [zellij-utils/src/kdl/mod.rs:695]: Converting new tab action without arguments, original action saved to .bak.kdl file 
WARN   |zellij_utils::kdl        | 2024-12-16 21:28:31.279 [main      ] [zellij-utils/src/kdl/mod.rs:695]: Converting new tab action without arguments, original action saved to .bak.kdl file 
ERROR  |zellij_utils::errors::not| 2024-12-16 21:28:31.281 [signal_listener] [zellij-utils/src/errors.rs:690]: Panic occured:
             thread: signal_listener
             location: At zellij-client/src/lib.rs:708:14
             message: called `Result::unwrap()` on an `Err` value: Error { kind: Io(Os { code: 24, kind: Uncategorized, message: "No file descriptors available" }), paths: [] } 
ERROR  |zellij_client::stdin_ansi| 2024-12-16 21:28:31.282 [stdin_handler] [zellij-client/src/stdin_ansi_parser.rs:124]: Failed to open STDIN cache file: Os { code: 2, kind: NotFound, message: "No such file or directory" } 
INFO   |zellij_server            | 2024-12-16 21:28:31.285 [main      ] [zellij-server/src/lib.rs:1493]: Compiling plugins using Cranelift 
INFO   |zellij_server::plugins   | 2024-12-16 21:28:31.286 [wasm      ] [zellij-server/src/plugins/mod.rs:232]: Wasm main thread starts 
WARN   |zellij_utils::ipc        | 2024-12-16 21:28:31.785 [server_router] [zellij-utils/src/ipc.rs:232]: Error in IpcReceiver.recv(): InvalidMarkerRead(Error { kind: UnexpectedEof, message: "failed to fill whole buffer" }) 
@ashayh
Copy link

ashayh commented Dec 19, 2024

I have a similar crash issue on Linux ashay 6.8.0-49-generic #49-Ubuntu SMP PREEMPT_DYNAMIC Mon Nov 4 02:06:24 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux .

zellij a # produces a crash.

The log shows:

INFO   |zellij_client            | 2024-12-18 20:50:51.956 [main      ] [/home/myhome/.cargo/registry/src/index.crates.io-6f17d22bba15001f/zellij-client-0.41.2/src/lib.rs:182]: Starting Zellij client!
INFO   |zellij_server            | 2024-12-18 20:50:51.964 [main      ] [/home/myhome/.cargo/registry/src/index.crates.io-6f17d22bba15001f/zellij-server-0.41.2/src/lib.rs:522]: Starting Zellij server!
WARN   |zellij_utils::kdl        | 2024-12-18 20:50:51.967 [main      ] [/home/myhome/.cargo/registry/src/index.crates.io-6f17d22bba15001f/zellij-utils-0.41.2/src/kdl/mod.rs:695]: Converting new tab action without arguments, original action saved to .bak.kdl file
WARN   |zellij_utils::kdl        | 2024-12-18 20:50:51.968 [main      ] [/home/myhome/.cargo/registry/src/index.crates.io-6f17d22bba15001f/zellij-utils-0.41.2/src/kdl/mod.rs:695]: Converting new tab action without arguments, original action saved to .bak.kdl file
ERROR  |zellij_utils::errors::not| 2024-12-18 20:50:51.968 [signal_listener] [/home/myhome/.cargo/registry/src/index.crates.io-6f17d22bba15001f/zellij-utils-0.41.2/src/errors.rs:690]: Panic occured:
             thread: signal_listener
             location: At /home/myhome/.cargo/registry/src/index.crates.io-6f17d22bba15001f/zellij-client-0.41.2/src/lib.rs:708:14
             message: called `Result::unwrap()` on an `Err` value: Error { kind: Io(Os { code: 24, kind: Uncategorized, message: "Too many open files" }), paths: [] }
WARN   |zellij_server::route     | 2024-12-18 20:50:51.970 [server_router] [/home/myhome/.cargo/registry/src/index.crates.io-6f17d22bba15001f/zellij-server-0.41.2/src/route.rs:1111]: Server not ready, trying to place instruction in retry queue...
WARN   |zellij_server::route     | 2024-12-18 20:50:51.970 [server_router] [/home/myhome/.cargo/registry/src/index.crates.io-6f17d22bba15001f/zellij-server-0.41.2/src/route.rs:1229]: Server ready, retrying sending instruction.
INFO   |zellij_server            | 2024-12-18 20:50:51.970 [main      ] [/home/myhome/.cargo/registry/src/index.crates.io-6f17d22bba15001f/zellij-server-0.41.2/src/lib.rs:1493]: Compiling plugins using Cranelift
INFO   |zellij_server::plugins   | 2024-12-18 20:50:51.971 [wasm      ] [/home/myhome/.cargo/registry/src/index.crates.io-6f17d22bba15001f/zellij-server-0.41.2/src/plugins/mod.rs:232]: Wasm main thread starts
WARN   |zellij_utils::input::layo| 2024-12-18 20:50:51.972 [wasm      ] [/home/myhome/.cargo/registry/src/index.crates.io-6f17d22bba15001f/zellij-utils-0.41.2/src/input/layout.rs:109]: Overriding plugin alias
WARN   |zellij_utils::input::layo| 2024-12-18 20:50:51.972 [wasm      ] [/home/myhome/.cargo/registry/src/index.crates.io-6f17d22bba15001f/zellij-utils-0.41.2/src/input/layout.rs:109]: Overriding plugin alias
WARN   |zellij_utils::ipc        | 2024-12-18 20:50:51.975 [server_router] [/home/myhome/.cargo/registry/src/index.crates.io-6f17d22bba15001f/zellij-utils-0.41.2/src/ipc.rs:232]: Error in IpcReceiver.recv(): InvalidMarkerRead(Error { kind: UnexpectedEof, message: "failed to fill whole buffer" })
ERROR  |zellij_server::route     | 2024-12-18 20:50:51.976 [server_router] [/home/myhome/.cargo/registry/src/index.crates.io-6f17d22bba15001f/zellij-server-0.41.2/src/route.rs:1245]: Received empty message from client, logging client out.
INFO   |zellij_server::plugins::p| 2024-12-18 20:50:51.983 [async-std/runti] [/home/myhome/.cargo/registry/src/index.crates.io-6f17d22bba15001f/zellij-server-0.41.2/src/plugins/plugin_loader.rs:533]: Loaded plugin 'tab-bar' from cache folder at '/home/myhome/.cache/zellij' in 413.507µs
INFO   |zellij_server::plugins::p| 2024-12-18 20:50:51.984 [async-std/runti] [/home/myhome/.cargo/registry/src/index.crates.io-6f17d22bba15001f/zellij-server-0.41.2/src/plugins/plugin_loader.rs:533]: Loaded plugin 'status-bar' from cache folder at '/home/myhome/.cache/zellij' in 289.775µs

Killing some processes using too many file descriptors make zellij happy.

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

2 participants