• 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: Where is the deadlock culprit?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where is the deadlock culprit?


  • Subject: Re: Where is the deadlock culprit?
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 3 Dec 2008 11:55:38 -0800


On Dec 3, 2008, at 11:52 AM, Kieran Kelleher wrote:

The MultiEC lock/unlock on this app was implemented very many years ago before I began using Wonder. When I integrated Wonder into this app, I just used ERXEC like a regular EC and ..... it has run well like this for years! The MultiECLockManager lock is called in awake and unlock in sleep.

I found this in the app's Properties file from over 3 years ago....
# decides if locked editing contexts should be unlocked after the RR- loop.
# Note KK 9.21.2005 ( I set this to 'true')
# ( KK: Actually decides whether a list of _unlocked_ ec's is maintained
# in ERXThreadStorage which means that even separate threads can do a try/finally
# and unlock all locked ec's at the end of a thread without knowing whether
# the programmer unlocked ot not. This feature should be regarded as a
# safety net and not an automatic unlocker.
# Note ERXLongResponseTask depends on this feature! )
er.extensions.ERXApplication.useEditingContextUnlocker=true




So given that property is set to true, a missed unlock would get unlocked anyway, right?

I can confidently claim to be completely unsure. ;-) If the MultiECLockManager still had it locked, it may not be able to. I don't use ERXEC so I really don't know. Check your Sessions() sleep() and terminate() methods (and any super class you have) to ensure that they can't throw an exception.


Chuck



On Dec 3, 2008, at 2:28 PM, Chuck Hill wrote:


On Dec 3, 2008, at 11:12 AM, Anjo Krank wrote:


Am 03.12.2008 um 19:33 schrieb Kieran Kelleher:

- 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.EOEditingContext.lock() @bci=28, line=4685 (Compiled frame)
- er.extensions.eof.ERXEC.lock() @bci=353, line=480 (Compiled frame)
- wk.eofextensions.MultiECLockManager.lock() @bci=38, line=69 (Compiled frame)
- wk.webobjects.appserver.WKSession.awake() @bci=8, line=52 (Interpreted frame)

An EC hasn't been unlocked and you're not using auto-unlocking.


Worse! He is using MultiECLockManager AND ERXEC! That looks like a recipe for disaster to me. I'd guess some interaction between the two, or some uncaught exception is skipping the unlock of the default EC.

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










-- 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
  • Follow-Ups:
    • Re: Where is the deadlock culprit?
      • From: Kieran Kelleher <email@hidden>
References: 
 >Where is the deadlock culprit? (From: Kieran Kelleher <email@hidden>)
 >Re: Where is the deadlock culprit? (From: Anjo Krank <email@hidden>)
 >Re: Where is the deadlock culprit? (From: Chuck Hill <email@hidden>)
 >Re: Where is the deadlock culprit? (From: Kieran Kelleher <email@hidden>)

  • Prev by Date: Re: Where is the deadlock culprit?
  • Next by Date: Re: captcha ???
  • Previous by thread: Re: Where is the deadlock culprit?
  • Next by thread: Re: Where is the deadlock culprit?
  • Index(es):
    • Date
    • Thread