Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#22862 - [gnome-keyring] PAM configuration breaks DBus

Attached to Project: Arch Linux
Opened by orbisvicis (orbisvicis) - Saturday, 12 February 2011, 01:03 GMT
Last edited by Ionut Biru (wonder) - Wednesday, 19 October 2011, 14:22 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Ionut Biru (wonder)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
If PAM is configured to start gnome-keyring-daemon as documented:
etc/pam.d/login:
auth optional pam_gnome_keyring.so
session optional pam_gnome_keyring.so auto_start
${HOME}/.xinitrc:
eval "$(dbus-launch --sh-syntax --exit-with-session)"
eval "$(gnome-keyring-daemon --start)"
export GNOME_KEYRING_CONTROL
export SSH_AUTH_SOCK
export GPG_AGENT_INFO
export GNOME_KEYRING_PID

Then after starting X, all is good and the process tree looks like this
(root) init -> (dbus) dbus-daemon --system
(root) init -> (me) dbus-daemon --fork --print-pid 5 --print-address 7 --session
(root) init -> (me) dbus-launch --sh-syntax --exit-with-session
(root) init -> (me) gnome-keyring-daemon --daemonize --login

But if I reload the window manager (end X, restart X) without logging out (ending the login process), the process tree now looks like this
(root) init -> (dbus) dbus-daemon --system
(root) init -> (me) dbus-daemon --fork --print-pid 5 --print-address 7 --session -> dbus-daemon --fork --print-pid 5 --print-address 7 --session -> gnome-keyring-daemon --start --foreground --components=secrets
(root) init -> (me) dbus-launch --sh-syntax --exit-with-session
(root) init -> (me) gnome-keyring-daemon --daemonize --login

And again:
(root) init -> (dbus) dbus-daemon --system
(root) init -> (me) dbus-daemon --fork --print-pid 5 --print-address 7 --session -> dbus-daemon --fork --print-pid 5 --print-address 7 --session -> gnome-keyring-daemon --start --foreground --components=secrets
(root) init -> (me) dbus-launch --sh-syntax --exit-with-session
(root) init -> (me) gnome-keyring-daemon --daemonize --login
(root) init -> (me) gnome-keyring-daemon --start --foreground --components=secrets

Ad infinitum...

Result:
So DBus is basically broken.

Theory:
When I launch nm-applet, it can't find the session bus and launches a new dbus-daemon. Then the new dbus-daemon auto-launches gnome-keyring daemon via:
usr/share/dbus-1/services/org.gnome.keyring.service
/usr/share/dbus-1/services/org.freedesktop.secrets.service
But no applications can connect to these services because the dbus session is inaccessible.

So why does DBus break in the first place?

Fix:
No idea. Please help.

Additional info:
* package version(s)
extra/gnome-keyring 2.32.1-1
extra/dbus 1.4.1-1
This task depends upon

Closed by  Ionut Biru (wonder)
Wednesday, 19 October 2011, 14:22 GMT
Reason for closing:  No response
Comment by Ionut Biru (wonder) - Sunday, 13 February 2011, 20:02 GMT
the bugtracker is not a forum to spot bugs in your setup. it happens that because you don't check to see if an session already exists and you spawn dbus-launch processes at every session
Comment by orbisvicis (orbisvicis) - Sunday, 13 February 2011, 22:25 GMT
I just don't use the forums very often, should I move this there?

Also I actually run:
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ];then
eval "$(dbus-launch --sh-syntax --exit-with-session)"
fi
in ~/.xinitrc, I should have written it all out instead of trying to save space.
Comment by orbisvicis (orbisvicis) - Monday, 14 February 2011, 04:39 GMT
Also I believe my configuration exposes a bug in gnome-keyring-daemon
Comment by Ionut Biru (wonder) - Monday, 03 October 2011, 19:45 GMT
still valid with 3.2.0?

Loading...