-
-
Notifications
You must be signed in to change notification settings - Fork 644
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
Thread 'stdin_handler' panicked along suspending system into sleep mode #1429
Comments
i think it could be related to #1334, which might explain why you are having trouble reproducing it consistently. |
Does this crash your session / the zellij server or are you able to reattach to your session afterwards? |
We actually have a dedicated signal handling thread here: zellij/zellij-client/src/lib.rs Line 239 in a7ddfe1
zellij/zellij-client/src/os_input_output.rs Line 155 in a7ddfe1
So I am not sure why any signal still interrupts the polling syscall (probably zellij/zellij-client/src/os_input_output.rs Lines 254 to 256 in a7ddfe1
|
Thanks for the pointers!
|
Disclaimer: I do not know this area of the code well, take the following with a grain of salt: Judging from my Rust knowlegde, The best way to fix this would be in my opinion to make sure the |
Signal semantics on the OS work in the following way: There is a process mask and thread mask of "always guaranteed to be delivered signals" and realtime signals (user-definable), which are defined as list. Overall, signal handling is a pile of non-portable mess as signals are kinda like small interrupt handlers. So its best to mask everything and only allow necessary things in specified regions of code. See also my PR on the abort() call in Zig ziglang/zig#11565 or musl abort(). |
Unfortunately the issue is not easily reproducable and I dont have a backtrace/the panic handler did not tell what code broke.
Further, I broke the logs in
/tmp/zellij-1000/zellij-log/
by starting a fresh instance, but I expect those would not tell much either.The following output information were printed:
Basic information
zellij --version
: zellij 0.29.1tput lines
: 30 (not relevant)tput cols
: 126 (not relevant)uname -av
orver
(Windows): Linux pc 5.17.9-arch1-1List of programs you interact with as,
PROGRAM --version
: output cropped meaningful, for example:nvim --version
: NVIM v0.5.0-dev+1299-g1c2e504d5 (used the appimage release)alacritty --version
: alacritty 0.7.2 (5ac8060b)Further information
To reproduce, I suspect that suspending system into sleep mode and waking up should reproduce the issue eventually.
Signaling code is very hard, so I would not be surprised that some dependency does not handle the signal interrupt mask or handlers correctly.
If you give me some pointers what you use to poll stdin I'll fix the signaling code myself. Ideally a portable solution should be used.
My suspection is that signal interrupts are not handled at all such that the bubbled up failure to poll crashes the application.
The text was updated successfully, but these errors were encountered: