Anonymous | Login | Signup for a new account | 12-17-2024 10:45 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0003620 | [Resin] | major | sometimes | 08-03-09 12:04 | 08-12-09 16:33 | ||||
Reporter | ebarlas | View Status | public | ||||||
Assigned To | ferg | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 3.0.21 | ||||||
Summary | 0003620: _attrGetMap instance variable in IntrospectionMBean class should be synchronized | ||||||||
Description |
The _attrGetMap field in IntrospectionMBean class should be synchronized, as the same IntrospectionMBean can be accessed by multiple threads. This can result in corruption of the HashMap. In fact, two threads may resize the HashMap at the same time on a put, which can cause a cycle in a linked list of entries in the HashMap. If this occurs, a get on the map for a key that does not exist may enter an infinite loop. We have reproduced this behavior. See excerpt from stack trace below. This thread has been in this state for about 3 days now. "resin-tcp-connection-lt2fe5.qai.expertcity.com:8080-27" daemon prio=10 tid=0x000000004461c400 nid=0x3fb0 runnable [0x0000000042012000..0x0000000042013d90] java.lang.Thread.State: RUNNABLE at java.util.HashMap.get(HashMap.java:303) at com.caucho.jmx.IntrospectionMBean.getGetMethod(IntrospectionMBean.java:209) at com.caucho.jmx.IntrospectionMBean.getAttribute(IntrospectionMBean.java:115) at com.caucho.jmx.MBeanWrapper.getAttribute(MBeanWrapper.java:169) at com.caucho.jmx.AbstractMBeanServer.getAttribute(AbstractMBeanServer.java:654) at ... org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501) |
||||||||
Additional Information | |||||||||
Attached Files | |||||||||
|
Notes | |
(0004112) ebarlas 08-03-09 12:14 |
The simplest fix would be to use a Hashtable instead of a HashMap |
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
30 total queries executed. 26 unique queries executed. |