Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 508874 - sys-apps/systemd-???: sd-pam and gdm-session-worker processes are still running after logout
Summary: sys-apps/systemd-???: sd-pam and gdm-session-worker processes are still runni...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-27 13:56 UTC by Aleksander Wabik
Modified: 2015-09-07 18:23 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
my emerge --info output (emerge--info,5.68 KB, text/plain)
2014-04-27 13:56 UTC, Aleksander Wabik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksander Wabik 2014-04-27 13:56:01 UTC
[Preconditions]
1. Use systemd init
2. Use GDM and Gnome3 (gnome-shell) as login manager and working environment

I have a feeling that this field (description) is redundant with "Steps to reproduce", "Actual results" and "expected results".

Reproducible: Always

Steps to Reproduce:
1. Boot up the machine.
2. When GDM user selection appears, log in as USER.
3. When logged in, log out.
4. Ctrl+F2 to switch to the text console.
5. Log in as root or any other user different than USER.
6. $ ps aux | grep USER
Actual Results:  
$ ps aux | grep aw
aw         612  0.0  0.0 335260 12168 ?        S    15:20   0:00 gdm-session-worker [pam/gdm-password]
aw         626  0.0  0.0  35108  1952 ?        Ss   15:20   0:00 /usr/lib/systemd/systemd --user
aw         629  0.0  0.0 165940  1484 ?        S    15:20   0:00 (sd-pam)                
aw         699  0.2  0.0 450840  6704 ?        Sl   15:20   0:00 /usr/bin/pulseaudio --start
aw         736  0.0  0.0 116100  2484 ?        S    15:20   0:00 /usr/libexec/pulse/gconf-helper
root      1091  0.0  0.0   9476   908 tty2     S+   15:20   0:00 grep --colour=auto aw

After a few seconds, I can see that pulseaudio exits:
$ ps aux | grep aw
aw         612  0.0  0.0 335260 12168 ?        S    15:20   0:00 gdm-session-worker [pam/gdm-password]
aw         626  0.0  0.0  35108  1952 ?        Ss   15:20   0:00 /usr/lib/systemd/systemd --user
aw         629  0.0  0.0 165940  1484 ?        S    15:20   0:00 (sd-pam)                
root      1098  0.0  0.0   9476   908 tty2     S+   15:21   0:00 grep --colour=auto aw

But still systemd for my user, and gdm-session-worker, and sd-pam are running.

Additionally, sometimes also gnome-shell process is running, and consuming CPU, but this is probably a bug in gnome-shell.

Expected Results:  
No processes belonging to USER running. Even if I do not use kill-session-processes=1 in pam_systemd arguments (I do not spawn background processes when logged in).

There seems to be a workaround for pulseaudio: load-module module-x11-xsmp in /etc/pulse/default.pa - it will make pulseaudio exit immediately on logout. Not sure if it's a proper fix, what if I log in in the text console? Then there's no X11 session?

For me, bugs like this one are serious, because I use ecryptfs on my home directory, and I want no processes to block unmounting the encrypted filesystem when I log out. I use KillUserProcesses=yes in [Login] section of /etc/systemd/logind.conf (which seems to work at least to kill processes which hold files in my home dir, but not on pulseaudio) and load-module module-x11-xsmp in /etc/pulse/default.pa (which makes pulseaudio to exit immediately)
Comment 1 Aleksander Wabik 2014-04-27 13:56:38 UTC
Created attachment 375856 [details]
my emerge --info output
Comment 2 Pacho Ramos gentoo-dev 2014-04-27 14:21:05 UTC
The pulseaudio behavior is intentional (see bug #436506 and https://bugzilla.redhat.com/show_bug.cgi?id=555828#c9), sd-pam being still running is a systemd bug (see https://bugzilla.redhat.com/show_bug.cgi?id=1070403 , maybe trying systemd-212 would help), about gdm-session-worker I am a bit unsure as maybe it's kept running due the sd-pam process :/

Regarding gnome-shell eating lots of cpu from time to time at logout, I saw that bug in some of the machines I maintain and it got solved with gdm-3.10.0.1-r1
Comment 3 Aleksander Wabik 2014-04-27 15:05:51 UTC
(In reply to Pacho Ramos from comment #2)
> The pulseaudio behavior is intentional (see bug #436506 and
> https://bugzilla.redhat.com/show_bug.cgi?id=555828#c9), 

Okay, this is good to hear. I guess this will still be a problem with ecryptfs, but it's a problem for ecryptfs maintainers.

> sd-pam being still
> running is a systemd bug (see
> https://bugzilla.redhat.com/show_bug.cgi?id=1070403 , maybe trying
> systemd-212 would help), about gdm-session-worker I am a bit unsure as maybe
> it's kept running due the sd-pam process :/

OK. I'll see when systemd-212 is stable ;)
 
> Regarding gnome-shell eating lots of cpu from time to time at logout, I saw
> that bug in some of the machines I maintain and it got solved with
> gdm-3.10.0.1-r1

That's great news! I'll wait till gdm-3.10.0.1-r1 is stable.

What will happen with this bug now? Will it stay open till all the things you wrote are confirmed? (I could add ~amd64 for systemd and gdm and verify, but don't know when, I don't have much free time).
Comment 4 Pacho Ramos gentoo-dev 2015-09-07 18:23:09 UTC
Looks like all processes end up being stopped after logout now with systemd-225 and Gnome 3.16