[systemd-devel] KillUserProcesses timeout

Lennart Poettering lennart at poettering.net
Mon Jan 26 18:10:18 PST 2015


On Tue, 27.01.15 02:12, Mikhail Morfikov (mmorfikov at gmail.com) wrote:

> 
> > Normally, the SIGTERM should be delivered instantly on logout from
> > logind. Unless the PAM session end hook wasn't called or so.
> > 
> > If you log in as root, and then reproduce the 20s wait for another
> > user what does "loginctl session-status" and "loginctl user-status"
> > say about the session/user that is hanging?
> > 
> > Lennart
> > 
> 
> I know where the problem is. I'm using tmux, and when I try to log out
> and at the same time I'm logged on root in tmux, I get the lag.
> 
> Here's the situation after logout:

Hmm, not sure I follow. 

> morfik (1000)
> 	   Since: Tue 2015-01-27 01:59:56 CET; 1min 59s ago
> 	   State: closing
> 	Sessions: *3
> 	    Unit: user-1000.slice
> 		  ├─user at 1000.service
> 		  │ ├─3861 /lib/systemd/systemd --user
> 		  │ └─3863 (sd-pam)
> 		  └─session-3.scope
> 		    ├─3957 gpg-agent -s --enable-ssh-support --daemon --write...
> 		    ├─4082 tmux attach-session -t logi
> 		    ├─4084 bash -c cat /dev/logi | ccze -m ansi -p syslog -C
> 		    ├─4085 -bash
> 		    ├─4086 newsbeuter
> 		    ├─4088 cat /dev/logi
> 		    ├─4089 ccze -m ansi -p syslog -C
> 		    ├─5212 -bash
> 		    ├─5232 su -
> 		    ├─5250 -su
> 		    ├─5269 -bash
> 		    ├─5289 su -
> 		    └─5306 -su
> 
> And that's all of the remaining processes. After ~20s they will be also killed.
> 
> So, is there a way to kill them without logging out from the root account?

The session is shown as closing, that's good. Can you check what
"systemctl status" reports on the scope unit if this hang happens?

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list