GNOME Bugzilla – Bug 139500
bonobo-activation-server exit after logout.
Last modified: 2004-12-22 21:47:04 UTC
1. Login 2. Do things with the desktop 3. Logout. Observe that the server is still running and never exits: gregm 27536 1 0 01:42 ? 00:00:00 /usr/libexec/bonobo-activation-server --ac-activate --ior-output-fd=11 Its _supposed_ to exit after all clients have disconnected (2 seconds is the hard coded value IIRC) A bonobo-activation-run-query "_active" reports: number of results: 2 OAFIID:Bonobo_Activation_EventSource OAFIID:Bonobo_CosNaming_NamingContext So its not exiting cause it has two clients which are itself? /usr/lib/bonobo/servers/Bonobo_CosNaming_NamingContext.server contains: <oaf_server iid="OAFIID:Bonobo_CosNaming_NamingContext" type="exe" location="/usr/libexec/bonobo-activation-server"> [snip] <oaf_server iid="OAFIID:Bonobo_Activation_EventSource" type="exe" location="/usr/libexec/bonobo-activation-server"> The only X related stuff running is GDM at this point. Also running the above bonobo-activation-run-query without the server running (kill it) will return no results but start the server, which never goes away. Leading to the 2 results on the active query.
That is indeed whacked out - can you repeat and do an: lsof -p <pid-of-b-a-s> That should show you what files it has open - particularly /tmp/orbit-$USER/linc-* are interesting. Then - we really need to see what other programs are using those sockets eg.: file /tmp/orbit-$USER/linc-a-b-c-d surely there must be something lying around using it ? perhaps: at-spi-daemon, or gnome-vfs-daemon ? or ...
I'm ssh'd into the box now so I'm _not_ logged into the desktop at all, gdm is running for any console logins though This is how I repeated it (streamlined and all) $ bonobo-slay The following processes are still running on the system. These processes will be terminated. NOTE: Killing these processes may affect other applications on the system that use bonobo. 801 /usr/libexec/bonobo-activation-server 801 /usr/libexec/bonobo-activation-server 801 /usr/libexec/bonobo-activation-server $ ps -ax | grep bonobo-activation-server | grep -v grep {no output... no activation server running} $ date Thu Apr 8 14:09:46 EDT 2004 $ bonobo-activation-run-query "_active" number of results: 2 OAFIID:Bonobo_Activation_EventSource OAFIID:Bonobo_CosNaming_NamingContext $ date Thu Apr 8 14:13:38 EDT 2004 {Should be dead by now eh?} $ ps -aux | grep bonobo-activation-server | grep -v grep gregm 856 0.0 0.2 7392 2856 ? S 03:39 0:00 /usr/libexec/bonobo-activation-server --ac-activate --ior-output-fd=11 {nope still chugging along} $ /usr/sbin/lsof -p 856 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME bonobo-ac 856 gregm cwd DIR 3,3 8192 4816966 /home/gregm bonobo-ac 856 gregm rtd DIR 3,3 4096 2 / bonobo-ac 856 gregm txt REG 3,3 102885 1376375 /usr/libexec/bonobo-activation-server bonobo-ac 856 gregm mem REG 3,3 90168 3653642 /lib/ld-2.3.2.so bonobo-ac 856 gregm mem REG 3,3 479247 344239 /usr/lib/libbonobo-2.so.0.0.0 bonobo-ac 856 gregm mem REG 3,3 112134 344271 /usr/lib/libbonobo-activation.so.4.0.0 bonobo-ac 856 gregm mem REG 3,3 69470 344781 /usr/lib/libORBitCosNaming-2.so.0.0.0 bonobo-ac 856 gregm mem REG 3,3 408489 344777 /usr/lib/libORBit-2.so.0.0.0 bonobo-ac 856 gregm mem REG 3,3 318208 9426489 /usr/lib/libgobject-2.0.so.0.400.0 bonobo-ac 856 gregm mem REG 3,3 20245 9426495 /usr/lib/libgthread-2.0.so.0.400.0 bonobo-ac 856 gregm mem REG 3,3 15024 9426472 /usr/lib/libgmodule-2.0.so.0.400.0 bonobo-ac 856 gregm mem REG 3,3 12842 3654151 /lib/libdl-2.3.2.so bonobo-ac 856 gregm mem REG 3,3 624212 9424828 /usr/lib/libglib-2.0.so.0.400.0 bonobo-ac 856 gregm mem REG 3,3 1108311 344761 /usr/lib/libxml2.so.2.6.8 bonobo-ac 856 gregm mem REG 3,3 88042 3424922 /lib/i686/libpthread-0.10.so bonobo-ac 856 gregm mem REG 3,3 60805 344162 /usr/lib/libz.so.1.1.4 bonobo-ac 856 gregm mem REG 3,3 171281 3424920 /lib/i686/libm-2.3.2.so bonobo-ac 856 gregm mem REG 3,3 33065 344103 /usr/lib/libpopt.so.0.0.0 bonobo-ac 856 gregm mem REG 3,3 30313968 459755 /usr/lib/locale/locale-archive bonobo-ac 856 gregm mem REG 3,3 21040 4653939 /usr/lib/gconv/gconv-modules.cache bonobo-ac 856 gregm mem REG 3,3 7016 4653242 /usr/lib/gconv/ISO8859-15.so bonobo-ac 856 gregm mem REG 3,3 1452984 3424918 /lib/i686/libc-2.3.2.so bonobo-ac 856 gregm 0u CHR 1,3 66978 /dev/null bonobo-ac 856 gregm 1u CHR 1,3 66978 /dev/null bonobo-ac 856 gregm 2u CHR 1,3 66978 /dev/null bonobo-ac 856 gregm 3r FIFO 0,7 174661 pipe bonobo-ac 856 gregm 4w FIFO 0,7 174661 pipe bonobo-ac 856 gregm 5r FIFO 0,7 174662 pipe bonobo-ac 856 gregm 6w FIFO 0,7 174662 pipe bonobo-ac 856 gregm 7r FIFO 0,7 174663 pipe bonobo-ac 856 gregm 8w FIFO 0,7 174663 pipe bonobo-ac 856 gregm 10r FIFO 0,7 174671 pipe bonobo-ac 856 gregm 12w FIFO 0,7 174671 pipe bonobo-ac 856 gregm 13r FIFO 0,7 174672 pipe bonobo-ac 856 gregm 14w FIFO 0,7 174672 pipe bonobo-ac 856 gregm 15r FIFO 0,7 174673 pipe bonobo-ac 856 gregm 16w FIFO 0,7 174673 pipe bonobo-ac 856 gregm 17u unix 0xd8596500 174675 /tmp/orbit-gregm/linc-358-0-2266ac08277bb bonobo-ac 856 gregm 19u unix 0xcc93d780 174674 socket so /tmp/orbit-gregm/linc-358-0-2266ac08277bb is what socket its listening on.. $ file /tmp/orbit-gregm/linc-358-0-2266ac08277bb /tmp/orbit-gregm/linc-358-0-2266ac08277bb: socket # /usr/sbin/lsof | grep "/tmp/orbit-gregm/linc-358-0-2266ac08277bb" bonobo-ac 856 gregm 17u unix 0xd8596500 174675 /tmp/orbit-gregm/linc-358-0-2266ac08277bb Nope... bonobo-activation-server is the only thing using that socket...
This may or may not be relevant but this is with kernel 2.6.4 SMP (HT) kernel --- Linux developer 2.6.4 #4 SMP Mon Apr 5 19:01:48 EDT 2004 i686 i686 i386 GNU/Linux --- All the related gnome stuff was compiled with gcc 3.2.3 while the kernel was compiled with gcc 3.3.2 (yeah I updated gcc for some c++ madness) And you know, now that I think about it somehow this has to be Elliot's fault. :)
Well, Fedora Core 2 test2 has this kernel so I guess if it's Elliot's fault he'll get spanked there :)
I see this bug on a Solaris box as well.
Arvind - sadly I'm off on holiday for a week. I recommend you re-build the bonobo-activation-server ( libbonobo/activation-server ) with debug enabled; see server.h. I suspect some silly leak somewhere in the client count - _most_ likely in the new code: the BonoboApplication hooks that Gustavo added recently.
is it possible that an active server is being registered multiple times; so that remove_active_server removes it several times, but only decrements the count once ? just a random thought.
Bumping priority and such to make it easier to find. I'm seeing this as well with new-ish 2.6 install.
I dunno if its really a major/high priority thing. More of an annoyance thing. It should go away at the session end (or shortly there after). If you have alot of different people using the same machine then it could get a bit more critical with lots of these left running... A temp (and icky) work-around is to do a bonobo-slay in the PostSession of the desktop manager (gdm here)
OAFIID:Bonobo_CosNaming_NamingContext and OAFIID:Bonobo_Activation_EventSource are being registered as part of b-a-s startup. But the value of RESIDUAL_SERVERS in object-directory-corba.c is 1. Hence the condition to get the quit_server_timeout() is not passing through. Incrementing RESIDUAL_SERVERS to 2 fixes the problem. Michael: Please let know if this anaylsis is okay (will fix it up in the HEAD) or I am missing something totally.
Created attachment 28027 [details] [review] Patch fixes the problem
Created attachment 28028 [details] [review] Incorporating Michael's suggestions given in irc
Fixed in HEAD and gnome 2-6 branches. 2004-05-26 Arvind Samptur <arvind.samptur@wipro.com> * activation-server/object-directroy.h : Add od_finished_internal_registration () helper function. * activation-server/object-directroy-corba.c (add_active_server): Don't add our internal servers count to n_active_servers. * activation-server/activation-server-main.c (main): Use od_finished_internal_registration () to indicate that we are done with our internal server registeration. Fixes bug #139500
Rock. Thanks, Arvind.
Available in libbonobo-2.6.1 up-loaded yesterday.
Can some one test me what are the side effect of this bug apart from the obvious leaks? Could this caused some incorrect behaviour on apps that uses b-a-s?
log out, change the hostname, log back in again - urgh ! There is some other problem that b-a-s quitting is hiding for us in this case - that also needs ruthlessly tracking down, but I havn't got to it yet.