• 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: Let's play "Spot the Deadlock" ;-)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Let's play "Spot the Deadlock" ;-)


  • Subject: Re: Let's play "Spot the Deadlock" ;-)
  • From: Chuck Hill <email@hidden>
  • Date: Thu, 8 Oct 2009 11:26:02 -0700

I'd add Miguel/Paulo's code to your dispatchRequest method in Application. That would at least isolate whether this is a bug in your request handling, or a bug in a background thread. If it is a bug in request handling (component or DA etc), then it will show you which thread caused this. If you have decent logging, that should isolate the code at the rood of this. If it is a bug in a background thread, well you might want to consider goats. Though I think you could adapt this code to your threads as well.


Chuck


On Oct 8, 2009, at 8:52 AM, Kieran Kelleher wrote:


On Oct 7, 2009, at 7:46 PM, Chuck Hill wrote:

Ah geez, the Irish are at it again... :-P

I guess we must do whatever we have to to engage the Canadians in a conversation :-)



On Oct 7, 2009, at 1:06 PM, Kieran Kelleher wrote:

Here is an interesting deadlock I got today. I know some of you like to comment on deadlocks

You looking at me?

Yes, you, Anjo, Mike and all others who like WO challenges :-)




Thread t@81411: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Compiled frame; information may be imprecise)
- java.lang.Object.wait() @bci=2, line=474 (Compiled frame)
- com.webobjects.eoaccess.EODatabaseContext.lock() @bci=56, line=1973 (Compiled frame)

Obviously affected (blocked). I an wondering why it is doing this now:

And looking at that via jad makes me none the wiser either....

- com .webobjects .eocontrol .EOObjectStoreCoordinator .addCooperatingObjectStore (com.webobjects.eocontrol.EOCooperatingObjectStore) @bci=5, line=130 (Compiled frame)
- com .webobjects .eoaccess .EODatabaseChannel .setCurrentEditingContext (com.webobjects.eocontrol.EOEditingContext) @bci=34, line=166 (Compiled frame)
- com .webobjects .eoaccess .EODatabaseChannel ._selectWithFetchSpecificationEditingContext (com.webobjects.eocontrol.EOFetchSpecification, com.webobjects.eocontrol.EOEditingContext) @bci=158, line=788 (Compiled frame)
- com .webobjects .eoaccess .EODatabaseChannel .selectObjectsWithFetchSpecification (com.webobjects.eocontrol.EOFetchSpecification, com.webobjects.eocontrol.EOEditingContext) @bci=64, line=215 (Compiled frame)
- com .webobjects .eoaccess .EODatabaseContext ._objectsWithFetchSpecificationEditingContext (com.webobjects.eocontrol.EOFetchSpecification, com.webobjects.eocontrol.EOEditingContext) @bci=219, line=3205 (Compiled frame)
- com .webobjects .eoaccess .EODatabaseContext .objectsWithFetchSpecification (com.webobjects.eocontrol.EOFetchSpecification, com.webobjects.eocontrol.EOEditingContext) @bci=34, line=3346 (Compiled frame)
- com .webobjects .eocontrol .EOObjectStoreCoordinator .objectsWithFetchSpecification (com.webobjects.eocontrol.EOFetchSpecification, com.webobjects.eocontrol.EOEditingContext) @bci=97, line=539 (Compiled frame)
- com .webobjects .eocontrol .EOEditingContext .objectsWithFetchSpecification (com.webobjects.eocontrol.EOFetchSpecification, com.webobjects.eocontrol.EOEditingContext) @bci=79, line=4114 (Compiled frame)
- er .extensions .eof .ERXEC .objectsWithFetchSpecification (com.webobjects.eocontrol.EOFetchSpecification, com.webobjects.eocontrol.EOEditingContext) @bci=68, line=1189 (Compiled frame)
- com .webobjects .eocontrol .EOEditingContext .objectsWithFetchSpecification (com.webobjects.eocontrol.EOFetchSpecification) @bci=3, line=4500 (Compiled frame)
- wk.cheetah.eof.ProgramBehaviour $ Utilities .hasAllTemplatesApprovedAndValid(wk.cheetah.eof.CTProgram) @bci=5, line=130 (Compiled frame)
- wk.cheetah.eof.ProgramBehaviour $Utilities.doesRequireAttention(wk.cheetah.eof.CTProgram) @bci=15, line=120 (Compiled frame)
- wk .cheetah.eof.JobsiteRadiusProgramBehaviour.doesRequireAttention() @bci=4, line=148 (Compiled frame)
- wk.cheetah.eof.CTProgram.doesRequireAttention() @bci=4, line=425 (Compiled frame)
- sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=6, line=25 (Compiled frame)
- java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) @bci=111, line=585 (Compiled frame)
- com.webobjects.foundation.NSKeyValueCoding$ValueAccessor $1.methodValue(java.lang.Object, java.lang.reflect.Method) @bci=3, line=684 (Compiled frame)
- com.webobjects.foundation.NSKeyValueCoding $_MethodBinding.valueInObject(java.lang.Object) @bci=9, line=1160 (Compiled frame)
- com .webobjects.eocontrol.EOCustomObject.valueForKey(java.lang.String) @bci=14, line=1559 (Compiled frame)
- com.webobjects.foundation.NSKeyValueCoding $Utility.valueForKey(java.lang.Object, java.lang.String) @bci=26, line=498 (Compiled frame)
- com.webobjects.foundation.NSKeyValueCodingAdditions $DefaultImplementation.valueForKeyPath(java.lang.Object, java.lang.String) @bci=19, line=212 (Compiled frame)
- com .webobjects .eocontrol.EOCustomObject.valueForKeyPath(java.lang.String) @bci=2, line=1675 (Compiled frame)
- com.webobjects.foundation.NSKeyValueCodingAdditions $Utility.valueForKeyPath(java.lang.Object, java.lang.String) @bci=26, line=149 (Compiled frame)
- com .webobjects .eocontrol .EOKeyValueQualifier.evaluateWithObject(java.lang.Object) @bci=5, line=131 (Compiled frame)
- com .webobjects .eocontrol .EOQualifier .filteredArrayWithQualifier(com.webobjects.foundation.NSArray, com.webobjects.eocontrol.EOQualifier) @bci=55, line=635 (Compiled frame)
- wk.cheetah.eof.CTLocation.requiresAttentionPrograms() @bci=22, line=376 (Compiled frame)
- sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=6, line=25 (Compiled frame)
- java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) @bci=111, line=585 (Compiled frame)
- com.webobjects.foundation.NSKeyValueCoding$ValueAccessor $1.methodValue(java.lang.Object, java.lang.reflect.Method) @bci=3, line=684 (Compiled frame)
- com.webobjects.foundation.NSKeyValueCoding $_MethodBinding.valueInObject(java.lang.Object) @bci=9, line=1160 (Compiled frame)
- com .webobjects.eocontrol.EOCustomObject.valueForKey(java.lang.String) @bci=14, line=1559 (Compiled frame)
- com.webobjects.foundation.NSKeyValueCoding $Utility.valueForKey(java.lang.Object, java.lang.String) @bci=26, line=498 (Compiled frame)
- com.webobjects.foundation.NSKeyValueCodingAdditions $DefaultImplementation.valueForKeyPath(java.lang.Object, java.lang.String) @bci=32, line=216 (Compiled frame)
- com .webobjects .eocontrol.EOCustomObject.valueForKeyPath(java.lang.String) @bci=2, line=1675 (Compiled frame)
- com.webobjects.foundation.NSKeyValueCodingAdditions $Utility.valueForKeyPath(java.lang.Object, java.lang.String) @bci=26, line=149 (Compiled frame)
- com.webobjects.foundation.NSArray $_Operator._operationValue(java.lang.Object, java.lang.String) @bci=17, line=79 (Compiled frame)
- com.webobjects.foundation.NSArray $_SumNumberOperator.compute(com.webobjects.foundation.NSArray, java.lang.String) @bci=3, line=46 (Compiled frame)
- com .webobjects .foundation.NSArray._valueForKeyPathWithOperator(java.lang.String) @bci=71, line=744 (Compiled frame)
- com .webobjects.foundation.NSArray.valueForKeyPath(java.lang.String) @bci=16, line=778 (Compiled frame)
- com.webobjects.foundation.NSKeyValueCodingAdditions $Utility.valueForKeyPath(java.lang.Object, java.lang.String) @bci=26, line=149 (Compiled frame)
- com.webobjects.foundation.NSKeyValueCodingAdditions $DefaultImplementation.valueForKeyPath(java.lang.Object, java.lang.String) @bci=52, line=217 (Compiled frame)
- com .webobjects .eocontrol.EOCustomObject.valueForKeyPath(java.lang.String) @bci=2, line=1675 (Compiled frame)
- com.webobjects.foundation.NSKeyValueCodingAdditions $Utility.valueForKeyPath(java.lang.Object, java.lang.String) @bci=26, line=149 (Compiled frame)
- com.webobjects.foundation.NSKeyValueCodingAdditions $DefaultImplementation.valueForKeyPath(java.lang.Object, java.lang.String) @bci=52, line=217 (Compiled frame)
- com .webobjects .appserver.WOComponent.valueForKeyPath(java.lang.String) @bci=2, line=1600 (Compiled frame)
- com .webobjects .appserver.WOComponent.valueForBinding(java.lang.String) @bci=22, line=735 (Compiled frame)
- sun.reflect.GeneratedMethodAccessor261.invoke(java.lang.Object, java.lang.Object[]) @bci=36 (Compiled frame)
- sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=6, line=25 (Compiled frame)
- java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) @bci=111, line=585 (Compiled frame)
- com.webobjects.foundation.NSKeyValueCoding$ValueAccessor $1.methodValue(java.lang.Object, java.lang.reflect.Method) @bci=3, line=684 (Compiled frame)
- com.webobjects.foundation.NSKeyValueCoding $_MethodBinding.valueInObject(java.lang.Object) @bci=9, line=1160 (Compiled frame)
- com.webobjects.foundation.NSKeyValueCoding $DefaultImplementation.valueForKey(java.lang.Object, java.lang.String) @bci=34, line=1268 (Compiled frame)
- com.webobjects.appserver.WOComponent.valueForKey(java.lang.String) @bci=2, line=1539 (Compiled frame)
- com.webobjects.foundation.NSKeyValueCoding $Utility.valueForKey(java.lang.Object, java.lang.String) @bci=26, line=498 (Compiled frame)
- com.webobjects.foundation.NSKeyValueCodingAdditions $DefaultImplementation.valueForKeyPath(java.lang.Object, java.lang.String) @bci=19, line=212 (Compiled frame)
- com .webobjects .appserver.WOComponent.valueForKeyPath(java.lang.String) @bci=2, line=1600 (Compiled frame)
- com .webobjects .appserver ._private .WOHTMLDynamicElement ._appendAttributesFromAssociationsToResponse (com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext, com.webobjects.foundation.NSDictionary) @bci=60, line=317 (Compiled frame)
- com .webobjects .appserver ._private .WOGenericElement .appendAttributesToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=161, line=158 (Compiled frame)
- com .webobjects .appserver ._private .WOGenericElement .appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=60, line=181 (Compiled frame)
- com .webobjects .appserver ._private .WOGenericContainer .appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=3, line=29 (Compiled frame)
- com .webobjects .appserver .WOComponent.appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=56, line=992 (Compiled frame)
- er .extensions .components .ERXComponent .appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=26, line=107 (Compiled frame)
- wk .webobjects .appserver .WKAbstractComponent .appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=30, line=457 (Compiled frame)
- com .webobjects .appserver ._private .WOComponentReference .appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=11, line=111 (Compiled frame)
- com .webobjects .appserver ._private .WODynamicGroup .appendChildrenToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=46, line=121 (Compiled frame)
- er .extensions .components ._private .ERXWORepetition .appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=90, line=508 (Compiled frame)
- com .webobjects .appserver ._private .WODynamicGroup .appendChildrenToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=46, line=121 (Compiled frame)
- com .webobjects .appserver ._private .WODynamicGroup .appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=3, line=130 (Compiled frame)
- com .webobjects .appserver ._private .WOComponentContent .appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=36, line=43 (Compiled frame)
- com .webobjects .appserver ._private .WODynamicGroup .appendChildrenToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=46, line=121 (Compiled frame)
- com .webobjects .appserver ._private .WOGenericContainer .appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=15, line=32 (Compiled frame)
- com .webobjects .appserver ._private .WODynamicGroup .appendChildrenToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=46, line=121 (Compiled frame)
- com .webobjects .appserver ._private .WODynamicGroup .appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=3, line=130 (Compiled frame)
- com .webobjects .appserver .WOComponent.appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=56, line=992 (Compiled frame)
- er .extensions .components .ERXComponent .appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=26, line=107 (Compiled frame)
- wk .webobjects .appserver .WKAbstractComponent .appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=30, line=457 (Compiled frame)
- wk .cheetah .wocomponents .PageWrapper.appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=505, line=247 (Interpreted frame)
- com .webobjects .appserver ._private .WOComponentReference .appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=11, line=111 (Compiled frame)
- com .webobjects .appserver ._private .WODynamicGroup .appendChildrenToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=46, line=121 (Compiled frame)
- com .webobjects .appserver ._private .WODynamicGroup .appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=3, line=130 (Compiled frame)
- com .webobjects .appserver .WOComponent.appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=56, line=992 (Compiled frame)
- er .extensions .components .ERXComponent .appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=26, line=107 (Compiled frame)
- wk .webobjects .appserver .WKAbstractComponent .appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=30, line=457 (Compiled frame)
- wk .cheetah .wocomponents .Customers.appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=7, line=349 (Interpreted frame)
- com .webobjects .appserver .WOSession.appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=30, line=1200 (Interpreted frame)
- er .extensions .appserver .ERXSession.appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=11, line=540 (Interpreted frame)
- wk .webobjects .appserver .WKSession.appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=33, line=176 (Interpreted frame)
- wk .cheetah .Session.appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=205, line=657 (Interpreted frame)
- com .webobjects .appserver .WOApplication .appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=100, line=1418 (Interpreted frame)
- er .extensions .appserver .ERXApplication .appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext) @bci=3, line=1789 (Interpreted frame)
- com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedPage(com.webobjects.appserver.WOComponent, com.webobjects.appserver.WOSession, com.webobjects.appserver.WOContext, com.webobjects.foundation.NSDictionary) @bci=218, line=230 (Interpreted frame)
- com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedSession(com.webobjects.appserver.WOSession, com.webobjects.appserver.WOContext, com.webobjects.foundation.NSDictionary) @bci=186, line=287 (Interpreted frame)
- com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedApplication (com.webobjects.appserver.WOApplication, com.webobjects.appserver.WOContext, com.webobjects.foundation.NSDictionary) @bci=84, line=322 (Interpreted frame)
- com .webobjects .appserver ._private .WOComponentRequestHandler ._handleRequest(com.webobjects.appserver.WORequest) @bci=109, line=358 (Interpreted frame)
- com .webobjects .appserver ._private .WOComponentRequestHandler .handleRequest(com.webobjects.appserver.WORequest) @bci=23, line=432 (Interpreted frame)
- com .webobjects .appserver .WOApplication.dispatchRequest(com.webobjects.appserver.WORequest) @bci=41, line=1306 (Compiled frame)
- er .extensions .appserver .ERXApplication .dispatchRequestImmediately(com.webobjects.appserver.WORequest) @bci=74, line=1887 (Compiled frame)
- er .extensions .appserver .ERXApplication .dispatchRequest(com.webobjects.appserver.WORequest) @bci=13, line=1852 (Compiled frame)
- com.webobjects.appserver._private.WOWorkerThread.runOnce() @bci=729, line=173 (Compiled frame)
- com.webobjects.appserver._private.WOWorkerThread.run() @bci=129, line=254 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=613 (Interpreted frame)




