<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 - A ConcurrentModificationException may occur while the IMR is serializing the server table to disk if a new POA is registered at the same time"
   href="http://www.jacorb.org/bugzilla/show_bug.cgi?id=1003">1003</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>A ConcurrentModificationException may occur while the IMR is serializing the server table to disk if a new POA is registered at the same time
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.5
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Implementation Repository
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>weiqigao@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>One of our customers has reported a CuncurrentModicationException during system
start up:

2015-02-03 12:45:10.049 SEVERE Exception while saving server table
    java.util.ArrayList.writeObject(ArrayList.java:766)
    sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
   
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    ...
   
org.jacorb.imr.ImplementationRepositoryImpl.save_server_table(ImplementationRepositoryImpl.java:825)

This is a manifestation of a race condition that exists between the
WriteThread, which serializes the server_table to disk, and the thread calling
register_poa() with a new POA.  While adquate locking is provided for the
fields in the ServerTable class through its table_lock, the call to

    _server.addPOA(_poa);

while registering a new POA does not fall into the scope of that lock.

This bug was reported against an older version of JacORB, JacORB 2.3.1. 
However, by reviewing the code in the latest head of the upstream, I see that
it is also present there.

I will attach a patch that introduce a new lock to prevent the
ConcurrentModificationException.

--
Weiqi Gao
Principal Software Engineer
Object Computing, Inc.</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>