[Evolution-hackers] Re: Evolution bug #52948



Hi Hans

On Tue, 2004-01-20 at 01:52, Hans Petter Jansson wrote:
> Michael: I need your help with a Bonobo-related bug that's really biting
> the addressbook.
> 
> http://bugzilla.ximian.com/show_bug.cgi?id=52948

	Sure; right.

> Basically, one thread in evolution-data-server is stuck waiting for a
> return value from another thread, but the latter is stuck in
> bonobo_object_dup_ref () on the object to be returned. The result is a
> 0% CPU deadlock, i.e. mutex of some sort.

	Ok - so here is the issue:

	In thread 2 you're invoking a method on a single-threaded / old-style
BonoboObject - which has not been instantiated with a thread-aware POA
policy [ THREAD_PER_REQUEST or somesuch ]. Thus in order to process
events on it [ eg. it's destruction sequence ] we proxy all CORBA
traffic (even ref/unref) in-process to the main thread.

	That's fine - however; as you do the ref/unref you are holding FooLock;
the main thread is trying to obtain FooLock - but isn't processing
incoming calls [ to handle the unref ] ie. deadlock.

	Now - it's good to have caught this, since these things can lurk around
not showing their ugly heads for a while. The only real solution is to
make the BonoboObject you're invoking those calls on thread-safe, and/or
instantiate it with something like the PROCESS_AT_IDLE poa policy.

	HTH,

		Michael.

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




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