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

Computation should not terminate silently on Throwable

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2021.54, 2023.13
    • Component/s: Streams
    • Team:
      PLATFORM
    • Sprint:
      nxplatform #112, nxplatform #113
    • Story Points:
      2

      Description

      A computation that terminates should be traced as such and reported as a stream failure.

      This is the case for any Exception today, but this is not enough since java.lang.Throwable or java.lang.Error (which are not Exception) can be encountered and might result in silently terminate.

      This kind of problem may happen during deployment with missing dependency.

      Here an example with the expected behavior, without the fix this computation terminate silently and it's hard to understand the cause:

      2024-05-13T15:15:26,572 ERROR [stream/introspectionPool-00] [org.nuxeo.lib.stream.computation.log.ComputationRunner] stream/introspection: Terminate computation due to unexpected failure inside computation code: com/google/common/base/Objects
      java.lang.NoClassDefFoundError: com/google/common/base/Objects
              at org.nuxeo.lib.stream.log.mem.MemLogPartition$MemPartitionTailer.read(MemLogPartition.java:169) ~[nuxeo-stream-2023.12-SNAPSHOT.jar:?]
              at org.nuxeo.lib.stream.log.mem.MemLogTailer.read(MemLogTailer.java:101) ~[nuxeo-stream-2023.12-SNAPSHOT.jar:?]
              at org.nuxeo.lib.stream.log.mem.MemCompoundLogTailer.read(MemCompoundLogTailer.java:92) ~[nuxeo-stream-2023.12-SNAPSHOT.jar:?]
              at org.nuxeo.lib.stream.log.mem.MemCompoundLogTailer.read(MemCompoundLogTailer.java:68) ~[nuxeo-stream-2023.12-SNAPSHOT.jar:?]
              at org.nuxeo.lib.stream.computation.log.ComputationRunner.processRecord(ComputationRunner.java:437) ~[nuxeo-stream-2023.12-SNAPSHOT.jar:?]
              at org.nuxeo.lib.stream.computation.log.ComputationRunner.processLoop(ComputationRunner.java:315) ~[nuxeo-stream-2023.12-SNAPSHOT.jar:?]
              at org.nuxeo.lib.stream.computation.log.ComputationRunner.runOnce(ComputationRunner.java:259) [nuxeo-stream-2023.12-SNAPSHOT.jar:?]
              at org.nuxeo.lib.stream.computation.log.ComputationRunner.run(ComputationRunner.java:226) [nuxeo-stream-2023.12-SNAPSHOT.jar:?]
              at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
              at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
              at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
              at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
              at java.base/java.lang.Thread.run(Thread.java:833) [?:?]
      Caused by: java.lang.ClassNotFoundException: com.google.common.base.Objects
              at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445) ~[?:?]
              at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587) ~[?:?]
              at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
              ... 13 more
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: