After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 134666 - bonobo-activation-server blocks unmounting $HOME
bonobo-activation-server blocks unmounting $HOME
Status: RESOLVED FIXED
Product: bonobo
Classification: Deprecated
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Michael Meeks
Luis Villa
Depends on:
Blocks:
 
 
Reported: 2004-02-17 19:41 UTC by W. Michael Petullo
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.5/2.6



Description W. Michael Petullo 2004-02-17 19:41:36 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.
Comment 1 Michael Meeks 2004-02-18 10:28:46 UTC
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.

Comment 2 Michael Meeks 2004-02-18 10:29:35 UTC
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.
Comment 3 W. Michael Petullo 2004-02-18 15:19:24 UTC
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."
Comment 4 Michael Meeks 2004-02-19 10:48:06 UTC
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.
Comment 5 W. Michael Petullo 2004-03-06 17:57:15 UTC
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?
Comment 6 Andy Wang 2004-07-20 22:48:30 UTC
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.
Comment 7 W. Michael Petullo 2004-07-21 03:59:51 UTC
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.
Comment 8 Andy Wang 2004-07-21 15:25:25 UTC
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.
Comment 9 W. Michael Petullo 2004-07-21 15:40:26 UTC
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.
Comment 10 Gustavo Carneiro 2004-08-13 21:54:26 UTC
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.