Description of problem: restart of sshd.service closes connected sessions. Version-Release number of selected component (if applicable): # rpm -q openssh systemd openssh-5.9p1-23.fc18.x86_64 systemd-185-7.gite7aee75.fc18.x86_64 How reproducible: always Steps to Reproduce: # ps xawf -eo pid,user,cgroup,args ... 1244 root 3:cpuacct,cpu:/system/sshd. /usr/sbin/sshd -D 1245 root 3:cpuacct,cpu:/system/sshd. \_ sshd: root@pts/0 1249 root 3:cpuacct,cpu:/system/sshd. \_ -bash 1266 root 3:cpuacct,cpu:/system/sshd. \_ ps xawf -eo pid,user,cgroup,args # systemctl status sshd.service sshd.service - OpenSSH server daemon Loaded: loaded (/etc/systemd/system/sshd.service; enabled) Active: active (running) since Tue, 26 Jun 2012 08:05:21 -0400; 1min 23s ago Main PID: 1244 (sshd) CGroup: name=systemd:/system/sshd.service └ 1244 /usr/sbin/sshd -D # grep systemd /etc/pam.d/{password,system}-auth /etc/pam.d/password-auth:-session optional pam_systemd.so /etc/pam.d/system-auth:-session optional pam_systemd.so # systemctl restart sshd.service Connection to rawhide-openssh closed by remote host. Connection to rawhide-openssh closed. Same openssh and pam configuration work on f17
Is this the same as the RHEL bug 833379? Are you using any non-default ControlGroup= settings in sshd.service?
It might be same. I use default .service file for sshd service without any change.
I've removed debug sshd.service from /etc. # systemctl status sshd.service sshd.service - OpenSSH server daemon Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled) Active: active (running) since Tue, 26 Jun 2012 08:56:35 -0400; 7s ago Process: 956 ExecStartPre=/usr/sbin/sshd-keygen (code=exited, status=0/SUCCESS) Main PID: 960 (sshd) CGroup: name=systemd:/system/sshd.service └ 960 /usr/sbin/sshd -D # cat /usr/lib/systemd/system/sshd.service [Unit] Description=OpenSSH server daemon After=syslog.target network.target auditd.service [Service] EnvironmentFile=/etc/sysconfig/sshd ExecStartPre=/usr/sbin/sshd-keygen ExecStart=/usr/sbin/sshd -D $OPTIONS ExecReload=/bin/kill -HUP $MAINPID [Install] WantedBy=multi-user.target
I logged in to your VM (thanks!) and saw this: # cat /proc/$$/cgroup 9:perf_event:/ 8:blkio:/ 7:net_cls:/ 6:freezer:/ 5:devices:/ 4:memory:/ 3:cpuacct,cpu:/system/sshd.service 2:cpuset:/ 1:name=systemd:/user/root/9 So my login shell is sharing the group with sshd.service in the cpuacct,cpu hierarchy. It appears to be a bug in systemd that it kills processes in all the cgroup bondings when stopping sshd.service. I believe that for the killing only the "name=systemd" hierarchy should be used.
I am not quite sure if problem is completely in systemd. I had quite 'old' rawhide but with latest systemd and the result was: [root@systemd ~]# uname -a Linux systemd 3.5.0-0.rc1.git0.1.fc18.x86_64 #1 SMP Sun Jun 3 14:07:54 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux [root@systemd ~]# rpm -qv systemd systemd-185-7.gite7aee75.fc18.x86_64 [root@systemd ~]# cat /proc/$$/cgroup 9:perf_event:/ 8:blkio:/ 7:net_cls:/ 6:freezer:/ 5:devices:/ 4:memory:/ 3:cpuacct,cpu:/ 2:cpuset:/ 1:name=systemd:/user/root/2 But after yum update: [root@systemd ~]# uname -a Linux systemd 3.5.0-0.rc3.git0.2.fc18.x86_64 #1 SMP Mon Jun 18 14:17:17 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux [root@systemd ~]# rpm -qv systemd systemd-185-7.gite7aee75.fc18.x86_64 [root@systemd ~]# cat /proc/$$/cgroup 9:perf_event:/ 8:blkio:/ 7:net_cls:/ 6:freezer:/ 5:devices:/ 4:memory:/ 3:cpuacct,cpu:/system/sshd.service 2:cpuset:/ 1:name=systemd:/user/root/2
(In reply to comment #5) > 3:cpuacct,cpu:/ > 3:cpuacct,cpu:/system/sshd.service It would be interesting to find out what causes this difference.
I have a clone of this old rawhide (but a little bit broken), so I tried to update openssh, systemd and kernel separately to find which one caused this. But it seems that at the end it was none of them: [root@systemd ~]# uname -a Linux systemd 3.5.0-0.rc4.git0.1.fc18.x86_64 #1 SMP Mon Jun 25 17:53:50 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux [root@systemd ~]# rpm -qv systemd systemd-185-7.gite7aee75.fc18.x86_64 [root@systemd ~]# rpm -qv openssh openssh-5.9p1-23.fc18.x86_64 [root@systemd ~]# rpm -qv kernel kernel-3.3.7-1.fc17.x86_64 kernel-3.5.0-0.rc1.git0.1.fc18.x86_64 kernel-3.5.0-0.rc4.git0.1.fc18.x86_64 [root@systemd ~]# cat /proc/$$/cgroup 9:perf_event:/ 8:blkio:/ 7:net_cls:/ 6:freezer:/ 5:devices:/ 4:memory:/ 3:cpuacct,cpu:/ 2:cpuset:/ 1:name=systemd:/user/root/4
*** Bug 843925 has been marked as a duplicate of this bug. ***
Note this gravely affects the ability to do plain 'yum update'. For details see bug 843925.
I just had this happen again with the update from openssh-server-5.9p1-24.fc18.x86_64 to openssh-server-5.9p1-25.fc18.x86_64 The workaround is to do: rpm -e --noscripts openssh-server-5.9p1-24.fc18.x86_64 package-cleanup --cleandupes
This is probably caused by kernel or at least it is involved. [root@systemd ~]# cat /proc/$$/cgroup 9:perf_event:/ 8:blkio:/ 7:net_cls:/ 6:freezer:/ 5:devices:/ 4:memory:/ 3:cpuacct,cpu:/ 2:cpuset:/ 1:name=systemd:/user/root/2 [root@systemd ~]# uname -a Linux systemd 3.5.0-0.rc1.git0.1.fc18.x86_64 #1 SMP Sun Jun 3 14:07:54 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux and when I use the same machine only with rc3 kernel: [root@systemd ~]# cat /proc/$$/cgroup 9:perf_event:/ 8:blkio:/ 7:net_cls:/ 6:freezer:/ 5:devices:/ 4:memory:/ 3:cpuacct,cpu:/system/sshd.service 2:cpuset:/ 1:name=systemd:/user/root/2 [root@systemd ~]# uname -a Linux systemd 3.5.0-0.rc3.git0.2.fc18.x86_64 #1 SMP Mon Jun 18 14:17:17 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Is this still an issue? This seems to work on F18 right now. So closing. Feel free to reopen if this continues to be an issue.