Session dbus-daemons not killed after logout
Jan Houtsma
list at houtsma.net
Thu Feb 1 23:52:49 PST 2007
John (J5) Palmieri wrote:
> On Thu, 2007-02-01 at 17:34 +0100, Jan Houtsma wrote:
>
>> Havoc Pennington wrote:
>>
>>> Jan Houtsma wrote:
>>>
>>>> From what i can tell in fedora it's launched from xinitrc(-common)
>>>> as follows:
>>>>
>>>> [ -x /usr/bin/dbus-launch -a -z "$DBUS_SESSION_BUS_ADDRESS" ] &&
>>>> DBUS_LAUNCH="/usr/bin/dbus-launch --exit-with-session"
>>>>
>>>>
>>> Are you sure the session bus is the one that's leaked?
>>>
>>> http://lists.freedesktop.org/archives/dbus/2006-December/006662.html
>>>
>>> In some "su" type situations, a new bus can be started automatically.
>>> These situations are more likely to cause bus leaks. You might see if
>>> just logging in as a user and logging out leaks a daemon, or if you
>>> have to do something more.
>>>
>>>
>> I see the following (remotely logged in from another terminal):
>>
>> All clear. No processes. Before the Gnome login:
>> --------------------------------------------------
>>
>> root:/etc/X11/xinit> ps -ef|grep dbus
>> dbus 2243 1 0 Jan19 ? 00:00:02 dbus-daemon --system
>> root 24040 24021 0 17:21 pts/1 00:00:00 grep dbus
>>
>> Now login as via the Fedora Gnome Graphical interface as user 'jan' and
>> immideliatelly logging out again back to the Gnome login screen:
>> -----------------------------------------------------------------------------------------------------------------------------------------
>>
>> root:/etc/X11/xinit> ps -ef|grep dbus
>> dbus 2243 1 0 Jan19 ? 00:00:02 dbus-daemon --system
>> jan 24134 1 0 17:23 ? 00:00:00 /bin/dbus-daemon --fork
>> --print-pid 4 --print-address 6 --session
>>
>> root:/etc/X11/xinit> ps -ef|grep jan
>> jan 24134 1 0 17:23 ? 00:00:00 /bin/dbus-daemon --fork
>> --print-pid 4 --print-address 6 --session
>> jan 24179 1 0 17:23 ? 00:00:00
>> /usr/libexec/gnome-vfs-daemon
>>
>
> I have had other people report this but I can not reproduce it other
> than trying to run an app that uses gnome-vfs within a shell which does
> not have the DBUS_SESSION_BUS_ADDRESS set. It is interesting that you
> have no associated dbus-launch. Can you do me a favor and do the same
> operations as before but this time before you log out do a ps -ef|grep
> dbus so I can compare the pids.
>
>
Here you go. Now woth another user (ramon). B.t.w. the system is
completely up2date to the latest updates. I did 4 things here:
1. Before login to X: ps -ef|grep -E 'ramon|dbus'
2. During the login: ps -ef|grep -E 'ramon|dbus' followed by only ps
-ef|grep -E 'ramon|dbus'
3. After logout: ps -ef|grep -E 'ramon|dbus'
root:/etc/X11/xinit> rpm -qa|grep dbus
dbus-devel-1.0.1-9.fc6
dbus-glib-0.70-6.fc6
dbus-x11-1.0.1-9.fc6
dbus-glib-devel-0.70-6.fc6
dbus-1.0.1-9.fc6
dbus-sharp-0.63-6.fc6
dbus-python-0.70-6
# BEFORE LOGIN
root:/etc/X11/xinit> ps -ef|grep -E 'ramon|dbus'
dbus 2243 1 0 Jan19 ? 00:00:02 dbus-daemon --system
# DURING LOGIN
root:/etc/X11/xinit> ps -ef|grep -E 'ramon|dbus'
dbus 2243 1 0 Jan19 ? 00:00:02 dbus-daemon --system
ramon 27092 2681 0 08:28 ? 00:00:00 -/bin/zsh -c
/usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session
/etc/X11/xinit/Xclients
ramon 27136 27092 0 08:28 ? 00:00:00 /usr/bin/gnome-session
ramon 27137 27136 0 08:28 ? 00:00:00 /usr/bin/ssh-agent
/usr/bin/dbus-launch --exit-with-session /etc/X11/xinit/Xclients
ramon 27140 1 0 08:28 ? 00:00:00 /usr/bin/dbus-launch
--exit-with-session /etc/X11/xinit/Xclients
ramon 27141 1 0 08:28 ? 00:00:00 /bin/dbus-daemon --fork
--print-pid 4 --print-address 6 --session
ramon 27147 1 4 08:28 ? 00:00:00 /usr/libexec/gconfd-2 5
ramon 27150 1 0 08:28 ? 00:00:00
/usr/bin/gnome-keyring-daemon
ramon 27152 1 0 08:28 ? 00:00:00
/usr/libexec/gnome-settings-daemon
ramon 27164 27152 0 08:28 ? 00:00:00 [xrdb] <defunct>
ramon 27166 27152 0 08:28 ? 00:00:00 [xrdb] <defunct>
ramon 27171 1 0 08:28 ? 00:00:00 metacity
--sm-client-id=default1
ramon 27175 1 1 08:28 ? 00:00:00 gnome-panel
--sm-client-id default2
ramon 27177 1 4 08:28 ? 00:00:00 nautilus
--no-default-window --sm-client-id default3
ramon 27181 1 1 08:28 ? 00:00:00
/usr/libexec/bonobo-activation-server --ac-activate --ior-output-fd=16
ramon 27184 1 0 08:28 ? 00:00:00
/usr/libexec/gnome-vfs-daemon
ramon 27188 1 0 08:28 ? 00:00:00 eggcups --sm-client-id
default4
ramon 27190 1 0 08:28 ? 00:00:00 bluetooth-applet
ramon 27196 1 0 08:28 ? 00:00:00 gnome-volume-manager
--sm-client-id default5
ramon 27199 1 1 08:28 ? 00:00:00 /usr/bin/python -tt
/usr/bin/puplet
ramon 27206 1 0 08:28 ? 00:00:00 nm-applet --sm-disable
ramon 27212 1 0 08:28 ? 00:00:00
/usr/libexec/clock-applet
--oaf-activate-iid=OAFIID:GNOME_ClockApplet_Factory --oaf-ior-fd=19
ramon 27214 1 0 08:28 ? 00:00:00
/usr/libexec/notification-area-applet
--oaf-activate-iid=OAFIID:GNOME_NotificationAreaApplet_Factory
--oaf-ior-fd=22
ramon 27221 1 0 08:28 ? 00:00:00
/usr/libexec/mixer_applet2
--oaf-activate-iid=OAFIID:GNOME_MixerApplet_Factory --oaf-ior-fd=25
ramon 27223 1 0 08:28 ? 00:00:00
/usr/libexec/geyes_applet2
--oaf-activate-iid=OAFIID:GNOME_GeyesApplet_Factory --oaf-ior-fd=31
ramon 27227 1 0 08:28 ? 00:00:00 /usr/libexec/wnck-applet
--oaf-activate-iid=OAFIID:GNOME_Wncklet_Factory --oaf-ior-fd=36
ramon 27229 1 0 08:28 ? 00:00:00 /usr/libexec/trashapplet
--oaf-activate-iid=OAFIID:GNOME_Panel_TrashApplet_Factory --oaf-ior-fd=39
ramon 27232 1 0 08:28 ? 00:00:00 pam-panel-icon
--sm-client-id default0
ramon 27247 1 0 08:28 ? 00:00:00 /usr/libexec/mapping-daemon
root 27249 26550 0 08:28 pts/1 00:00:00 grep -E ramon|dbus
root:/etc/X11/xinit> ps -ef|grep -E 'dbus'
dbus 2243 1 0 Jan19 ? 00:00:02 dbus-daemon --system
ramon 27092 2681 0 08:28 ? 00:00:00 -/bin/zsh -c
/usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session
/etc/X11/xinit/Xclients
ramon 27137 27136 0 08:28 ? 00:00:00 /usr/bin/ssh-agent
/usr/bin/dbus-launch --exit-with-session /etc/X11/xinit/Xclients
ramon 27140 1 0 08:28 ? 00:00:00 /usr/bin/dbus-launch
--exit-with-session /etc/X11/xinit/Xclients
ramon 27141 1 0 08:28 ? 00:00:00 /bin/dbus-daemon --fork
--print-pid 4 --print-address 6 --session
root 27251 26550 0 08:28 pts/1 00:00:00 grep -E dbus
# AFTER LOGOUT
root:/etc/X11/xinit> ps -ef|grep -E 'ramon|dbus'
dbus 2243 1 0 Jan19 ? 00:00:02 dbus-daemon --system
ramon 27141 1 0 08:28 ? 00:00:00 /bin/dbus-daemon --fork
--print-pid 4 --print-address 6 --session
ramon 27184 1 0 08:28 ? 00:00:00
/usr/libexec/gnome-vfs-daemon
root 27308 26550 0 08:29 pts/1 00:00:00 grep -E ramon|dbus
I see two dbus-launch lines in the ps list during login. Has that
anything to do with this? I have no idea why two? Is the latter entry
the result of the one above it with the /bin/zsh in front of it? Is it
caused maybe by the fact the users default shell is /bin/zsh alltogether???
And i couldn't resist to try... And that seems to be related indeed!!!
Now with users default shell is /bin/bash (in /etc/passwd):
# BEFORE LOGIN
root:/etc/X11/xinit> ps -ef|grep -E 'ramon|dbus'
dbus 2243 1 0 Jan19 ? 00:00:02 dbus-daemon --system
root 27323 26550 0 08:44 pts/1 00:00:00 grep -E ramon|dbus
# DURING LOGIN
root:/etc/X11/xinit> ps -ef|grep -E 'ramon|dbus'
dbus 2243 1 0 Jan19 ? 00:00:02 dbus-daemon --system
ramon 27327 2681 1 08:45 ? 00:00:00 /usr/bin/gnome-session
ramon 27378 27327 0 08:45 ? 00:00:00 /usr/bin/ssh-agent
/usr/bin/dbus-launch --exit-with-session /etc/X11/xinit/Xclients
ramon 27381 1 0 08:45 ? 00:00:00 /bin/dbus-daemon --fork
--print-pid 4 --print-address 6 --session
ramon 27382 1 0 08:45 ? 00:00:00 /usr/bin/dbus-launch
--exit-with-session /etc/X11/xinit/Xclients
ramon 27388 1 5 08:45 ? 00:00:00 /usr/libexec/gconfd-2 5
ramon 27391 1 0 08:45 ? 00:00:00
/usr/bin/gnome-keyring-daemon
ramon 27393 1 1 08:45 ? 00:00:00
/usr/libexec/gnome-settings-daemon
ramon 27405 27393 0 08:45 ? 00:00:00 [xrdb] <defunct>
ramon 27407 27393 0 08:45 ? 00:00:00 [xrdb] <defunct>
ramon 27409 1 0 08:45 ? 00:00:00 metacity
--sm-client-id=default1
ramon 27416 1 1 08:45 ? 00:00:00 gnome-panel
--sm-client-id default2
ramon 27418 1 4 08:45 ? 00:00:00 nautilus
--no-default-window --sm-client-id default3
ramon 27422 1 0 08:45 ? 00:00:00
/usr/libexec/bonobo-activation-server --ac-activate --ior-output-fd=16
ramon 27425 1 0 08:45 ? 00:00:00 eggcups --sm-client-id
default4
ramon 27427 1 0 08:45 ? 00:00:00 bluetooth-applet
ramon 27431 1 1 08:45 ? 00:00:00 /usr/bin/python -tt
/usr/bin/puplet
ramon 27433 1 0 08:45 ? 00:00:00 nm-applet --sm-disable
ramon 27435 1 0 08:45 ? 00:00:00
/usr/libexec/gnome-vfs-daemon
ramon 27438 1 0 08:45 ? 00:00:00 gnome-volume-manager
--sm-client-id default5
ramon 27443 1 0 08:45 ? 00:00:00 pam-panel-icon
--sm-client-id default0
ramon 27476 1 0 08:45 ? 00:00:00
/usr/libexec/mixer_applet2
--oaf-activate-iid=OAFIID:GNOME_MixerApplet_Factory --oaf-ior-fd=25
ramon 27478 1 0 08:45 ? 00:00:00
/usr/libexec/notification-area-applet
--oaf-activate-iid=OAFIID:GNOME_NotificationAreaApplet_Factory
--oaf-ior-fd=31
ramon 27480 1 0 08:45 ? 00:00:00
/usr/libexec/geyes_applet2
--oaf-activate-iid=OAFIID:GNOME_GeyesApplet_Factory --oaf-ior-fd=34
ramon 27483 1 0 08:45 ? 00:00:00
/usr/libexec/clock-applet
--oaf-activate-iid=OAFIID:GNOME_ClockApplet_Factory --oaf-ior-fd=19
ramon 27488 1 0 08:45 ? 00:00:00 /usr/libexec/wnck-applet
--oaf-activate-iid=OAFIID:GNOME_Wncklet_Factory --oaf-ior-fd=24
ramon 27490 1 0 08:45 ? 00:00:00 /usr/libexec/trashapplet
--oaf-activate-iid=OAFIID:GNOME_Panel_TrashApplet_Factory --oaf-ior-fd=45
ramon 27499 1 0 08:45 ? 00:00:00 /usr/libexec/mapping-daemon
# AFTER LOGIN
root:/etc/X11/xinit> ps -ef|grep -E 'ramon|dbus'
dbus 2243 1 0 Jan19 ? 00:00:02 dbus-daemon --system
So it's /bin/zsh inside /etc/passwd which is causing this. Guess with
zsh the dbus process doesn't "see" the session or shell exiting or
something? On this (development) system zsh is the default for users.
Preferably wish to keep it that way. Anyway getting closer to the root
cause....
--
jan
More information about the dbus
mailing list