Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-28190

Possible ConcurrentModificationException at startup from BlobProviderDocumentsUpdateListener

    XMLWordPrintable

    Details

      Description

      SinceĀ NXP-26911, BlobProviderDocumentsUpdateListener is fully asynchronous instead of post commit.
      This can lead at startup to:

      2019-10-22T17:15:00,784 ERROR [Nuxeo-Work-default-3:96105427139892.784991319] [org.nuxeo.ecm.core.work.AbstractWork] Exception during work: ListenerWork(Listener blobProviderDocumentUpdate [blobProvid    erDocumentUpdateEvent], Progress(?%, ?/0), null)
       15 java.util.ConcurrentModificationException: null
       16         at java.util.HashMap$HashIterator.nextNode(HashMap.java:1493) ~[?:?]
       17         at java.util.HashMap$ValueIterator.next(HashMap.java:1521) ~[?:?]
       18         at org.nuxeo.ecm.liveconnect.update.listener.BlobProviderDocumentsUpdateListener.onEvent(BlobProviderDocumentsUpdateListener.java:49) ~[nuxeo-liveconnect-core-11.1-SNAPSHOT.jar:?]
       19         at org.nuxeo.ecm.liveconnect.update.listener.BlobProviderDocumentsUpdateListener.handleEvent(BlobProviderDocumentsUpdateListener.java:40) ~[nuxeo-liveconnect-core-11.1-SNAPSHOT.jar:?]
       20         at org.nuxeo.ecm.core.event.impl.AsyncEventExecutor$ListenerWork.work(AsyncEventExecutor.java:221) [nuxeo-core-event-11.1-SNAPSHOT.jar:?]
       21         at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransaction(AbstractWork.java:484) [nuxeo-core-event-11.1-SNAPSHOT.jar:?]
       22         at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:374) [nuxeo-core-event-11.1-SNAPSHOT.jar:?]
       23         at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:57) [nuxeo-core-event-11.1-SNAPSHOT.jar:?]
       24         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
       25         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
       26         at java.lang.Thread.run(Thread.java:834) [?:?]
       27 2019-10-22T17:15:00,827 ERROR [Nuxeo-Work-default-3:96105427139892.784991319] [org.nuxeo.ecm.core.event.impl.AsyncEventExecutor] Failed to execute async event null on listener blobProviderDocumentUpda    te
       28 java.util.ConcurrentModificationException: null
       29         at java.util.HashMap$HashIterator.nextNode(HashMap.java:1493) ~[?:?]
       30         at java.util.HashMap$ValueIterator.next(HashMap.java:1521) ~[?:?]
       31         at org.nuxeo.ecm.liveconnect.update.listener.BlobProviderDocumentsUpdateListener.onEvent(BlobProviderDocumentsUpdateListener.java:49) ~[nuxeo-liveconnect-core-11.1-SNAPSHOT.jar:?]
       32         at org.nuxeo.ecm.liveconnect.update.listener.BlobProviderDocumentsUpdateListener.handleEvent(BlobProviderDocumentsUpdateListener.java:40) ~[nuxeo-liveconnect-core-11.1-SNAPSHOT.jar:?]
       33         at org.nuxeo.ecm.core.event.impl.AsyncEventExecutor$ListenerWork.work(AsyncEventExecutor.java:221) [nuxeo-core-event-11.1-SNAPSHOT.jar:?]
       34         at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransaction(AbstractWork.java:484) [nuxeo-core-event-11.1-SNAPSHOT.jar:?]
       35         at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:374) [nuxeo-core-event-11.1-SNAPSHOT.jar:?]
       36         at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:57) [nuxeo-core-event-11.1-SNAPSHOT.jar:?]
       37         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
       38         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
       39         at java.lang.Thread.run(Thread.java:834) [?:?]
       40 2019-10-22T17:15:02,561 INFO  [main] [org.nuxeo.runtime.osgi.OSGiRuntimeService] Nuxeo Platform Started
      

      There is no reason for BlobProviderDocumentsUpdateListener to be asynchronous since in the end it schedules a BlobProviderDocumentsUpdateWork (by definition asynchronous) via BatchUpdateBlobProvider#processDocumentsUpdate.

      Let's make this listener synchronous.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours
                  2h