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

Stack size increases in split with transacted

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.6.0, 3.7.1
    • 3.7.2, 3.8.0
    • camel-core, camel-spring
    • None
    • OS: Windows 10

      Java: OpenJDK jdk-8.0.282.8-hotspot

      Camel: 3.6.0 and 3.7.1

      I'm using camel-spring and Spring version is 5.1.5.RELEASE

    • Unknown
    • Important

    Description

      Hi,

      I have run into an anomalous stack usage with this simple route:

      <route id="split-stack-test" autoStartup="true">
      <from uri="quartz://split-stack-test?cron=0+16+15+?"/>
      <transacted/>
      <!-- creates a list of 500 integers -->
      <setBody><groovy>(0..499).collect

      { it }

      </groovy></setBody>
      <split>
      <simple>${body}</simple>
      <setBody><groovy>"${body} ${Thread.currentThread().getStackTrace().size()}"</groovy></setBody>
      <log message="STACKTRACE *** ${body}"/>
      </split>
      <to uri="mock:done?retainLast=0"/>
      </route>

      As you can see it prints the iteration number and the stack size (limited to 1024) and the output I get at the end is

      STACKTRACE *** 499 1024

      (The size of the stack reaches 1024 at 117)

      The stack is filled with these calls:

      at org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:138) ~[camel-spring-3.7.1.jar:3.7.1]
      at org.apache.camel.impl.engine.CamelInternalProcessor.process(CamelInternalProcessor.java:312) ~[camel-base-engine-3.7.1.jar:3.7.1]
      at org.apache.camel.processor.MulticastProcessor$MulticastTask.lambda$run$1(MulticastProcessor.java:384) ~[camel-core-processor-3.7.1.jar:3.7.1]
      at org.apache.camel.util.concurrent.AsyncCompletionService$Task.run(AsyncCompletionService.java:150) ~[camel-util-3.7.1.jar:3.7.1]
      at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148) ~[camel-base-engine-3.7.1.jar:3.7.1]
      at org.apache.camel.impl.engine.DefaultReactiveExecutor.schedule(DefaultReactiveExecutor.java:55) ~[camel-base-engine-3.7.1.jar:3.7.1]
      at org.apache.camel.impl.engine.CamelInternalProcessor$AsyncAfterTask.done(CamelInternalProcessor.java:211) ~[camel-base-engine-3.7.1.jar:3.7.1]
      at org.apache.camel.impl.engine.MDCUnitOfWork$MDCCallback.done(MDCUnitOfWork.java:292) ~[camel-base-engine-3.7.1.jar:3.7.1]
      at org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:138) ~[camel-spring-3.7.1.jar:3.7.1]
      at org.apache.camel.impl.engine.CamelInternalProcessor.process(CamelInternalProcessor.java:312) ~[camel-base-engine-3.7.1.jar:3.7.1]
      at org.apache.camel.processor.MulticastProcessor$MulticastTask.lambda$run$1(MulticastProcessor.java:384) ~[camel-core-processor-3.7.1.jar:3.7.1]
      at org.apache.camel.util.concurrent.AsyncCompletionService$Task.run(AsyncCompletionService.java:150) ~[camel-util-3.7.1.jar:3.7.1]
      at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148) ~[camel-base-engine-3.7.1.jar:3.7.1]
      at org.apache.camel.impl.engine.DefaultReactiveExecutor.schedule(DefaultReactiveExecutor.java:55) ~[camel-base-engine-3.7.1.jar:3.7.1]
      at org.apache.camel.impl.engine.CamelInternalProcessor$AsyncAfterTask.done(CamelInternalProcessor.java:211) ~[camel-base-engine-3.7.1.jar:3.7.1]
      at org.apache.camel.impl.engine.MDCUnitOfWork$MDCCallback.done(MDCUnitOfWork.java:292) ~[camel-base-engine-3.7.1.jar:3.7.1]
      at org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:138) ~[camel-spring-3.7.1.jar:3.7.1]

      If I remove transacted, the stack size remains at 15.

      STACKTRACE *** 499 15

      If I run this route in camel 2.22.1 at the end I see this (transacted is present!):

      STACKTRACE *** 499 51

       

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              s.rocca@oandsi.it Stefano Rocca
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: