I have seen instances of a HashMap whose entries got circularly
linked, I assume, due to updates which where not thread safe.
Any thread using a get() on such a HashMap will spin forever
chasing its tail.

Cheers,
Larry

> -----Original Message-----
> From: Leon Rosenberg [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, September 06, 2005 8:31 AM
> To: tomcat-user@jakarta.apache.org
> Subject: Tomcat/JVM hangs in session.getAttribute / HashMap.get()
> 
> Hi,
> 
> This is quite ugly but we are running out of ideas.
> 
> We are currently experiencing stange behaviour of tomcat (or the VM).
> 
> Our tomcat hangs (not reproduceable, but probably on parallel 
> requests to similar methods) in session.getAttibute():
> 
> We checked the source code of the HashMap, StandardSession 
> and StandardSessionFacade but couldn't find any synchronized methods. 
> The manager shows the 4 threads hanging since 4000000 millis 
> (more than an hour). 
> 
> we created a stacktrace with kill - QUIT, here the threads are:
> 
> 
> "http-8580-Processor3" daemon prio=1 tid=0x7cdf11d0 
> nid=0x3269 runnable [7d7fe000..7d7ff8bc]
>         at java.util.HashMap.get(HashMap.java:325)
>         at
> org.apache.catalina.session.StandardSession.getAttribute(Stand
> ardSession.java:975)
>         at
> org.apache.catalina.session.StandardSessionFacade.getAttribute
> (StandardSessionFacade.java:109)
>         at
> de.friendscout.datingr4.shared.presentation.action.BaseAction.
> getUserId(BaseAction.java:653)
>         at
> de.friendscout.datingr4.onlinearea.presentation.action.BaseOnl
> ineAreaAction.getSettings(BaseOnlineAreaAction.java:89)
>         at
> de.friendscout.datingr4.onlinearea.presentation.action.GetOnli
> neUsersAction.doExecute(GetOnlineUsersAction.java:49)
> 
> 
> "http-8580-Processor1" daemon prio=1 tid=0x7d3fa078 
> nid=0x3269 runnable [7ce7f000..7ce7f8bc]
>         at java.util.HashMap.get(HashMap.java:325)
>         at
> org.apache.catalina.session.StandardSession.getAttribute(Stand
> ardSession.java:975)
>         at
> org.apache.catalina.session.StandardSessionFacade.getAttribute
> (StandardSessionFacade.java:109)
>         at
> de.friendscout.datingr4.shared.presentation.action.BaseAction.
> getUserId(BaseAction.java:653)
>         at
> de.friendscout.datingr4.onlinearea.presentation.action.ShowFil
> tersAction.doExecute(ShowFiltersAction.java:42)
>         at
> de.friendscout.datingr4.shared.presentation.action.BaseAction.
> execute(BaseAction.java:316)
> 
> 
> 
> "http-8580-Processor24" daemon prio=1 tid=0x7d430200 
> nid=0x3269 runnable [7e77f000..7e77f8bc]
>         at java.util.HashMap.get(HashMap.java:325)
>         at
> org.apache.catalina.session.StandardSession.getAttribute(Stand
> ardSession.java:975)
>         at
> org.apache.catalina.session.StandardSessionFacade.getAttribute
> (StandardSessionFacade.java:109)
>         at
> de.friendscout.datingr4.shared.presentation.util.RealmUtility.
> initRealm(RealmUtility.java:66)
>         at
> de.friendscout.datingr4.shared.presentation.util.RealmUtility.
> initRealm(RealmUtility.java:61)
>         at
> de.friendscout.datingr4.shared.presentation.controller.Control
> lerServlet.doGet(ControllerServlet.java:139)
> 
> 
> My Java knowledge isn't sufficent to explain how something can hang in
> HashMap.get() since its not synchronized. Neither are the 
> .getAttribute() methods of the StandardSession or 
> StandardSessionFacade. 
> 
> We are using jdk 1.4.2_08-b03, tomcat 5.0.25, struts 1.1, 
> jacorb 2.2 (night build) on linux/debian/sarge - 3.1 stable.
> 
> any ideas? anybody?
> 
> regards
> Leon
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to