Re: EODatabaseContext locking situation
Re: EODatabaseContext locking situation
- Subject: Re: EODatabaseContext locking situation
- From: Chuck Hill <email@hidden>
- Date: Tue, 6 Nov 2007 14:00:15 -0800
Ouch! Can you tell us under what conditions this happens?
Chuck
On Nov 6, 2007, at 1:54 PM, Mr. Pierre Frisch wrote:
Hi Chuck,
This unfortunately is a real bug. It is quite rare but I had seen
it last year and finally managed to reproduce it consistently last
month. The fix is not in WO 5.4 but will be in the next minor update.
Pierre
--
Pierre Frisch
email@hidden
On Nov 6, 2007, at 9:50, Chuck Hill wrote:
On Nov 6, 2007, at 6:17 AM, Ken Anderson wrote:
Everyone,
I have a significantly multi-threaded app that's having a locking
problem with EODatabaseContext. One thread has successfully
locked an EC and attempted a query. In the stack trace of that
thread, after it has locked the EC, it goes to do a fetch, and
this is the top of the stack trace:
Object.wait(long) line: not available [native method]
NSRecursiveLock(Object).wait() line: 474
NSRecursiveLock.lock() line: 72
EODatabaseContext.lock() line: 1973
EOObjectStoreCoordinator.addCooperatingObjectStore
(EOCooperatingObjectStore) line: 130
EODatabaseChannel.setCurrentEditingContext(EOEditingContext) line:
166
It stays here forever. I've checked the few places I actually
lock the DB context, and they're properly protected, and no
thread is anywhere else in EOF but this one.
Any thoughts?? This is 5.3...
One of these must be true:
1. Your JVM is insane
2. You are not handling the explicitly DB context locks correctly
in at least one place and it left a lock hanging
3. One of the other threads _does_ have EOF locked
I have never been driven to this desperation but... You could add
a direct action that gets the DB context, used RTTI to rape out
the NSRecusiveLock and then use RTTI on that to log out which
thread has it locked. When the app deadlocks, hit that DA. With
the locking thread name in hand, look back in the app log and see
if you can see what happened.
Chuck
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve
specific problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com
This email sent to email@hidden
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden