geoclue agent process persists after user logout

Bug #1871728 reported by Daniel Richard G.
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
geoclue-2.0 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

This concerns geoclue-2.0 2.5.6-0ubuntu1 in Ubuntu focal.

I am using the Xfce desktop. When a user logs in, a /usr/libexec/geoclue-2.0/demos/agent process is started.

However, when the user logs out, and the associated "systemd --user" instance is killed, the geoclue process remains---apparently because it is running outside of the process group in which all the other session-related processes were in.

Not only does this prevent the process from being cleaned up correctly, if the user logs in again, *another* geoclue process starts up. And when they log out, and everything else gets cleaned up... *two* useless geoclue processes remain. Repeat ad infinitum.

Tags: focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in geoclue-2.0 (Ubuntu):
status: New → Confirmed
Revision history for this message
Erik Devriendt (erik-devriendt) wrote :

On UbuntuMATE 20.04, after logging out, the login session remains in state 'closing', blocked by the /usr/libexec/geoclue-2.0/demos/agent process.

The loginctl command shows accumulating sessions.
loginctl session-status <session-name> shows:

c2 - ebp-admin (1000)
           Since: Tue 2021-03-23 03:51:12 PDT; 3min 20s ago
          Leader: 1149
            Seat: seat0; vc7
         Display: :0
         Service: lightdm; type x11; class user
         Desktop: mate
           State: closing
            Unit: session-c2.scope
                  └─1547 /usr/libexec/geoclue-2.0/demos/agent

Mar 23 03:51:12 ubuntu systemd[1]: Started Session c2 of user ebp-admin.
Mar 23 03:51:14 ubuntu mate-session[1175]: WARNING: Unable to find provider '' of required component 'dock'
Mar 23 03:51:16 ubuntu gnome-keyring-daemon[1172]: The SSH agent was already initialized
Mar 23 03:51:16 ubuntu gnome-keyring-daemon[1172]: The Secret Service was already initialized
Mar 23 03:51:16 ubuntu gnome-keyring-daemon[1172]: The PKCS#11 component was already initialized
Mar 23 03:51:28 ubuntu pkexec[1888]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
Mar 23 03:51:28 ubuntu pkexec[1888]: ebp-admin: Executing command [USER=root] [TTY=unknown] [CWD=/home/ebp-admin] [COMMAND=/usr/lib/updat>
Mar 23 03:52:17 ubuntu lightdm[1149]: pam_unix(lightdm:session): session closed for user ebp-admin

Revision history for this message
Erik Devriendt (erik-devriendt) wrote :

Same behavior on Ubuntu derivatives Linux Mint 20.1 MATE and Cinnamon.

Revision history for this message
Erik Devriendt (erik-devriendt) wrote :

As a workaround, I changed /etc/systemd/logind.conf by putting:
KillUserProcesses=yes

There might be sideeffects though, like the 'screen' command not surviving the logout.

Revision history for this message
Daniel Richard G. (skunk) wrote :

KillUserProcesses=yes is a sledgehammer of a solution. I would advise just removing the geoclue package.

Revision history for this message
Christian Weiske (cweiske) wrote :

I see this on Ubuntu 20.04.4 LTS with geoclue-2.0/focal,now 2.5.6-0ubuntu1:

$ loginctl session-status c4
c4 - spiele (1002)
           Since: Tue 2022-08-02 19:58:47 CEST; 11h ago
          Leader: 3710
            Seat: seat0; vc7
         Display: :0
         Service: lightdm; type x11; class user
         Desktop: mate
           State: closing
            Unit: session-c4.scope
                  ├─4152 /usr/lib/x86_64-linux-gnu/indicator-application/indicator-application-service
                  ├─4180 /usr/libexec/geoclue-2.0/demos/agent
                  └─4194 /usr/bin/dbus-daemon --syslog --fork --print-pid 5 --print-address 7 --session

Revision history for this message
John Jendro (tacliat) wrote :

Also seeing this on Ubuntu 22.04

Revision history for this message
Tony Travis (ajtravis) wrote :

Confirmed in Ubuntu-MATE 22.04.3

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.