Livelock if attaching a session in a circular way #6
Labels
Kind: Bug 🐞
Something isn't working
Target: Core 💥
Core architectural support library
Target: Reference implementation 📃
The "official" Client & Server implementations
A
A
, create and attach to sessionB
B
, attach to sessionA
Both clients' and the server's CPU use will spike once it starts communicating data between the sessions recursively, resulting in a livelock of the affected sessions. On powerful enough systems, it seems that scheduling and queueing allow for other sessions to survive this ordeal.
Note: It is enough if session
A
recursively attaches to sessionA
.It is not trivial to detect and keep track of what session is attached to what other session, and while it could technically be possible, it is not worth the effort. A blanket denial of recursive Monomux attaches should be implemented instead. (This is how
tmux
does it, by the way: "[...] sessions should be nested with care,unset TMUX
and try again [...]".)The text was updated successfully, but these errors were encountered: