GNOME Bugzilla – Bug 134666
bonobo-activation-server blocks unmounting $HOME
Last modified: 2004-12-22 21:47:04 UTC
The bonobo-activation-server process remains running for some time after a user logs out. Because bonobo-activation-server runs with $HOME as its CWD, its existence will block the unmounting of $HOME. This presents a major problem with automatically mounted/unmounted home directories. Gconfd-2 had a similar problem. Gnome-session now runs gconftool-2 --shutdown to fix this when a user logs out (see bug #97361). A similar technique could be used with bonobo-activation-server or I think bonobo-activation-server could simply change its CWD to be outside $HOME.
This is not a b-a-s bug in fact - b-a-s just waits for all it's clients to cleanup / die and then will quit itself very shortly afterwards (1-2 secs or so). So ... some other application is lying around that is using b-a-s, we should get that fixed; what does a ps auwx say ? or failing that: $ bonobo-activation-run-query "_active" should tell us what they are :-) could be the evo. alarm daemon I guess.
oh and; the reason it is like this - is otherwise debugging stuff is virtually impossible since all child/b-a-s processes try to core-dump to '/' and fail horribly :-) so it does make sense: honest.
The 1-2 second delay is exactly the type of problem I am running up against (see bug #97361). Since the log out process may take less than 1-2 seconds, unmounting $HOME on logout will fail. As discussed with the gconfd-2 folks, the 1-2 second delay is a good idea as long as a user is logged in. However, bonobo-activation-server should exit immediately when a user logs out. If there was a "safe" way to kill bonobo-activation-server then gnome-session could perform it when a user logs out. For example, gnome-session now executes "gconftool --shutdown."
Ok; Well - the reason gconfd-2 can be killed safely, is that it can restore it's connections if it is recovered; b-a-s on the other hand cannot. The timeout to quit from last client connection death is currently hard-coded as 1 second; if this really bothers you it should be possible without much difficult to make this tweakable via the b-a-s configuration file: see activation-server/object-directory-load-config.c and SERVER_IDLE_QUIT_TIMEOUT. Failing that we should make it so it stores/re-hydrates client connection state - but this is somewhat more difficult unfortunately.
Messing with the timeout would not remove the potential for race conditions. Here are some ideas (they may be a bit ignorant but I hope they might start a discussion): 1. b-a-s could chdir to / on a signal and gnome-session could provide that signal when a user logs out. 2. b-a-s could handle segfaults with bug-buddy like many GNOME applications. This way, b-a-s could set its CWD to / and debugging information could be acquired. However, b-a-s does not currently seem to use X directly and this requirement may be too much. 3. At first I thought that perhaps there might be a POSIX function that changes where a coredump is placed. This does not seem to be the case. The Linux kernel's fs/exec.c contains a variable named core_pattern that may be set using sysctl. I don't think this is portable, though. Perhaps someone else knows of something?
This is happening to me with libbonobo-2.6.0. The bonobo-activation-run-query "_active" command gives me: number of results: 2 OAFIID:Bonobo_CosNaming_NamingContext OAFIID:Bonobo_Activation_EventSource I do use evolution very regulary, and evolution-wombat is a problem as well, but I can reproduce the problem of b-a-s not going away without running anything other than logging into my gnome desktop.
I am using libbonobo-2.6.0 and the bonobo-activation-server process still keeps $HOME open as its PWD for several seconds after a user logs out.
in my case it's significantly longer than several seconds. I've logged out, walked away for 15 minutes or more, come back and it's still running.
To me it does not matter if bonobo-activation-server continues to run for several minutes or just a milisecond after a user logs out. As noted in the original bug report, bonobo-activation-server's hold on $HOME renders consistently unmounting $HOME immediately on logging out impossible.
As per Michael request, I added a chdir ("/") in b-a-s, right before the main loop. Core dumps will consequently fail. If the environment variable BONOBO_ACTIVATION_DEBUG is set, though, the chdir will not be done and core dumping will work. So, this issue should be fixed in the next release, 2.6.3 (or CVS). If not, feel free to reopen the bug.