Sessions not expiring. [message #652799] |
Sun, 06 February 2011 17:26  |
Eclipse User |
|
|
|
I have an issue in a production app that I can't replicate in a test/dev environment.
I'm running RAP 1.3.0 on JBoss 5.1 with a Sun 1.6.0_22 64 bit jvm.
I've found several scenarios where the issue occurs.
One is related to bug 329302 where a thread deadlock occurs.
The other has no deadlock, but the UIThread's are sitting in Object.wait in the UIThread.switchThread, as they shoud be. The problem is the JBoss thread that invalidates expired threads is stuck waiting for one of the UIThreads to exit in the UIThread.terminateThread method as a result of the session being invalidated.
Here's a sample of the UIThreads, including the one blocking the JBoss thread
"UIThread [293B6357CF6F7EE74652AE935B44D4EB.prod]" daemon prio=10 tid=0x00002aaaf4837000 nid=0x64ac in Object.wait() [0x0000000050a5d000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00002aaacddb2ad0> (a org.eclipse.rwt.internal.lifecycle.UIThread)
at java.lang.Object.wait(Object.java:485)
at org.eclipse.rwt.internal.lifecycle.UIThread.switchThread(UIThread.java:60)
- locked <0x00002aaacddb2ad0> (a org.eclipse.rwt.internal.lifecycle.UIThread)
at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.sleep(RWTLifeCycle.java:297)
at org.eclipse.swt.widgets.Display.sleep(Display.java:1128)
at org.eclipse.ui.application.WorkbenchAdvisor.eventLoopIdle(WorkbenchAdvisor.java:361)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2391)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2351)
at org.eclipse.ui.internal.Workbench.access$5(Workbench.java:2206)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:424)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.jface.internal.databinding.realmadapter.RealmAdapter.run(RealmAdapter.java:44)
at org.eclipse.rap.ui.internal.RealmAdapterHook.runWithDefault(RealmAdapterHook.java:48)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:427)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:157)
at nz.bnz.sb.rap.EntryPoint.createUI(EntryPoint.java:92)
at org.eclipse.rwt.internal.lifecycle.EntryPointManager.createUI(EntryPointManager.java:92)
at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWTLifeCycle.java:244)
at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:113)
- locked <0x00002aaacddb2ad0> (a org.eclipse.rwt.internal.lifecycle.UIThread)
at java.lang.Thread.run(Thread.java:619)
at org.eclipse.rwt.internal.lifecycle.UIThread.run(UIThread.java:102)
"UIThread [30A8C37FCBC861501E2E72D910863AEC.prod]" daemon prio=10 tid=0x0000000048ea0000 nid=0x69e9 in Object.wait() [0x000000005186b000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00002aaace27f9a0> (a org.eclipse.rwt.internal.lifecycle.UIThread)
at java.lang.Object.wait(Object.java:485)
at org.eclipse.rwt.internal.lifecycle.UIThread.switchThread(UIThread.java:60)
- locked <0x00002aaace27f9a0> (a org.eclipse.rwt.internal.lifecycle.UIThread)
at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.sleep(RWTLifeCycle.java:297)
at org.eclipse.swt.widgets.Display.sleep(Display.java:1128)
at org.eclipse.ui.application.WorkbenchAdvisor.eventLoopIdle(WorkbenchAdvisor.java:361)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2391)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2351)
at org.eclipse.ui.internal.Workbench.access$5(Workbench.java:2206)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:424)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.jface.internal.databinding.realmadapter.RealmAdapter.run(RealmAdapter.java:44)
at org.eclipse.rap.ui.internal.RealmAdapterHook.runWithDefault(RealmAdapterHook.java:48)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:427)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:157)
at nz.bnz.sb.rap.EntryPoint.createUI(EntryPoint.java:92)
at org.eclipse.rwt.internal.lifecycle.EntryPointManager.createUI(EntryPointManager.java:92)
at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWTLifeCycle.java:244)
at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:113)
- locked <0x00002aaace27f9a0> (a org.eclipse.rwt.internal.lifecycle.UIThread)
at java.lang.Thread.run(Thread.java:619)
at org.eclipse.rwt.internal.lifecycle.UIThread.run(UIThread.java:102)
Every stack trace for the other UIThreads are identical, except for the obvious name, thread id, object id's etc
This is the JBoss thread that invalidates the expired sessions
"ContainerBackgroundProcessor[StandardEngine[jboss.web]]" daemon prio=10 tid=0x00000000480ab000 nid=0x19b3 in Object.wait() [0x000000004ae01000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00002aaacddb2ad0> (a org.eclipse.rwt.internal.lifecycle.UIThread)
at java.lang.Thread.join(Thread.java:1143)
- locked <0x00002aaacddb2ad0> (a org.eclipse.rwt.internal.lifecycle.UIThread)
at java.lang.Thread.join(Thread.java:1196)
at org.eclipse.rwt.internal.lifecycle.UIThread.terminateThread(UIThread.java:118)
at org.eclipse.rwt.internal.lifecycle.UIThread.interceptShutdown(UIThread.java:148)
at org.eclipse.rwt.internal.service.SessionStoreImpl.valueUnbound(SessionStoreImpl.java:160)
at org.apache.catalina.session.StandardSession.removeAttributeInternal(StandardSession.java:1649)
at org.apache.catalina.session.StandardSession.expire(StandardSession.java:756)
- locked <0x00002aaacdc62a58> (a org.apache.catalina.session.StandardSession)
at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:592)
at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:683)
at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:668)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1327)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1612)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1621)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1621)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1601)
at java.lang.Thread.run(Thread.java:619)
a head dump hasn't revealed much to me.
All UIThread.uiThreadTerminating fields are false which indicates the thread should have thrown a UIThreadTerminatedError
Nowhere in my code is there a catch(Throwable...) without logging so I am fairly sure I haven't caught the exception by mistake.
|
|
|
|
|
|
Re: Sessions not expiring. [message #653327 is a reply to message #653212] |
Wed, 09 February 2011 06:37  |
Eclipse User |
|
|
|
Hi Chris,
I currently have no good guess what might cause this problem. From your
description, it sounds to me like a catched UIThreadTerminatedError, but
you already said that you checked for it. Let me ask anyway: is there any
redirection involved in your application startup?
If not, have you tried to reproduce the problem with a 1.4 runtime? If it
happens with 1.4 too, please open a new bug with a snippet / description
to reproduce it.
Best regards, Ralf
--
Ralf Sternberg
Twitter: @ralfstx
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
Powered by
FUDForum. Page generated in 0.03798 seconds