Re: manually launched factory server?



Michael Meeks wrote:
One thing to do is to re-configure ORBit2 with --enable-debug=yes; [...]
and see what's happening between the two apps at that level.

I've got those traces, but am not sure what to make of them. See annotated client-trace and server-trace, attached below.

There's some sort of race condition in all this. Without debug traces, I could consistently produce the error provided that:

	- the server was launched first, manually

	- the client delayed for a few seconds between getting the
          interface and releasing it

Without that delay, the error did not appear. With debug traces, I can sometimes produce the error in the same manner, but just as often the client completes without error.

Something non-deterministic seems to be happening as both server and client race to be the first to shut down.
/* Client startup: bonobo_init(), bonobo_activate(), bonobo_get_object(). */

p32635 : ([0x80528a8])->addClient ([0x8053000], 'en_US.UTF-8,en_US,en.UTF-8,en,C')[ one way ] 
p32635 : ([0x80528a8])->activateMatching ('iid == 'OAFIID:Bonobo_Moniker_Oaf'', seq[0]={  }, seq[4]={ { 'DISPLAY', ':0.0', 0 }, { 'SESSION_MANAGER', 'local/localhost:/tmp/.ICE-unix/1067', 0 }, { 'LANG', 'en_US.UTF-8', 0 }, { 'LC_ALL', 'C', 0 } }, 0x0) context { ( username: 'liblit' ), ( hostname: 'localhost.localdomain' ) } =>: { 'OAFAID:[OAFIID:Bonobo_Moniker ... ,liblit,localhost.localdomain]', { d=1 v=seq[3]={ 'OAFIID:Bonobo_Moniker_Oaf', 'OAFIID:Bonobo_Moniker_std_Factory', '/usr/lib/bonobo/monikers/libmoniker_std_2.so' } } } 
p32635 : ([0x80528a8])->activateMatching ('iid == 'OAFIID:SamplerUploader:1.0'', seq[0]={  }, seq[4]={ { 'DISPLAY', ':0.0', 0 }, { 'SESSION_MANAGER', 'local/localhost:/tmp/.ICE-unix/1067', 0 }, { 'LANG', 'en_US.UTF-8', 0 }, { 'LC_ALL', 'C', 0 } }, 0x0) context { ( username: 'liblit' ), ( hostname: 'localhost.localdomain' ) } =>: { 'OAFAID:[OAFIID:SamplerUploade ... ,liblit,localhost.localdomain]', { d=0 v=[0x806a130] } } 
p32635 : ([0x806a130])->queryInterface ('IDL:Sampler/Uploader:1.0') =>: [0x806a130] 
p32635 : ([0x806a130])->unref () 

/* At this point the client has got its hands on the interface and we
 * sleep for two seconds.  The bug appears to involve some sort of
 * race condition, because without the delay, the error rarely or
 * never appears. */

/* The next unref() is the client calling
 * bonobo_object_release_unref(), which in turn results in an
 * error. */

p32635 : ([0x806a130])->unref ()[System exception comm failure] ) 

** (process:32635): WARNING **: Unknown CORBA exception id: 'IDL:omg.org/CORBA/COMM_FAILURE:1.0'

/* Server init via the BONOBO_ACTIVATION_FACTORY() macro. */

p32653 : ([0x8053330])->addClient ([0x8053450], 'en_US.UTF-8,en_US,en.UTF-8,en,C')[ one way ] 
p32653 : ([0x8053330])->_get_directories () =>: seq[1]={ [0x806a050] } 
p32653 : ([0x806a050])->register_new ('OAFIID:SamplerUploader_Factory:1.0', seq[0]={  }, [0x8052cb0]) =>: 0 

/* Serving client request for a factory-built object. */

p32653 : ([0x8052cb0])->createObject ('OAFIID:SamplerUploader:1.0') =>; [0x8072888] 
p32653 : ([0x8072888])->queryInterface ('IDL:Sampler/Uploader:1.0') =>; [0x8072888] 
p32653 : ([0x8072888])->unref () 

/* At this point we sit idle for a while; the client waits for two
 * seconds before releasing the interface we gave it. */

p32653 : ([0x8072888])->unref ()
p32653 : ([0x806a050])->unregister ('OAFIID:SamplerUploader_Factory:1.0', [0x8052cb0]) 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]