<html>
    <head>
      <base href="http://www.jacorb.org/bugzilla/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - JacORBConfiguration's getAttributeXXX methods are not thread safe"
   href="http://www.jacorb.org/bugzilla/show_bug.cgi?id=991">991</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>JacORBConfiguration's getAttributeXXX methods are not thread safe
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>JacORB
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.3
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>critical
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P5
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>ORB
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>jacorb-bugs@lists.spline.inf.fu-berlin.de
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>franky.bugzilla@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=445" name="attach_445" title="thread dump">attachment 445</a> <a href="attachment.cgi?id=445&action=edit" title="thread dump">[details]</a></span>
thread dump

I have a setup where I connect to multiple CORBA enabled devices in parallel
from a thread pool. Once in a while I see that a number of threads used for the
CORBA communication are stuck in an endless loop (threads are running at 100%)
at start up of my application. A thread dump of a stuck thread can be found in
the attached file. The threads got stuck in HashMap.getEntry which is known
behavior when accessed and modified concurrently and the owner of this HashMap
is JacOrbConfiguration. In fact there are 3 HashMaps which can be accessed
concurrently in JacOrbConfiguration being stringAttributes, booleanAttributes
and numberAttributes. The problem is that some of the methods getAttribute,
getAttributeAsBoolean, getAttributeAsInteger try to get the value from the
HashMap and if not the default value is put into the HashMap. If those
getAttributeXXX methods are called concurrently the HashMaps can be accessed
and modified concurrently and result in an infinite loop. I encountered this on
3.3 but I guess it's also on 3.5 as I didn't find any bug report related to
this.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>