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

Prevent IllegalArgumentException during retry mechanism of AbstractWork

    XMLWordPrintable

    Details

      Description

      It is possible to get this kind of error, probably because of the JVM optimization on frequent NPE in this case we may catch multiple times the same exception object resulting in "Self-suppression not permitted" exception:

      java.lang.IllegalArgumentException: Self-suppression not permitted
      	at java.lang.Throwable.addSuppressed(Throwable.java:1072) ~[?:1.8.0_282]
      	at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:390) ~[nuxeo-core-event-10.10-HF39.jar:?]
      	at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:57) ~[nuxeo-core-event-10.10-HF39.jar:?]
      	at org.nuxeo.ecm.core.work.WorkComputation.processRecord(WorkComputation.java:104) ~[nuxeo-core-event-10.10-HF39.jar:?]
      	at org.nuxeo.lib.stream.computation.log.ComputationRunner.lambda$processRecordWithRetry$10(ComputationRunner.java:375) ~[nuxeo-stream-10.10-HF41.jar:?]
      	at net.jodah.failsafe.Functions$10.call(Functions.java:252) [failsafe-1.1.0.jar:1.1.0]
      	at net.jodah.failsafe.SyncFailsafe.call(SyncFailsafe.java:145) [failsafe-1.1.0.jar:1.1.0]
      	at net.jodah.failsafe.SyncFailsafe.run(SyncFailsafe.java:81) [failsafe-1.1.0.jar:1.1.0]
      	at org.nuxeo.lib.stream.computation.log.ComputationRunner.processRecordWithRetry(ComputationRunner.java:375) [nuxeo-stream-10.10-HF41.jar:?
      ...
      Caused by: java.lang.NullPointerException

       

      We should check that suppressed != e before calling suppressed.addSuppressed(e);

       

       

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: