Verification done on xenial-proposed.
With the new systemd and dbus packages, there are no leaked sessions after the test-case of ssh loop.
The autopkgtests regressions reported previously are unrelated to this change (comments #11 to #16).
cheers, Mauricio
Setup ---
$ sudo snap install --beta --classic multipass
$ multipass launch --cpus 2 --mem 8G --disk 8G --name lp1846787 xenial $ multipass shell lp1846787
$ lsb_release -cs xenial
$ ssh-keygen -t rsa -f ~/.ssh/id_rsa -N '' $ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys $ sudo apt update && sudo apt -y upgrade && sudo reboot
xenial-updates: there are leaked sessions after ssh loop. (bad) ---
$ multipass shell lp1846787
$ dpkg -s systemd dbus | grep ^Version: Version: 229-4ubuntu21.22 Version: 1.10.6-1ubuntu3.4
$ find /run/systemd/system/ -name 'session-*.scope.d' | wc -l 1
$ find /run/systemd/system/ -name '*.scope.d' /run/systemd/system/session-1.scope.d
$ for i in {1..1000}; do sleep 0.01; ssh localhost sleep 1 & done ... [1000] 12191
$ jobs $
$ find /run/systemd/system/ -name 'session-*.scope.d' | wc -l 32
$ find /run/systemd/system/ -name 'session-*.scope.d' /run/systemd/system/session-906.scope.d /run/systemd/system/session-896.scope.d /run/systemd/system/session-848.scope.d ... /run/systemd/system/session-1.scope.d
xenial-proposed: there are NO leaked sessions after ssh loop. (good; tested 3x) ---
$ echo 'deb http://archive.ubuntu.com/ubuntu xenial-proposed main' | sudo tee /etc/apt/sources.list.d/xenial-proposed.list $ sudo apt update && sudo apt -y install systemd dbus && sudo reboot
$ dpkg -s systemd dbus | grep ^Version: Version: 229-4ubuntu21.23 Version: 1.10.6-1ubuntu3.5
$ find /run/systemd/system/ -name 'session-*.scope.d' /run/systemd/system/session-1.scope.d
$ for i in {1..1000}; do sleep 0.01; ssh localhost sleep 1 & done ... [1000] 12462
Verification done on xenial-proposed.
With the new systemd and dbus packages, there are no leaked sessions after the test-case of ssh loop.
The autopkgtests regressions reported previously are unrelated to this change (comments #11 to #16).
cheers,
Mauricio
Setup
---
$ sudo snap install --beta --classic multipass
$ multipass launch --cpus 2 --mem 8G --disk 8G --name lp1846787 xenial
$ multipass shell lp1846787
$ lsb_release -cs
xenial
$ ssh-keygen -t rsa -f ~/.ssh/id_rsa -N '' authorized_ keys
$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/
$ sudo apt update && sudo apt -y upgrade && sudo reboot
xenial-updates: there are leaked sessions after ssh loop. (bad)
---
$ multipass shell lp1846787
$ dpkg -s systemd dbus | grep ^Version:
Version: 229-4ubuntu21.22
Version: 1.10.6-1ubuntu3.4
$ find /run/systemd/ system/ -name 'session-*.scope.d' | wc -l
1
$ find /run/systemd/ system/ -name '*.scope.d' system/ session- 1.scope. d
/run/systemd/
$ for i in {1..1000}; do sleep 0.01; ssh localhost sleep 1 & done
...
[1000] 12191
$ jobs
$
$ find /run/systemd/ system/ -name 'session-*.scope.d' | wc -l
32
$ find /run/systemd/ system/ -name 'session-*.scope.d' system/ session- 906.scope. d system/ session- 896.scope. d system/ session- 848.scope. d system/ session- 1.scope. d
/run/systemd/
/run/systemd/
/run/systemd/
...
/run/systemd/
xenial-proposed: there are NO leaked sessions after ssh loop. (good; tested 3x)
---
$ echo 'deb http:// archive. ubuntu. com/ubuntu xenial-proposed main' | sudo tee /etc/apt/ sources. list.d/ xenial- proposed. list
$ sudo apt update && sudo apt -y install systemd dbus && sudo reboot
$ multipass shell lp1846787
$ dpkg -s systemd dbus | grep ^Version:
Version: 229-4ubuntu21.23
Version: 1.10.6-1ubuntu3.5
$ find /run/systemd/ system/ -name 'session-*.scope.d' | wc -l
1
$ find /run/systemd/ system/ -name 'session-*.scope.d' system/ session- 1.scope. d
/run/systemd/
$ for i in {1..1000}; do sleep 0.01; ssh localhost sleep 1 & done
...
[1000] 12462
$ jobs
$
$ find /run/systemd/ system/ -name 'session-*.scope.d' | wc -l
1
$ find /run/systemd/ system/ -name 'session-*.scope.d' system/ session- 1.scope. d
/run/systemd/