• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Need help with deadlock in app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need help with deadlock in app


  • Subject: Re: Need help with deadlock in app
  • From: Chuck Hill <email@hidden>
  • Date: Fri, 11 Jun 2010 13:09:00 -0700

Whee --  It is not often you see a for-real deadly embrace!

On Jun 11, 2010, at 11:04 AM, Lon Varscsak wrote:

I'm sure it's something I've done...I just don't know how to interpret
what I'm seeing here in the jstack output (see below).  Any help would
be greatly appreciated.

It looks a little strange, not sure what is going on. Which version of WO?



Here is the jstack stuff for just the deadlock (since the list
wouldn't allow the full file):

Found one Java-level deadlock:
=============================
"WorkerThread255":
 waiting for ownable synchronizer 0x00002aaab421aef0, (a
java.util.concurrent.locks.ReentrantLock$NonfairSync),
 which is held by "WorkerThread9"

You can ignore that one, just a side effect. The two below are where the problem really is:


"WorkerThread9":
 waiting for ownable synchronizer 0x00002aaac0ecc338, (a
java.util.concurrent.locks.ReentrantLock$NonfairSync),
 which is held by "Finalizer"
"Finalizer":
 waiting for ownable synchronizer 0x00002aaab421aef0, (a
java.util.concurrent.locks.ReentrantLock$NonfairSync),
 which is held by "WorkerThread9"

Java stack information for the threads listed above:
===================================================
"WorkerThread9":
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00002aaac0ecc338> (a
java.util.concurrent.locks.ReentrantLock$NonfairSync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
at java .util .concurrent .locks .AbstractQueuedSynchronizer .parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:773)
at java .util .concurrent .locks .AbstractQueuedSynchronizer .acquireQueued(AbstractQueuedSynchronizer.java:806)
at java .util .concurrent .locks .AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java: 1136)
at java.util.concurrent.locks.ReentrantLock $NonfairSync.lock(ReentrantLock.java:214)
at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java: 290)
at com.webobjects.eocontrol.EOEditingContext.lock(EOEditingContext.java: 4617)

	at er.extensions.eof.ERXEC.lock(ERXEC.java:505)
	at er.extensions.eof.ERXEC.autoLock(ERXEC.java:627)

It is an EOEditingContext (ERXEC) lock that we are waiting on.

at er.extensions.eof.ERXEC.globalIDForObject(ERXEC.java:844)
at com .webobjects .eoaccess .EODatabaseContext ._fireDeferredFaultWithSourceObject(EODatabaseContext.java:2370)
at com .webobjects .eoaccess .EOAccessDeferredFaultHandler .createFaultForDeferredFault(EOAccessDeferredFaultHandler.java:49)
at com .webobjects .eocontrol.EOCustomObject.willReadRelationship(EOCustomObject.java: 1279)

willReadRelationship locks the OSC. So WorkerThread9 has the OSC locked and it waiting on an EC lock.



at er .extensions .eof.ERXGenericRecord.willReadRelationship(ERXGenericRecord.java:400)
at com.webobjects.eocontrol.EOGenericRecord $_LazyDictionaryBinding.valueInObject(EOGenericRecord.java:280)
at er.extensions.eof.ERXGenericRecord $TouchingBinding.valueInObject(ERXGenericRecord.java:201)
at com .webobjects .eocontrol.EOCustomObject.storedValueForKey(EOCustomObject.java:1634)
at com .smarthealth .businesslogic .marketing ._PromotionMaster.promotionPresentationDetail(_PromotionMaster.java: 226)
at com .smarthealth .woapp .smartscrubs .components .AvailablePromotions.aPromotionCartMessage(AvailablePromotions.java: 29)



"Finalizer":
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00002aaab421aef0> (a
java.util.concurrent.locks.ReentrantLock$NonfairSync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
at java .util .concurrent .locks .AbstractQueuedSynchronizer .parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:773)
at java .util .concurrent .locks .AbstractQueuedSynchronizer .acquireQueued(AbstractQueuedSynchronizer.java:806)
at java .util .concurrent .locks .AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java: 1136)
at java.util.concurrent.locks.ReentrantLock $NonfairSync.lock(ReentrantLock.java:214)
at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java: 290)
at com .webobjects .eocontrol .EOObjectStoreCoordinator.lock(EOObjectStoreCoordinator.java:420)
at com .webobjects .eocontrol.EOEditingContext.lockObjectStore(EOEditingContext.java: 4666)
at er.extensions.eof.ERXEC.lockObjectStore(ERXEC.java:715)

It is an OSC lock that the finalizer is waiting on.


at com .webobjects .eocontrol .EOEditingContext .editingContextDidForgetObjectWithGlobalID(EOEditingContext.java:3881)
at er .extensions .eof.ERXEC.editingContextDidForgetObjectWithGlobalID(ERXEC.java:1159)

ERXEC.editingContextDidForgetObjectWithGlobalID would normally auto- lock the EC, but won't as the EC is being finalized.


at com .webobjects .eocontrol.EOEditingContext._forgetObject(EOEditingContext.java:1571)
at com .webobjects .eocontrol.EOEditingContext._dispose(EOEditingContext.java:1183)
at com .webobjects .eocontrol.EOEditingContext.finalize(EOEditingContext.java:1239)
at er.extensions.eof.ERXEC.finalize(ERXEC.java:701)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:101)
at java.lang.ref.Finalizer.access$100(Finalizer.java:32)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:178)


Found 1 deadlock.


My best guess is that you left an open lock on a child EC that is getting garbage collected.


Chuck


-- Chuck Hill Senior Consultant / VP Development

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


References: 
 >Need help with deadlock in app (From: Lon Varscsak <email@hidden>)

  • Prev by Date: Re: Need help with deadlock in app
  • Next by Date: No template found for component
  • Previous by thread: Re: Need help with deadlock in app
  • Next by thread: No template found for component
  • Index(es):
    • Date
    • Thread