Mantis Bugtracker

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.

"" daemon prio=10 tid=0x000000004461c400 nid=0x3fb0 runnable [0x0000000042012000..0x0000000042013d90]
   java.lang.Thread.State: RUNNABLE
        at java.util.HashMap.get(
        at com.caucho.jmx.IntrospectionMBean.getGetMethod(
        at com.caucho.jmx.IntrospectionMBean.getAttribute(
        at com.caucho.jmx.MBeanWrapper.getAttribute(
        at com.caucho.jmx.AbstractMBeanServer.getAttribute(
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(
        at org.springframework.web.servlet.DispatcherServlet.doService(
        at org.springframework.web.servlet.FrameworkServlet.processRequest(
        at org.springframework.web.servlet.FrameworkServlet.doGet(

Additional Information
Attached Files

- Relationships

- Notes
08-03-09 12:14

The simplest fix would be to use a Hashtable instead of a HashMap

- Issue History
Date Modified Username Field Change
08-03-09 12:04 ebarlas New Issue
08-03-09 12:14 ebarlas Note Added: 0004112
08-03-09 12:15 ebarlas Issue Monitored: ebarlas
08-12-09 16:33 ferg Assigned To  => ferg
08-12-09 16:33 ferg Status new => closed
08-12-09 16:33 ferg Resolution open => fixed
08-12-09 16:33 ferg Fixed in Version  => 4.0.2

Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
30 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker