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 139500 - bonobo-activation-server exit after logout.
bonobo-activation-server exit after logout.
Status: RESOLVED FIXED
Product: bonobo
Classification: Deprecated
Component: general
unspecified
Other Linux
: High major
: ---
Assigned To: Michael Meeks
Luis Villa
Depends on:
Blocks:
 
 
Reported: 2004-04-08 17:32 UTC by gregm
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.5/2.6


Attachments
Patch fixes the problem (3.15 KB, patch)
2004-05-26 11:04 UTC, Arvind S N
none Details | Review
Incorporating Michael's suggestions given in irc (3.94 KB, patch)
2004-05-26 11:27 UTC, Arvind S N
none Details | Review

Description gregm 2004-04-08 17:32:56 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.
Comment 1 Michael Meeks 2004-04-08 17:53:08 UTC
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 ...
Comment 2 gregm 2004-04-08 18:21:31 UTC
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...

Comment 3 gregm 2004-04-08 18:35:22 UTC
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. :)
Comment 4 Kjartan Maraas 2004-04-15 17:39:02 UTC
Well, Fedora Core 2 test2 has this kernel so I guess if it's Elliot's fault
he'll get spanked there :) 
Comment 5 Arvind S N 2004-05-18 12:49:16 UTC
I see this bug on a Solaris box as well.
Comment 6 Michael Meeks 2004-05-18 16:08:05 UTC
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.
Comment 7 Michael Meeks 2004-05-18 16:13:47 UTC
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.
Comment 8 Luis Villa 2004-05-18 21:00:33 UTC
Bumping priority and such to make it easier to find. I'm seeing this as well
with new-ish 2.6 install.
Comment 9 gregm 2004-05-18 21:23:17 UTC
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)
Comment 10 Arvind S N 2004-05-25 12:37:47 UTC
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.
Comment 11 Arvind S N 2004-05-26 11:04:38 UTC
Created attachment 28027 [details] [review]
Patch fixes the problem
Comment 12 Arvind S N 2004-05-26 11:27:59 UTC
Created attachment 28028 [details] [review]
Incorporating Michael's suggestions given in irc
Comment 13 Arvind S N 2004-05-26 12:10:55 UTC
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
Comment 14 Luis Villa 2004-05-26 22:19:16 UTC
Rock. Thanks, Arvind.
Comment 15 Michael Meeks 2004-05-27 09:37:40 UTC
Available in libbonobo-2.6.1 up-loaded yesterday.
Comment 16 Ghee Teo 2004-05-27 16:14:52 UTC
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?
Comment 17 Michael Meeks 2004-05-28 09:06:50 UTC
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.