Re: Unable to release locks when using MultiECLockManager
Re: Unable to release locks when using MultiECLockManager
- Subject: Re: Unable to release locks when using MultiECLockManager
- From: Chuck Hill <email@hidden>
- Date: Tue, 29 Apr 2008 17:21:24 -0700
On Apr 29, 2008, at 5:13 PM, Owen McKerrow wrote:
Hi All,
Trawling through my log files I have found a number of instances of
the following
2008,04.29 06:12:47,595 OFF [Finalizer] (Log.NSLogErr:1546
appendln) - Unable to release locks held by a deallocated
EOEditingContext. 2008,04.29 06:12:47,596 DEBUG [Finalizer]
(Log.NSLogDebug:1546 appendln) - java.lang.IllegalStateException:
Illegal Lock usage: unlocking thread not owner. at
com
.webobjects.foundation.NSRecursiveLock.unlock(NSRecursiveLock.java:
207) at
com
.webobjects.eocontrol.EOEditingContext.unlock(EOEditingContext.java:
4720) at
com
.webobjects
.eocontrol.EOEditingContext._dispose(EOEditingContext.java:1158) at
com
.webobjects
.eocontrol.EOEditingContext.finalize(EOEditingContext.java:1178) at
java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method) at
java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83) at
java.lang.ref.Finalizer.access$100(Finalizer.java:14) at
java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
Im using MultiECLockManager to handle all the locking and unlocking,
so Im wondering if anyone else has seen this kind of error and what
I can do to chase it up.
I think that would be a handing lock: some code locked the EC but did
not unlock it before discarding its reference to the EC. When the
finalizer runs, it wants to unlock the locked EC before disposing it.
But it can't as a different thread has it locked. I'd look for code
that can throw and exception and which does not have a finally block
to unlock the EC. Session.sleep() comes to mind.
Chuck
Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au
--
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