Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.2-EE-GA_P01
-
Fix Version/s: 1.8.3, EE-1.8.2.GA_P04
-
Component/s: Framework
-
Labels:None
-
Environment:WebSphere 6.1
-
ICEsoft Forum Reference:
Description
Customer reports that a deadlock can occur during session invalidation on WebSphere 6.1
"Two threads used an instance of View class (on session invalitation), and one thread locked the HTTP session, the second thread locked the lifecycleLock field. They were waiting for each others monitors."
"Two threads used an instance of View class (on session invalitation), and one thread locked the HTTP session, the second thread locked the lifecycleLock field. They were waiting for each others monitors."
Issue Links
- is duplicated by
-
ICE-5535 Threads hunging when session gets destroyed
- Closed
Scheduling for next EE release. Customer has proposed a fix they would like us to validate for correctness and potential side-effects:
Index: src/com/icesoft/faces/context/View.java
===================================================================
— src/com/icesoft/faces/context/View.java (revision 21174)
+++ src/com/icesoft/faces/context/View.java (working copy)
@@ -53,6 +53,7 @@
import edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import edu.emory.mathcs.backport.java.util.concurrent.TimeUnit;
import javax.servlet.http.HttpSession;
import java.lang.reflect.Constructor;
@@ -247,12 +248,16 @@
public void dispose() {
try {
+ if (!lifecycleLock.isHeldByCurrentThread()) { + lifecycleLock.tryLock(30, TimeUnit.SECONDS); + }
dispose.run();
{ + // do nothing. }ContextEventRepeater.viewNumberDisposed(
facesContext.getExternalContext().getSession(false),
sessionID,
Integer.parseInt(viewIdentifier));
+ } catch (InterruptedException exception)
finally
{ releaseLifecycleLockUnconditionally(); }