Re: An interesting deadlock in ORBit2...



Hi Justin,

On Mon, 2003-12-08 at 07:14, Justin Schoeman wrote:
> Hmmm... I did not realise that I needed to start up a glib mainloop in 
> the CORBA client... Is CORBA_ORB_init() sufficient to start the main 
> loop?  If so, then this is not the problem, as CORBA_ORB_init() is 
> called before any threads are started.

	Nope; you need to do either a CORBA_ORB_run in 1 thread, or run a
g_main loop elsewhere.

> BTW - I ran into a race in that last unref in IO thread patch...  It is 
> rather difficult to trigger, but if the main thread adds another 
> reference to the connection after the shutdown has been dispatched, then 
> it will block indefinitely on g_cond_wait...

	Can you show me a stack trace for this; I just can't see how that could
happen. OTOH, I've added some extra locking to the main thread unref
case, since [ I suppose ] we're not certain it's the last unref anymore
by the time we do the g_object_unref in the worker thread, so we have to
check again :-)

	Regards,

		Michael.

-- 
 michael@ximian.com  <><, Pseudo Engineer, itinerant idiot




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