Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-1179

Race condition due to lazy metada initialization when SDO is shared across threads for read intent

    XMLWordPrintableJSON

Details

    • Patch Available

    Description

      An a DataObject is being shared across multiple threads for read-only purpose ( no modification), due to lazy metadata initialization, we have a race condition which results in different exceptions at different times ( ConcurrentModificationException, NoSuchElementException). The following is one trace;

      java.util.ConcurrentModificationException
      at org.eclipse.emf.common.util.BasicEList$EIterator.checkModCount(BasicEList.java:1327)
      at org.eclipse.emf.common.util.BasicEList$EIterator.next(BasicEList.java:1275)
      at org.apache.tuscany.sdo.impl.ClassImpl.initAliasNames(ClassImpl.java:404)
      at org.apache.tuscany.sdo.impl.ClassImpl.getProperty(ClassImpl.java:423)
      at org.apache.tuscany.sdo.util.DataObjectUtil.get(DataObjectUtil.java:731)
      at org.apache.tuscany.sdo.impl.DataObjectImpl.get(DataObjectImpl.java:216)
      at org.apache.tuscany.sdo.impl.DataObjectImpl.getDataObject(DataObjectImpl.java:326)
      at org.apache.tuscany.sdo.test.CreateDataObjectMultiThreadedTestCase$CreateDataObjectMultiThread.runTest(CreateDataObjectMultiThreadedTestCase.java:67)
      at net.sourceforge.groboutils.junit.v1.TestRunnable.run(TestRunnable.java:154)
      at java.lang.Thread.run(Thread.java:797)

      Attachments

        1. CreateDataObjectMultiThreadedTestCase.java
          3 kB
          Hasan Muhammad
        2. 1179.patch
          2 kB
          Hasan Muhammad

        Activity

          People

            Unassigned Unassigned
            asundar Hasan Muhammad
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: