Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-15946

Possible concurrentModificationException errors when upgrading from 8.4.6

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.10
    • Fix Version/s: None
    • Component/s: Old Core, Search - Solr
    • Labels:
      None
    • Environment:
      Windows 10 Pro 64 bit, Chrome 70, using a local instance XWiki 10.10 on HSQL, MySQL 5.7, PostgreSQL 10 and Oracle 11.2
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      STEPS TO REPRODUCE

      Preconditions: An older instance of XWiki (e.g. 8.4.6) and an instance of XWiki 10.10 (to which will be migrated) are available.

      1. Login to the older instance
      2. Create a new subwiki
      3. Close the instance
      4. Go to the newer instance (10.10) and copy/cut the
        [...]webapps\xwiki

        folder and replace it (first delete the old one) in the same location on the older version

      1. Start XWiki and follow the Distribution Wizard through the upgrade process
      2. Go to Wiki Index and click on the previously created subwiki's name to run the DW

      EXPECTED RESULTS

      The upgrade process is completed successfully without errors both on the Main wiki, as well as on subwiki.

      ACTUAL RESULTS

      Before starting the DW for the Main Wiki (when XWiki is initializing to app. 24% in browser), some errors are encountered in console and the initializing process is greatly delayed. Stacktrace:

      2018-12-04 14:18:56,047 [XWiki Solr index thread] ERROR c.x.x.d.XWikiDocument          - Exception while cloning document 
      java.util.ConcurrentModificationException: null
      	at java.util.ArrayList$Itr.checkForComodification(Unknown Source)
      	at java.util.ArrayList$Itr.next(Unknown Source)
      	at com.xpn.xwiki.doc.XWikiDocument.cloneXObjects(XWikiDocument.java:3022)
      	at com.xpn.xwiki.doc.XWikiDocument.cloneXObjects(XWikiDocument.java:2994)
      	at com.xpn.xwiki.doc.XWikiDocument.cloneInternal(XWikiDocument.java:4100)
      	at com.xpn.xwiki.doc.XWikiDocument.clone(XWikiDocument.java:4042)
      	at com.xpn.xwiki.api.Document.getDoc(Document.java:218)
      	at com.xpn.xwiki.api.Document.getValue(Document.java:2132)
      	at sun.reflect.GeneratedMethodAccessor219.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:395)
      	at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384)
      	at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173)
      	at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280)
      	at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:369)
      	at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
      	at org.apache.velocity.runtime.parser.node.ASTStringLiteral.value(ASTStringLiteral.java:330)
      	at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71)
      	at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142)
      	at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
      	at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluateInternal(DefaultVelocityEngine.java:259)
      	at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:222)
      	at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:198)
      	at org.xwiki.display.internal.AbstractDocumentTitleDisplayer.evaluateTitle(AbstractDocumentTitleDisplayer.java:247)
      	at org.xwiki.display.internal.AbstractDocumentTitleDisplayer.displayTitle(AbstractDocumentTitleDisplayer.java:166)
      	at org.xwiki.display.internal.AbstractDocumentTitleDisplayer.display(AbstractDocumentTitleDisplayer.java:150)
      	at org.xwiki.display.internal.AbstractDocumentTitleDisplayer.display(AbstractDocumentTitleDisplayer.java:59)
      	at org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:96)
      	at org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:39)
      	at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:245)
      	at org.xwiki.sheet.internal.SheetDocumentDisplayer.applySheet(SheetDocumentDisplayer.java:225)
      	at org.xwiki.sheet.internal.SheetDocumentDisplayer.maybeDisplayWithSheet(SheetDocumentDisplayer.java:180)
      	at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:111)
      	at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:52)
      	at org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:68)
      	at org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:42)
      	at com.xpn.xwiki.doc.XWikiDocument.getRenderedTitle(XWikiDocument.java:1616)
      	at org.xwiki.search.solr.internal.metadata.DocumentSolrMetadataExtractor.setFieldsInternal(DocumentSolrMetadataExtractor.java:103)
      	at org.xwiki.search.solr.internal.metadata.AbstractSolrMetadataExtractor.getSolrDocument(AbstractSolrMetadataExtractor.java:133)
      	at org.xwiki.search.solr.internal.DefaultSolrIndexer.getSolrDocument(DefaultSolrIndexer.java:504)
      	at org.xwiki.search.solr.internal.DefaultSolrIndexer.processBatch(DefaultSolrIndexer.java:411)
      	at org.xwiki.search.solr.internal.DefaultSolrIndexer.run(DefaultSolrIndexer.java:377)
      	at java.lang.Thread.run(Unknown Source)

      However, the DW process finishes eventually. Sometimes, also the following error is displayed in console (ILIE is Admin user):

      2018-12-04 10:43:18,422 [XWiki Solr index thread] ERROR o.x.s.s.i.DefaultSolrIndexer   - Failed to process entry [INDEX xwiki:XWiki.ILIE] 
      org.xwiki.search.solr.internal.api.SolrIndexerException: Failed to get input Solr document for entity 'xwiki:XWiki.ILIE'
      	at org.xwiki.search.solr.internal.metadata.AbstractSolrMetadataExtractor.getSolrDocument(AbstractSolrMetadataExtractor.java:140)
      	at org.xwiki.search.solr.internal.DefaultSolrIndexer.getSolrDocument(DefaultSolrIndexer.java:504)
      	at org.xwiki.search.solr.internal.DefaultSolrIndexer.processBatch(DefaultSolrIndexer.java:411)
      	at org.xwiki.search.solr.internal.DefaultSolrIndexer.run(DefaultSolrIndexer.java:377)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: java.util.ConcurrentModificationException: null
      	at java.util.ArrayList$Itr.checkForComodification(Unknown Source)
      	at java.util.ArrayList$Itr.next(Unknown Source)
      	at org.xwiki.search.solr.internal.metadata.DocumentSolrMetadataExtractor.setObjects(DocumentSolrMetadataExtractor.java:199)
      	at org.xwiki.search.solr.internal.metadata.DocumentSolrMetadataExtractor.setExtras(DocumentSolrMetadataExtractor.java:186)
      	at org.xwiki.search.solr.internal.metadata.DocumentSolrMetadataExtractor.setFieldsInternal(DocumentSolrMetadataExtractor.java:135)
      	at org.xwiki.search.solr.internal.metadata.AbstractSolrMetadataExtractor.getSolrDocument(AbstractSolrMetadataExtractor.java:133)
      	... 4 common frames omitted

      Please find attached the logs containing the errors. The issue was reproduced on MySQL 5.7, PostgreSQL 10, Oracle 11.2 and HSQL 2.4.1 (using various browsers).

        Attachments

        1. HSQL_8_4_6_to 10_10_output.log
          35 kB
          Ilie Andriuta
        2. MySQL_8_4_6_to 10_10_output.log
          30 kB
          Ilie Andriuta
        3. Oracle_8_4_6_to 10_10_output.log
          31 kB
          Ilie Andriuta
        4. PostgreSQL_8_4_6_to 10_10_output.log
          32 kB
          Ilie Andriuta

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                iandriuta Ilie Andriuta
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Date of First Response: