-
-
Notifications
You must be signed in to change notification settings - Fork 678
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
Zellij Automatically Exits when SSH is disconnected #1029
Comments
Could you try |
I never had problems with tmux session disappearing after a ssh disconnect, in fact on my test machine tmux sessions survive every time. Zellij should also reach this state. Curiously, the zellij session vanishes for me only in some situations:
When the session crashes upon ssh disconnect, I have not found a way to get the crash message. |
Hey @raphCode - I'm having a hard time reproducing this. Let's assume I don't have access to a server - any ideas how I can simulate a timeout? Closest thing I have is a docker container. |
I think it should be possible to spin up a docker container with sshd running and connect there. In fact, I guess these steps can be performed on any container infrastructure, not just docker. |
While trying to reproduce this locally and couldn't getting it to work. My attempt was to connect to the local sshd tunneled through socat: I tried again with my server: I found that the crashes happen random in every case, so my analysis above is not correct, some cases just seem to crash more likely than others. It kinda reminded me of #882 since this is the only random-looking crash I am aware of. Indeed, running with only one CPU does improve the chance of crashing upon ssh disconnect. I tried to compile my own versions to test whether my merged PR fixes the problem, but my self-compiled versions never crashed, even versions prior to the PR! I guess this might be due to debug builds which alter the execution timings slightly, not triggering the race condition. Pinging @tlinford as well since he commented on my fix PR. Does the above make any sense / Can #882 really be the cause of this issue as well? Tell me if I should try some release builds tomorrow to make sure my PR solves this issue. |
Wrote a small test loop to get some numbers:
Results on my server:
With that 100% crash rate I am certain this is #882 which in turn was fixed by #1051 I am not sure if I did the release builds correctly, I expected the same results as with the system package zellij. I also failed to get a release build at 79421fb, to see if the issue is fixed by /pull/1051. But executing the binary yields this panic immediately:
|
What happens if you manually set the data dir again, or delete you data dir? We only update plugins, we don't downgrade them. |
This happens because the plugins that zellij installs on run are taken from the |
I got it to run, but I can't test it with the script since the client process seems to stay alive upon ssh disconnect. This means a bunch of |
Do they get killed with |
I'm also not seeing crashes, but I'm also seeing attaches piling up. Also, when testing this out, I keep randomly seeing this a bunch, but it's not even necessarily when running this script to attempt to repro:
|
When I pointed that test script at localhost, the first three "crashed" and then I got one crash with that same buffer error, and then a few started working and attaches started piling up. ^C. |
No, only the server process is killed. Would identifying the commit that introduced this behavior via git bisect help? |
I do think so! |
first bad commit: 0b74604 My first bisect produced nonsense results, then I tried again but deleted the |
This should happen if you go in reverse. If you go from low release number to high, it can happen on non release commits. If you build with |
Yes, I did |
Awesome, thanks for the bisect! This gives us a good start. |
I tried now 0.28.1 version and in remote machine created normal zellij session, put htop and detached session, log out from this machine and ssh again and session was still there with htop in it. In 0.27 and previously versions it was big problem for me (especially I never remembered Delamare2112 solution :P). |
Great to hear it works now!
Actually, the fix was already merged into 0.27.0, are you sure you experience the problem with that version? The issue wtih client processes lingering around after a ssh disconnect still persists, should we keep it in this issue or open a new one? |
I won't give my finger for whether it was version 0.27 or an older version though. :P
I think it should be new issue for this and close this. |
Thanks for reaching out! |
@Delamare2112 Thanks for this hint, I found that it is related to a change of systemd v230. Since this version the default setting in Changing this to |
I connected to the machine using SSH and started an new instance using 'zellij-s workspace'. Every time I quit, I need to detach manually. If SHH is disconnected or the network is interrupted, I need to re-use' zellij -s workspace', but this will lose the layout you created earlier. Is there a solution?
The text was updated successfully, but these errors were encountered: