• 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: Bad DirectAction freezes instance...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bad DirectAction freezes instance...


  • Subject: Re: Bad DirectAction freezes instance...
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 4 Jan 2006 15:04:24 -0800

Hi James,

On Jan 4, 2006, at 2:01 PM, James Cicenia wrote:

Here is the thread dump.

Full thread dump Java HotSpot(TM) Client VM (1.4.2-54 mixed mode):

"WorkerThread15" prio=5 tid=0x0054dd30 nid=0x187b000 waiting for monitor entry [f1499000..f1499ac0]
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:351)
- waiting to lock <0x6581b410> (a java.net.PlainSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:448)
at java.net.ServerSocket.accept(ServerSocket.java:419)
at com.webobjects.appserver._private.WOWorkerThread.run (WOWorkerThread.java:238)
at java.lang.Thread.run(Thread.java:552)


That is just an idle worker thread waiting for something to do. Monitor is not JavaMonitor, in case that confused anyone.


"WorkerThread6" prio=5 tid=0x0054b470 nid=0x1b8fc00 runnable [f1010000..f1010ac0]
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
- locked <0x6581b410> (a java.net.PlainSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:448)
at java.net.ServerSocket.accept(ServerSocket.java:419)
at com.webobjects.appserver._private.WOWorkerThread.run (WOWorkerThread.java:238)
at java.lang.Thread.run(Thread.java:552)


I am not entirely sure about that. It looks like the worker thread is reading a request from the woadaptor. I don't think that indicates it is locked up.


"Thread-0" daemon prio=5 tid=0x005266e0 nid=0x1897400 waiting on condition [f0c89000..f0c89ac0]
at java.lang.Thread.sleep(Native Method)
at com.webobjects.appserver.WOApplication$_LifebeatThread.run (WOApplication.java:1233)


"Session Timeout Thread" daemon prio=5 tid=0x00525680 nid=0x1985800 waiting on condition [f0c08000..f0c08ac0]
at java.lang.Thread.sleep(Native Method)
at com.webobjects.appserver.WOSessionStore $_SessionTimeoutManager.run(WOSessionStore.java:110)
at java.lang.Thread.run(Thread.java:552)


"Signal Dispatcher" daemon prio=10 tid=0x00508030 nid=0x1817800 waiting on condition [0..0]

"Finalizer" daemon prio=8 tid=0x00506ae0 nid=0x1811a00 in Object.wait() [f0a04000..f0a04ac0]
at java.lang.Object.wait(Native Method)
- waiting on <0x65723050> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
- locked <0x65723050> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)


"Reference Handler" daemon prio=10 tid=0x005067b0 nid=0x1803e00 in Object.wait() [f0983000..f0983ac0]
at java.lang.Object.wait(Native Method)
- waiting on <0x657230b8> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:429)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:115)
- locked <0x657230b8> (a java.lang.ref.Reference$Lock)


Those are all waiting or sleeping, no deadlocks there.


"main" prio=5 tid=0x00500c30 nid=0x1804c00 in Object.wait() [f07ff000..f08002c8]
at java.lang.Object.wait(Native Method)
- waiting on <0x65812088> (a com.webobjects.appserver._WORunLoop)
at com.webobjects.appserver._WORunLoop._acceptInputBeforeDate (_WORunLoop.java:217)
at com.webobjects.appserver._WORunLoop.runBeforeDate (_WORunLoop.java:71)
- locked <0x65812088> (a com.webobjects.appserver._WORunLoop)
at com.webobjects.appserver.WOApplication._runOnce (WOApplication.java:775)
at com.webobjects.appserver.WOApplication.run(WOApplication.java:900)
at com.webobjects.appserver.WOApplication.main(WOApplication.java: 324)
at Application.main(Application.java:38)


Same there.


"VM Thread" prio=5 tid=0x00506030 nid=0x1806000 runnable

"VM Periodic Task Thread" prio=10 tid=0x00507f40 nid=0x1817400 waiting on condition
"Exception Catcher Thread" prio=10 tid=0x00500dc0 nid=0x1805c00 runnable


thoughts?

That does not look like a dump from a deadlocked or even active application. It looks like it is just idling.

Chuck

On Jan 4, 2006, at 3:35 PM, Chuck Hill wrote:


On Jan 4, 2006, at 1:08 PM, James Cicenia wrote:

Hmmm... where is performAction?

WODirectAction, you might have to manually override it in DirectAction.


I have the following in Application:

public WOResponse handleActionRequestError(WORequest aRequest, Exception exception, String reason, WORequestHandler aHandler, String actionClassName, String actionName, Class actionClass, WOAction actionInstance) {
if (actionInstance != null) {
if(actionInstance.context().hasSession()) actionInstance.context().session().terminate();
com.hb.pages.Home home = (com.hb.pages.Home) pageWithName ("Home", actionInstance.context());
return home.generateResponse();
} else {
return handleException(exception, null);
}
}


this traps the error and sends them back to the homepage, however, it freezes the instance.


The first thing that I would do is to follow the advice that Gary Teter just posted and get a thread dump after it deadlocks. That should point to where the actual problem is.


Chuck


On Jan 4, 2006, at 2:20 PM, Chuck Hill wrote:


On Jan 4, 2006, at 12:14 PM, James Cicenia wrote:

Anyone have any obvious ideas why a bad directAction would freeze an instance?

I noticed this from a bad link going to a non-existent DirectAction.


It might vary by version :-(, but in at least some versions, if performAction throws and there is a session, the session will not get checked in which deadlocks that session. If the app is not dispatching requests concurrently, that will deadlock the entire app.


The solution to that one is to wrap performAction in a try..catch block and pass the exception off to Application.handleException.


--
Coming in 2006 - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointro


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






--
Coming in 2006 - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointro


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






--
Coming in 2006 - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointro


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
References: 
 >Bad DirectAction freezes instance... (From: James Cicenia <email@hidden>)
 >Re: Bad DirectAction freezes instance... (From: Chuck Hill <email@hidden>)
 >Re: Bad DirectAction freezes instance... (From: James Cicenia <email@hidden>)
 >Re: Bad DirectAction freezes instance... (From: Chuck Hill <email@hidden>)
 >Re: Bad DirectAction freezes instance... (From: James Cicenia <email@hidden>)

  • Prev by Date: Re: Frameworks and versioning
  • Next by Date: Having Problems Running Java Apps
  • Previous by thread: Re: Bad DirectAction freezes instance...
  • Next by thread: Having Problems Running Java Apps
  • Index(es):
    • Date
    • Thread