Re: Deadlocks
Re: Deadlocks
- Subject: Re: Deadlocks
- From: Chuck Hill <email@hidden>
- Date: Wed, 5 Sep 2007 16:48:30 -0700
On Sep 5, 2007, at 4:12 PM, Steven Mark McCraw wrote:
You are probably safe for general EC usage there, but you can
still do other bad things and end up deadlocked.
There are many great things in the "win" column for WebObjects, but
I believe one of the definite negatives of the technology is how
ridiculously easy it is to deadlock a webobjects application.
Is it easy? Or is that just the nature of the concurrency beast?
The only ways to cause deadlock that I can think of are (a) improper
exception handling related to releasing locks and (b) unbalanced lock
usage. I'd expect those to cause problems in any multi-threaded,
concurrent environment. There _were_ some issues in this area in
prior versions. AFAIK, these are fixed.
The one thing I can think of that WO could have added is some
try...catch or try...finally blocks in WOSession. These could, if
present, handle when the developer does not properly handle the
exceptions that happen in their code.
Can you think of anything else that could be done?
Chuck
You have to take the bad with the good. This is miserably scary
and nasty until you learn to dump the thread stack traces (see the
URL Guido posted earlier: http://tinyurl.com/3bpkkv. Learning the
tricks shown here cost me a week of sleep once, but now it's
beautifully documented, so profit from the work people have done to
write up these instructions). Once you have the stack traces in
hand, it becomes pretty obvious where the problem is and you can
fix it. Look for the thread which isn't stuck in a wait queue or
sleeping while waiting for requests.
Mark
--
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