-
-
Notifications
You must be signed in to change notification settings - Fork 694
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
fix: catch and report errors about tty I/O (#882) #1051
Conversation
Quick and dirty bandaid fix to some server crashes which occur to me lately. The underlying issue seems to be a race condition somewhere when the shell in the pane exits and the tty file descriptor becomes invalid, but zellij wants to write/read it? Bug trigger: - open some panes - exit the shells in the panes by spamming Ctrl-D works best when the system only runs on a single CPU, run the following to disable all cores but one: echo 0 | sudo tee /sys/devices/system/cpu/cpu*/online
Thanks for running the CI. Please approve the CI again. |
Looked a bit more into this, and also do not know how to properly fix this at the moment, I suspect some pretty big changes would be necessary. |
Yay, my first merged PR ❤️
Out of interest: |
My understanding is a bit limited of the full flow of opening ptys etc - but as far as I can tell the heart of the issue here is that we are passing around and using |
Yep, |
I tried to fix #882 by logging the corresponding errors instead of crashing.
This is a quick fix of the symptoms (server crash), and does not clear the underlying issue (I suspect a race condition around the tty file descriptor handling).
I am not experienced enough in the codebase to resolve the race condition, but I may look into it if someone gives me directions.
More details are in the github issue and in the commit message (if someone
git blame
s someday in the future).