• 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: Application Stops Responding - Strange Conditions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Application Stops Responding - Strange Conditions


  • Subject: Re: Application Stops Responding - Strange Conditions
  • From: Chuck Hill <email@hidden>
  • Date: Tue, 19 Apr 2005 21:56:05 -0700


On Apr 19, 2005, at 9:43 PM, Hunter Hillegas wrote:

Sure.

Dump follows below.

I should have mentioned that concurrent requests are on

If it is just you testing it, this might not make much difference.


and we use the MultiECLockManager to make sure our locking is done properly.

Atta boy!  :-)


Thread dump:

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

"WorkerThread15" prio=5 tid=0x0053e710 nid=0x1947c00 waiting for monitor entry [f1499000..f1499ac0]
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:351)
- waiting to lock <0x65882fc8> (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.jav a:238)
at java.lang.Thread.run(Thread.java:552)


That is just an idle thread, waiting for some work to arrive. Followed by many more idle threads.

This is why your app is not responding:

"WorkerThread4" prio=5 tid=0x0053b5a0 nid=0x1abdc00 in Object.wait() [f0f0c000..f0f0eac0]
at java.lang.Object.wait(Native Method)
- waiting on <0x65ba3578> (a com.webobjects.appserver.WOSessionStore$TimeoutEntry)
at java.lang.Object.wait(Object.java:429)
at com.webobjects.appserver.WOSessionStore.checkOutSessionWithID(WOSession Store.java:207)
- locked <0x65ba3578> (a com.webobjects.appserver.WOSessionStore$TimeoutEntry)
at com.webobjects.appserver.WOApplication.restoreSessionWithID(WOApplicati on.java:1546)
at er.extensions.ERXApplication.restoreSessionWithID(ERXApplication.java: 835)
at com.webobjects.appserver.WOContext.session(WOContext.java:248)
at com.webobjects.appserver.WOComponent.session(WOComponent.java:1176)
at Main.awake(Main.java:27)
at com.webobjects.appserver.WOComponent._awakeInContext(WOComponent.java: 862)
at com.webobjects.appserver.WOApplication.pageWithName(WOApplication.java: 1962)
at com.webobjects.appserver.WOComponent.pageWithName(WOComponent.java: 1200)
at ProductPage.chromeObject(ProductPage.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja va:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso rImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at KeyValueCodingProtectedAccessor.methodValue(KeyValueCodingProtectedAcce ssor.java:54)
at com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject (NSKeyValueCoding.java:1160)
at com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueF orKey(NSKeyValueCoding.java:1268)
at com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java: 1539)
at com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyVal ueCoding.java:498)
at com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementati on.valueForKeyPath(NSKeyValueCodingAdditions.java:216)
at com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java: 1600)
at com.webobjects.foundation.NSKeyValueCodingAdditions$Utility.valueForKey Path(NSKeyValueCodingAdditions.java:149)
at com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementati on.valueForKeyPath(NSKeyValueCodingAdditions.java:217)
at com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java: 1600)
at com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponen t(WOKeyValueAssociation.java:46)
at com.webobjects.appserver.WOAssociation.booleanValueInComponent(WOAssoci ation.java:278)
at com.webobjects.appserver._private.WOConditional.invokeAction(WOConditio nal.java:47)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(W ODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamic Group.java:110)
at com.webobjects.appserver._private.WOConditional.invokeAction(WOConditio nal.java:55)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(W ODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamic Group.java:110)
at er.extensions.ERXWORepetition.invokeAction(ERXWORepetition.java:238)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(W ODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamic Group.java:110)
at com.webobjects.appserver._private.WOConditional.invokeAction(WOConditio nal.java:55)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(W ODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamic Group.java:110)
at com.webobjects.appserver.WOComponent.invokeAction(WOComponent.java: 945)
at com.webobjects.appserver._private.WOComponentReference.invokeAction(WOC omponentReference.java:104)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(W ODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamic Group.java:110)
at com.webobjects.appserver.WOComponent.invokeAction(WOComponent.java: 945)
at com.webobjects.appserver.WOSession.invokeAction(WOSession.java:1166)
at com.webobjects.appserver.WOApplication.invokeAction(WOApplication.java: 1375)
at er.extensions.ERXApplication.invokeAction(ERXApplication.java:592)
at com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWi thPreparedPage(WOComponentRequestHandler.java:196)
at com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWi thPreparedSession(WOComponentRequestHandler.java:287)
at com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWi thPreparedApplication(WOComponentRequestHandler.java:322)
at com.webobjects.appserver._private.WOComponentRequestHandler._handleRequ est(WOComponentRequestHandler.java:358)
at com.webobjects.appserver._private.WOComponentRequestHandler.handleReque st(WOComponentRequestHandler.java:435)
at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.ja va:1306)
at er.extensions.ERXApplication.dispatchRequest(ERXApplication.java:633)
at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread .java:173)
at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.jav a:254)
at java.lang.Thread.run(Thread.java:552)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:115)
- locked <0x65700190> (a java.lang.ref.Reference$Lock)


"main" prio=5 tid=0x005010d0 nid=0x1804600 in Object.wait() [f07ff000..f08002c8]
at java.lang.Object.wait(Native Method)
- waiting on <0x6587d790> (a com.webobjects.appserver._WORunLoop)
at com.webobjects.appserver._WORunLoop._acceptInputBeforeDate(_WORunLoop.j ava:217)
at com.webobjects.appserver._WORunLoop.runBeforeDate(_WORunLoop.java:71)
- locked <0x6587d790> (a com.webobjects.appserver._WORunLoop)
at com.webobjects.appserver.WOApplication._runOnce(WOApplication.java: 775)
at com.webobjects.appserver.WOApplication.run(WOApplication.java:900)
at er.extensions.ERXApplication.run(ERXApplication.java:273)
at com.webobjects.appserver.WOApplication.main(WOApplication.java:324)
at er.extensions.ERXApplication.main(ERXApplication.java:46)
at Application.main(Application.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja va:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso rImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.webobjects._bootstrap.WOBootstrap.main(WOBootstrap.java:71)


I can't think of how you have managed that. While handling a component based request, your request for pageWithName is attempting to check out that session again. Right now, this makes no sense to me. What is the code at these locations:
ProductPage.chromeObject(ProductPage.java:57)
 Main.awake(Main.java:27)

Chuck



On Apr 19, 2005, at 8:48 PM, Sacha Mallais wrote:

On Apr 19, 2005, at 8:34 pm, Hunter Hillegas wrote:


I am maintaining an existing shopping cart type application and I've run into a problem I've been unable to fix... So far I have spent several hours looking at it and done some Googling, etc... No luck so far.

One of my tasks was to take some page crumb hyperlinks that used component actions and convert them to direct actions.

The page crumbs work like this:

Each page inserts instances of the pages 'above' it in the hierarchy into an NSMutableArray:

NSMutableArray crumbs = new NSMutableArray();
crumbs.add(pageWithName("Main"));
crumbs.add(pageWithName("Products"));
crumbs.add(this);

This array is traversed to create HTML that renders like this with a WORepetition:

Home > Products > Certain Product

The components themselves have the direct action name inside of them, fetched during awake(), and the WOHyperlink uses that String as the 'directActionName'. These crumbs are inside a component that is included on every page of this application.

The crumbs work perfectly but... there is a wrinkle.

Since changing the crumbs to use direct actions, when I am several levels deep as in the above example, submitting a form via POST from an action method causes the app to stop responding. Some uninteresting logging messages still make it to stdout but no pages will render, not even if I click a different DA URL from the navigation bar in the Web app.

If I change the crumbs back to using components, all is well... I have isolated it to that area but I don't know where to go from here. It is fully repeatable and occurs every time.

I tried adding logging to the action method that submits the form but nothing ever hit the log.

I tried overriding WOApplication.dispatchRequest() and logging stuff out but what I got didn't help me (headers).

I tried a thread dump from the JVM but I didn't see anything that looked suspicious (though this was my first thread dump - I could have missed something).


Can you post the thread dump? The first thing that comes to mind is deadlock.


sacha


-- Sacha Michel Mallais - 400 lb. chimp Global Village Consulting Inc.: http://www.global-village.net/ The bird of paradise alights only upon the hand that does not grasp.



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
village.net


This email sent to email@hidden

--
Practical WebObjects - a book for intermediate WebObjects developers who want to increase their overall knowledge of WebObjects, or those who are trying to solve specific application development 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


  • Follow-Ups:
    • Re: Application Stops Responding - Strange Conditions
      • From: Hunter Hillegas <email@hidden>
References: 
 >Application Stops Responding - Strange Conditions (From: Hunter Hillegas <email@hidden>)
 >Re: Application Stops Responding - Strange Conditions (From: Sacha Mallais <email@hidden>)
 >Re: Application Stops Responding - Strange Conditions (From: Hunter Hillegas <email@hidden>)

  • Prev by Date: Re: Application Stops Responding - Strange Conditions
  • Next by Date: Re: Application Stops Responding - Strange Conditions
  • Previous by thread: Re: Application Stops Responding - Strange Conditions
  • Next by thread: Re: Application Stops Responding - Strange Conditions
  • Index(es):
    • Date
    • Thread