** Description changed:

+ 
+ [Impact]
+ 
+ This is a regression that gets tmux not to record logins through utmp
+ for its sessions (https://github.com/tmux/tmux/issues/2022). The bug was
+ fixed upstream in
+ https://github.com/tmux/tmux/commit/54efe337993b5571728a09b247c7f39d493659a8
+ by reintroducing the code that calls utempter to register the tmux
+ session in utmp.
+ 
+ This SRU is especially important because it affects unattended-upgrades
+ users. unattended-upgrades uses /usr/bin/users to determine logged-in
+ users, which queries utmp for that purpose. If running tmux sessions are
+ not registered, and unattended-upgrades is configured not to reboot when
+ there are users logged in, then it will misbehave and forcefully kill
+ the running (not recorded) tmux session.
+ 
+ The MP provided solves the issue by introducing the specific upstream
+ fix into Focal's tmux.
+ 
+ [Test Plan]
+ 
+ * Reproducing:
+  * Install tmux-3.0a-2ubuntu0.2 in Focal.
+  * Start a tmux session (by running tmux) and detach from the session 
("ctrl+b", then press "d").
+  * Run "who". You should verify that no entries for the running tmux session 
were recorded.
+  * Run "tmux attach" and exit the session.
+ * Verifying fix:
+  * Install tmux-3.0a-2ubuntu0.3 (from MP) in Focal.
+  * Start a tmux session (by running tmux) and detach from the session 
("ctrl+b", then press "d").
+  * Run "who". You should verify that there is an entry for the running tmux 
session recorded.
+  * Run "tmux attach" and exit the session.
+ 
+ [Where problems could occur]
+ 
+ This is a cherry-pick commit from upstream. 113 other code changes (that
+ are not present in this MP) were applied upstream before the patch being
+ proposed was introduced, meaning the code path may deviate from
+ upstream's codepath during execution leading to unexpected behaviour,
+ which could result in tmux terminating abruptly (e.g., segmetation
+ fault) for possible not tested scenarios when starting a tmux session.
+ 
+ In special, there were a small change in an upstream struct
+ (window_pane) is being used in the code introduced by this patch
+ (additional data was added). However, the change does not seem to affect
+ the cherry-picked change AFAICT.
+ 
  [original message]
  
  Hallo!
  I have recently - I am pretty sure it is since the 20.04 upgrade (coming from 
18.04) - experienced the problem that (detached) tmux sessions don't show up 
anymore in the output of commands such as `who -u` or `users`.
- Since I have a cron job for shutting down hosts where no users are logged in,
- I am constantly kicking out people now who have running jobs in detached tmux 
sessions.
+ Since I have a cron job for shutting down hosts where no users are logged in, 
I am constantly kicking out people now who have running jobs in detached tmux 
sessions.
  We would be very happy if this could be fixed.
  Thanks!
- 
- [Impact]
- 
- This is a regression that gets tmux not to record logins through utmp for its
- sessions (https://github.com/tmux/tmux/issues/2022). The bug was fixed 
upstream
- in 
https://github.com/tmux/tmux/commit/54efe337993b5571728a09b247c7f39d493659a8
- by reintroducing the code that calls utempter to register the tmux session in
- utmp.
- 
- This SRU is especially important because it affects unattended-upgrades users.
- unattended-upgrades uses /usr/bin/users to determine logged-in users, which
- queries utmp for that purpose. If running tmux sessions are not registered, 
and
- unattended-upgrades is configured not to reboot when there are users logged 
in,
- then it will misbehave and forcefully kill the running (not recorded) tmux
- session.
- 
- The MP provided solves the issue by introducing the specific upstream fix into
- Focal's tmux.
- 
- [Test Plan]
-  
- * Reproducing:
-  * Install tmux-3.0a-2ubuntu0.2 in Focal.
-  * Start a tmux session (by running tmux) and detach from the session 
("ctrl+b", then press "d").
-  * Run "who". You should verify that no entries for the running tmux session 
were recorded.
-  * Run "tmux attach" and exit the session.
- * Verifying fix:
-  * Install tmux-3.0a-2ubuntu0.3 (from MP) in Focal.
-  * Start a tmux session (by running tmux) and detach from the session 
("ctrl+b", then press "d").
-  * Run "who". You should verify that there is an entry for the running tmux 
session recorded.
-  * Run "tmux attach" and exit the session.
- 
- [Where problems could occur]
- 
- This is a cherry-pick commit from upstream. 113 other code changes (that are
- not present in this MP) were applied upstream before the patch being proposed
- was introduced, meaning the code path may deviate from upstream's codepath
- during execution leading to unexpected behaviour, which could result in tmux
- terminating abruptly (e.g., segmetation fault) for possible not tested
- scenarios when starting a tmux session.
- 
- In special, there were a small change in an upstream struct (window_pane) is
- being used in the code introduced by this patch (additional data was added).
- However, the change does not seem to affect the cherry-picked change AFAICT.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1890406

Title:
  tmux sessions don't show up with who, users, ...

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/tmux/+bug/1890406/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to