Re: Waiting for Session Check-Out
Re: Waiting for Session Check-Out
- Subject: Re: Waiting for Session Check-Out
- From: Chuck Hill <email@hidden>
- Date: Mon, 1 Dec 2008 17:07:30 -0800
On Dec 1, 2008, at 5:01 PM, Mike Schrag wrote:
I guess that's only really possible through a slip-up in the top-
level exception handling... hmmm... thanks.
yeah
Or sleep()
yeah
or terminate() not calling super or throwing an exception
yeah
. Or two requests for a session coming very close together and the
first calling terminate() on the session (e.g. double clicking a
Logout link or Ajax fun).
Does this actually happen? I haven't heard this one before ... I
would have expected terminate to still hold the lock until the
request is done. Not true?
Yeah, this happens.
This bug happens when multiple requests for a session come in before
the first request completes (Ajax on the page can cause this) and the
first request calls terminate() on the session (e.g. from a log out
link or in response to an exception during request processing). The
session terminates properly, but the threads for the other queued
requests for the now terminated sessions are stuck. This prevents the
app from restarting under wotaskd control (other than force quitting
it). An example trace from one such stuck thread (highly mutilated,
not my fault):
"WorkerThread6" prio=5 tid=0x00650fc0 nid=0x1891600 in Object.wait()
[0xb1295000..0xb1295d10] at java.lang.Object.wait(Native Method) -
waiting on <0x0df6b5b0> (a com.webobjects.appserver.WOSessionStore
$TimeoutEntry) at java.lang.Object.wait(Object.java:474) at
com
.webobjects
.appserver.WOSessionStore.checkOutSessionWithID(WOSessionStore.java:
191) - locked <0x0df6b5b0> (a com.webobjects.appserver.WOSessionStore
$TimeoutEntry) at
com
.webobjects
.appserver.WOApplication.restoreSessionWithID(WOApplication.java:1913)
at
com
.webobjects
.appserver
._private
.WOComponentRequestHandler
._dispatchWithPreparedApplication(WOComponentRequestHandler.java:324)
at
com
.webobjects
.appserver
._private
.WOComponentRequestHandler
._handleRequest(WOComponentRequestHandler.java:369) at
com
.webobjects
.appserver
._private
.WOComponentRequestHandler
.handleRequest(WOComponentRequestHandler.java:445) at
er.ajax.AjaxRequestHandler.handleRequest(AjaxRequestHandler.java:17)
at
com
.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:
1687) at
net
.global_village
.woextensions.WOApplication.dispatchRequest(WOApplication.java:829) at
com
.webobjects
.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144) at
com
.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:
226) at java.lang.Thread.run(Thread.java:613)
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