Thread t@85507: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Compiled frame; information may be imprecise)
- java.lang.Object.wait() @bci=2, line=474 (Compiled frame)
- com.webobjects.eocontrol.EOObjectStoreCoordinator.lock() @bci=4, line=466 (Compiled frame)
- com.webobjects.eocontrol.EOEditingContext.lockObjectStore() @bci=41, line=4735 (Compiled frame)
- er.extensions.eof.ERXEC.lockObjectStore() @bci=7, line=668 (Compiled frame)
- com.webobjects.eocontrol.EOEditingContext._dispose(boolean) @bci=181, line=1110 (Compiled frame)
- com.webobjects.eocontrol.EOEditingContext.finalize() @bci=9, line=1178 (Interpreted frame)
- er.extensions.eof.ERXEC.finalize() @bci=62, line=653 (Interpreted frame)
- java.lang.ref.Finalizer.runFinalizer() @bci=45, line=83 (Compiled frame)
- java.lang.ref.Finalizer.access$100(java.lang.ref.Finalizer) @bci=1, line=14 (Compiled frame)
- java.lang.ref.Finalizer$FinalizerThread.run() @bci=11, line=160 (Interpreted frame)

Also affected, but seems normal otherwise.


Thread t@85763: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Compiled frame; information may be imprecise)
- java.lang.Object.wait() @bci=2, line=474 (Compiled frame)

