Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-14996

Stack overflow error during aggregation when using completionSize

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.0
    • Fix Version/s: 3.3.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      Advanced

      Description

      I get stack overflow exception when i do aggregation with small completionSize only
      I have about 50000 lines to process if i use .completionSize(1000) it's fine but if i do .completionSize(10) i got java.lang.StackOverflowError

      from("direct:iSplitSomethingBefore")
                      .routeId("myRouteId")
      
                      .aggregate(header(FILE_NAME_ONLY), new GroupedBodyAggregationStrategy())
                      .eagerCheckCompletion()
                      .completionSize(10) // Only when i use small number
                      .completionPredicate(exchangeProperty(SPLIT_COMPLETE))
                      // Some code....
      ;
      
      java.lang.StackOverflowError: null
      	at java.base/java.lang.ClassLoader.defineClass1(Native Method) ~[na:na]
      	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016) ~[na:na]
      	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) ~[na:na]
      	at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:800) ~[na:na]
      	at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:698) ~[na:na]
      	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621) ~[na:na]
      	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579) ~[na:na]
      	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ~[na:na]
      	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[na:na]
      	at ch.qos.logback.classic.spi.PackagingDataCalculator.populateFrames(PackagingDataCalculator.java:74) ~[logback-classic-1.2.3.jar:na]
      	at ch.qos.logback.classic.spi.PackagingDataCalculator.calculate(PackagingDataCalculator.java:58) ~[logback-classic-1.2.3.jar:na]
      	at ch.qos.logback.classic.spi.ThrowableProxy.calculatePackagingData(ThrowableProxy.java:142) ~[logback-classic-1.2.3.jar:na]
      	at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:122) ~[logback-classic-1.2.3.jar:na]
      	at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:419) ~[logback-classic-1.2.3.jar:na]
      	at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383) ~[logback-classic-1.2.3.jar:na]
      	at ch.qos.logback.classic.Logger.warn(Logger.java:692) ~[logback-classic-1.2.3.jar:na]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:150) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor.schedule(DefaultReactiveExecutor.java:55) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.lambda$run$0(RedeliveryErrorHandler.java:401) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.process(AggregateProcessor.java:323) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:395) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor.schedule(DefaultReactiveExecutor.java:55) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.lambda$run$0(RedeliveryErrorHandler.java:398) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:426) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:365) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.process(AggregateProcessor.java:320) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:395) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor.schedule(DefaultReactiveExecutor.java:55) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.lambda$run$0(RedeliveryErrorHandler.java:398) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:426) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:365) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.process(AggregateProcessor.java:320) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:395) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor.schedule(DefaultReactiveExecutor.java:55) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.lambda$run$0(RedeliveryErrorHandler.java:398) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:426) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:365) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.process(AggregateProcessor.java:320) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:395) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor.schedule(DefaultReactiveExecutor.java:55) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.lambda$run$0(RedeliveryErrorHandler.java:398) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:426) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:365) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.process(AggregateProcessor.java:320) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:395) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor.schedule(DefaultReactiveExecutor.java:55) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.lambda$run$0(RedeliveryErrorHandler.java:398) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:426) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:365) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.process(AggregateProcessor.java:320) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:395) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor.schedule(DefaultReactiveExecutor.java:55) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.lambda$run$0(RedeliveryErrorHandler.java:398) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:426) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:365) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.process(AggregateProcessor.java:320) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:395) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor.schedule(DefaultReactiveExecutor.java:55) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.lambda$run$0(RedeliveryErrorHandler.java:398) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:426) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:365) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.process(AggregateProcessor.java:320) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:395) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor.schedule(DefaultReactiveExecutor.java:55) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.lambda$run$0(RedeliveryErrorHandler.java:398) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:426) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:365) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.process(AggregateProcessor.java:320) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:395) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor.schedule(DefaultReactiveExecutor.java:55) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.lambda$run$0(RedeliveryErrorHandler.java:398) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:426) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:365) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.process(AggregateProcessor.java:320) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:395) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor.schedule(DefaultReactiveExecutor.java:55) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.lambda$run$0(RedeliveryErrorHandler.java:398) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:426) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:365) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.process(AggregateProcessor.java:320) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:395) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor.schedule(DefaultReactiveExecutor.java:55) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.lambda$run$0(RedeliveryErrorHandler.java:398) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:426) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:365) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.process(AggregateProcessor.java:320) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:395) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor.schedule(DefaultReactiveExecutor.java:55) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.lambda$run$0(RedeliveryErrorHandler.java:398) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:426) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:365) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.process(AggregateProcessor.java:320) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:395) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor.schedule(DefaultReactiveExecutor.java:55) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.lambda$run$0(RedeliveryErrorHandler.java:398) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:426) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:365) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.process(AggregateProcessor.java:320) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:395) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor.schedule(DefaultReactiveExecutor.java:55) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.lambda$run$0(RedeliveryErrorHandler.java:398) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:426) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:365) ~[camel-base-3.2.0.jar:3.2.0]
      	at org.apache.camel.processor.aggregate.AggregateProcessor.process(AggregateProcessor.java:320) ~[camel-base-3.2.0.jar:3.2.0]
      ....
      

        Attachments

        1. stackoverflow.zip
          604 kB
          michael elbaz

          Issue Links

            Activity

              People

              • Assignee:
                davsclaus Claus Ibsen
                Reporter:
                michael992 michael elbaz
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: