zellij: Panic when ssh session terminates
Hi – love your project, thank you! i’m trying to figure out the bug below. If you can point in a general direction in the code, i could fix. I am very familiar with rust.
Basic information
zellij --version
: 0.30.0
tput lines
: 62
tput cols
: 242
uname -av
or ver
(Windows): Linux prometheus-vm 5.4.0-120-generic #136-Ubuntu SMP Fri Jun 10 13:40:48 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
List of programs you interact with as, PROGRAM --version
:
- No programs running just open zsh sessions.
Further information
- SSH into home server, start with
zellij --debug
- enter the control sequence to close ssh session (~.). This also happens if you put ssh to sleep via (~^z) and kill session.
- SSH session terminates, zellij-client exists (panics)
- SSH back into server, and there are no zellij sessions open.
- Reproducible, happens every time.
Specifics about my systems (not sure any info is useful)
- Happens when originating from iterm2 or alacritty (on macos)
- destination is a linux VM running inside a freebsd host using bhyve as vm host
zellij.log (using --debug)
INFO |zellij_client | 2022-06-20 13:50:43.479 [main ] [/home/brad/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-client-0.30.0/src/lib.rs:124]: Starting Zellij client!
INFO |zellij_server | 2022-06-20 13:50:43.490 [main ] [/home/brad/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-server-0.30.0/src/lib.rs:194]: Starting Zellij server!
INFO |zellij_server::wasm_vm | 2022-06-20 13:50:43.547 [wasm ] [/home/brad/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-server-0.30.0/src/wasm_vm.rs:87]: Wasm main thread starts
DEBUG |status-bar | 2022-06-20 13:50:43.677 [id: 1 ] quicknav_show_count: 18
DEBUG |status-bar | 2022-06-20 13:50:43.682 [id: 1 ] quicknav_show_count: 19
ERROR |zellij_client | 2022-06-20 13:50:49.767 [stdin_handler] [/home/brad/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-client-0.30.0/src/lib.rs:205]: Panic occured in client:
PanicInfo { payload: Any { .. }, message: Some(called `Result::unwrap()` on an `Err` value: Os { code: 5, kind: Uncategorized, message: "Input/output error" }), location: Location { file: "/home/brad/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-client-0.30.0/src/os_input_output.rs", line: 121, col: 39 }, can_unwind: true }
INFO |zellij_server::wasm_vm | 2022-06-20 13:50:49.776 [wasm ] [/home/brad/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-server-0.30.0/src/wasm_vm.rs:213]: wasm main thread exits
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (11 by maintainers)
Thanks @tlinford!
This happens here: https://github.com/zellij-org/zellij/blob/31d741263cf8dbbab463374d300349d00d1b93af/zellij-client/src/lib.rs#L359 Why do we do this? Shouldn’t we leave the server alone when the client crashes?
I traced this line via git blame to this commit: https://github.com/zellij-org/zellij/commit/b8acf190710e97092def6ef3adfe44e992ca140c#diff-d018c36dd0b3b1d46b1bcfed749b3f9f09c4d51e79ca63c18f01075172b0fef2R228
I am not familiar with the code at this old revision, but to me it looks like
Action::Quit
was added in error when refactoring the code.It turns out this is not as reproducible as i hoped. when i reported it, my sessions were always lost when the ssh connection terminates every time. My VM rebooted at some point and now, It still happens from time to time, but every time. There must be some other condition to trigger this. i’ll keep on trying to reproduce it. It surprised me that no one else has reported this happening, so perhaps its somehow unique to my ssh connections or tasks. I’m going to keep digging.