Is part of this missing?

No, that is the unaltered jstack output.



So you have two threads both waiting on an OSC lock and no threads with an apparent OSC lock. That suggests that some other thread has locked the OSC, failed to unlock it, and gone off to do other things. Turn off your machine. Sell all of your possessions. Buy goats. Move to Nieue.

LOL :-)


Barring that... it is possible that Anjo's changes are somehow involved, but I'd want more proof before I started suggesting that. More likely you are missing a try...finally block. Can you reproduce this in Eclipse? If so, you can stop it in the debugger and drill into the OSC to see what is holding the lock. Often that is enough information to isolate the offending code. If not, there is always goats on Nieue.


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: 
 >Let's play "Spot the Deadlock" ;-) (From: Kieran Kelleher <email@hidden>)
 >Re: Let's play "Spot the Deadlock" ;-) (From: Chuck Hill <email@hidden>)
 >Re: Let's play "Spot the Deadlock" ;-) (From: Kieran Kelleher <email@hidden>)

  • Prev by Date: Re: Let's play "Spot the Deadlock" ;-)
  • Next by Date: Re: Let's play "Spot the Deadlock" ;-)
  • Previous by thread: Re: Let's play "Spot the Deadlock" ;-)
  • Next by thread: Re: Let's play "Spot the Deadlock" ;-)
  • Index(es):
    • Date
    • Thread