You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "David Tombs (JIRA)" <ji...@apache.org> on 2011/09/13 22:31:10 UTC
[jira] [Created] (CAMEL-4447) thread safety issue with
Exchange.getUnitOfWork()
thread safety issue with Exchange.getUnitOfWork()
-------------------------------------------------
Key: CAMEL-4447
URL: https://issues.apache.org/jira/browse/CAMEL-4447
Project: Camel
Issue Type: Bug
Components: camel-core
Affects Versions: 2.8.1
Environment: JDK 1.6.0_20 on Linux x86_64
Reporter: David Tombs
I'm having a somewhat rare issue with NullPointerExceptions in a multithreaded route. It seems that there is a race condition between one thread operating on the UnitOfWork and another removing it. I have gotten the following stacktraces so far:
{{
ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
java.lang.NullPointerException: null
at org.apache.camel.processor.DefaultChannel$1.done(DefaultChannel.java:309) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:349) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:305) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
}}
And:
{{
ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
java.lang.NullPointerException: null
at org.apache.camel.impl.DefaultExchange.isTransacted(DefaultExchange.java:331) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:57) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
}}
Looking at the source, both NullPointerExceptions were thrown by code like:
{{
return getUnitOfWork() != null && getUnitOfWork().isTransacted();
}}
Oddly, I've only seen this happen soon after startup and only once per run.
The actual route is company confidential, but it's basically:
JMS -> Stream Resequencer -> Bean
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-4447) thread safety issue with
Exchange.getUnitOfWork()
Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104504#comment-13104504 ]
Willem Jiang commented on CAMEL-4447:
-------------------------------------
Camel 2.8.1 is promoted to the maven central repo two days ago, you can try it now :)
> thread safety issue with Exchange.getUnitOfWork()
> -------------------------------------------------
>
> Key: CAMEL-4447
> URL: https://issues.apache.org/jira/browse/CAMEL-4447
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.8.1
> Environment: JDK 1.6.0_20 on Linux x86_64
> Reporter: David Tombs
>
> I'm having a somewhat rare issue with NullPointerExceptions in a multithreaded route. It seems that there is a race condition between one thread operating on the UnitOfWork and another removing it. I have gotten the following stacktraces so far:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.processor.DefaultChannel$1.done(DefaultChannel.java:309) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:349) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:305) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> And:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.impl.DefaultExchange.isTransacted(DefaultExchange.java:331) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:57) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> Looking at the source, both NullPointerExceptions were thrown by code like:
> {code}
> return getUnitOfWork() != null && getUnitOfWork().isTransacted();
> {code}
> Oddly, I've only seen this happen soon after startup and only once per run.
> The actual route is company confidential, but it's basically:
> JMS -> Stream Resequencer -> Bean
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-4447) thread safety issue with
Exchange.getUnitOfWork()
Posted by "Claus Ibsen (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13116234#comment-13116234 ]
Claus Ibsen commented on CAMEL-4447:
------------------------------------
David any update?
> thread safety issue with Exchange.getUnitOfWork()
> -------------------------------------------------
>
> Key: CAMEL-4447
> URL: https://issues.apache.org/jira/browse/CAMEL-4447
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.8.1
> Environment: JDK 1.6.0_20 on Linux x86_64
> Reporter: David Tombs
> Assignee: Claus Ibsen
> Fix For: 2.8.2, 2.9.0
>
> Attachments: CAMEL-4447.patch
>
>
> I'm having a somewhat rare issue with NullPointerExceptions in a multithreaded route. It seems that there is a race condition between one thread operating on the UnitOfWork and another removing it. I have gotten the following stacktraces so far:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.processor.DefaultChannel$1.done(DefaultChannel.java:309) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:349) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:305) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> And:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.impl.DefaultExchange.isTransacted(DefaultExchange.java:331) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:57) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> Looking at the source, both NullPointerExceptions were thrown by code like:
> {code}
> return getUnitOfWork() != null && getUnitOfWork().isTransacted();
> {code}
> Oddly, I've only seen this happen soon after startup and only once per run.
> The actual route is company confidential, but it's basically:
> JMS -> Stream Resequencer -> Bean
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-4447) thread safety issue with
Exchange.getUnitOfWork()
Posted by "David Tombs (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13108109#comment-13108109 ]
David Tombs commented on CAMEL-4447:
------------------------------------
OK, I tested with 2.8.1. Still got the same Exceptions, still very soon after startup.
> thread safety issue with Exchange.getUnitOfWork()
> -------------------------------------------------
>
> Key: CAMEL-4447
> URL: https://issues.apache.org/jira/browse/CAMEL-4447
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.8.1
> Environment: JDK 1.6.0_20 on Linux x86_64
> Reporter: David Tombs
>
> I'm having a somewhat rare issue with NullPointerExceptions in a multithreaded route. It seems that there is a race condition between one thread operating on the UnitOfWork and another removing it. I have gotten the following stacktraces so far:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.processor.DefaultChannel$1.done(DefaultChannel.java:309) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:349) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:305) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> And:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.impl.DefaultExchange.isTransacted(DefaultExchange.java:331) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:57) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> Looking at the source, both NullPointerExceptions were thrown by code like:
> {code}
> return getUnitOfWork() != null && getUnitOfWork().isTransacted();
> {code}
> Oddly, I've only seen this happen soon after startup and only once per run.
> The actual route is company confidential, but it's basically:
> JMS -> Stream Resequencer -> Bean
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CAMEL-4447) thread safety issue with
Exchange.getUnitOfWork()
Posted by "David Tombs (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Tombs updated CAMEL-4447:
-------------------------------
Description:
I'm having a somewhat rare issue with NullPointerExceptions in a multithreaded route. It seems that there is a race condition between one thread operating on the UnitOfWork and another removing it. I have gotten the following stacktraces so far:
{noformat}
ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
java.lang.NullPointerException: null
at org.apache.camel.processor.DefaultChannel$1.done(DefaultChannel.java:309) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:349) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:305) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
{noformat}
And:
{noformat}
ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
java.lang.NullPointerException: null
at org.apache.camel.impl.DefaultExchange.isTransacted(DefaultExchange.java:331) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:57) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
{noformat}
Looking at the source, both NullPointerExceptions were thrown by code like:
{code}
return getUnitOfWork() != null && getUnitOfWork().isTransacted();
{code}
Oddly, I've only seen this happen soon after startup and only once per run.
The actual route is company confidential, but it's basically:
JMS -> Stream Resequencer -> Bean
was:
I'm having a somewhat rare issue with NullPointerExceptions in a multithreaded route. It seems that there is a race condition between one thread operating on the UnitOfWork and another removing it. I have gotten the following stacktraces so far:
{{
ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
java.lang.NullPointerException: null
at org.apache.camel.processor.DefaultChannel$1.done(DefaultChannel.java:309) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:349) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:305) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
}}
And:
{{
ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
java.lang.NullPointerException: null
at org.apache.camel.impl.DefaultExchange.isTransacted(DefaultExchange.java:331) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:57) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
}}
Looking at the source, both NullPointerExceptions were thrown by code like:
{{
return getUnitOfWork() != null && getUnitOfWork().isTransacted();
}}
Oddly, I've only seen this happen soon after startup and only once per run.
The actual route is company confidential, but it's basically:
JMS -> Stream Resequencer -> Bean
> thread safety issue with Exchange.getUnitOfWork()
> -------------------------------------------------
>
> Key: CAMEL-4447
> URL: https://issues.apache.org/jira/browse/CAMEL-4447
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.8.1
> Environment: JDK 1.6.0_20 on Linux x86_64
> Reporter: David Tombs
>
> I'm having a somewhat rare issue with NullPointerExceptions in a multithreaded route. It seems that there is a race condition between one thread operating on the UnitOfWork and another removing it. I have gotten the following stacktraces so far:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.processor.DefaultChannel$1.done(DefaultChannel.java:309) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:349) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:305) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> And:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.impl.DefaultExchange.isTransacted(DefaultExchange.java:331) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:57) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> Looking at the source, both NullPointerExceptions were thrown by code like:
> {code}
> return getUnitOfWork() != null && getUnitOfWork().isTransacted();
> {code}
> Oddly, I've only seen this happen soon after startup and only once per run.
> The actual route is company confidential, but it's basically:
> JMS -> Stream Resequencer -> Bean
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-4447) thread safety issue with
Exchange.getUnitOfWork()
Posted by "David Tombs (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112785#comment-13112785 ]
David Tombs commented on CAMEL-4447:
------------------------------------
Hi Claus, thanks for the patch but are you sure it applies against Camel 2.8.1? It seems DefaultChannel was moved and a couple other changes made.
> thread safety issue with Exchange.getUnitOfWork()
> -------------------------------------------------
>
> Key: CAMEL-4447
> URL: https://issues.apache.org/jira/browse/CAMEL-4447
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.8.1
> Environment: JDK 1.6.0_20 on Linux x86_64
> Reporter: David Tombs
> Assignee: Claus Ibsen
> Fix For: 2.8.2, 2.9.0
>
> Attachments: CAMEL-4447.patch
>
>
> I'm having a somewhat rare issue with NullPointerExceptions in a multithreaded route. It seems that there is a race condition between one thread operating on the UnitOfWork and another removing it. I have gotten the following stacktraces so far:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.processor.DefaultChannel$1.done(DefaultChannel.java:309) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:349) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:305) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> And:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.impl.DefaultExchange.isTransacted(DefaultExchange.java:331) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:57) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> Looking at the source, both NullPointerExceptions were thrown by code like:
> {code}
> return getUnitOfWork() != null && getUnitOfWork().isTransacted();
> {code}
> Oddly, I've only seen this happen soon after startup and only once per run.
> The actual route is company confidential, but it's basically:
> JMS -> Stream Resequencer -> Bean
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CAMEL-4447) thread safety issue with
Exchange.getUnitOfWork()
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-4447:
-------------------------------
Fix Version/s: 2.9.0
2.8.2
> thread safety issue with Exchange.getUnitOfWork()
> -------------------------------------------------
>
> Key: CAMEL-4447
> URL: https://issues.apache.org/jira/browse/CAMEL-4447
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.8.1
> Environment: JDK 1.6.0_20 on Linux x86_64
> Reporter: David Tombs
> Assignee: Claus Ibsen
> Fix For: 2.8.2, 2.9.0
>
> Attachments: CAMEL-4447.patch
>
>
> I'm having a somewhat rare issue with NullPointerExceptions in a multithreaded route. It seems that there is a race condition between one thread operating on the UnitOfWork and another removing it. I have gotten the following stacktraces so far:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.processor.DefaultChannel$1.done(DefaultChannel.java:309) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:349) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:305) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> And:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.impl.DefaultExchange.isTransacted(DefaultExchange.java:331) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:57) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> Looking at the source, both NullPointerExceptions were thrown by code like:
> {code}
> return getUnitOfWork() != null && getUnitOfWork().isTransacted();
> {code}
> Oddly, I've only seen this happen soon after startup and only once per run.
> The actual route is company confidential, but it's basically:
> JMS -> Stream Resequencer -> Bean
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-4447) thread safety issue with
Exchange.getUnitOfWork()
Posted by "David Tombs (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104488#comment-13104488 ]
David Tombs commented on CAMEL-4447:
------------------------------------
Is 2.8.1 released? I don't see it on the site.
> thread safety issue with Exchange.getUnitOfWork()
> -------------------------------------------------
>
> Key: CAMEL-4447
> URL: https://issues.apache.org/jira/browse/CAMEL-4447
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.8.1
> Environment: JDK 1.6.0_20 on Linux x86_64
> Reporter: David Tombs
>
> I'm having a somewhat rare issue with NullPointerExceptions in a multithreaded route. It seems that there is a race condition between one thread operating on the UnitOfWork and another removing it. I have gotten the following stacktraces so far:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.processor.DefaultChannel$1.done(DefaultChannel.java:309) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:349) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:305) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> And:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.impl.DefaultExchange.isTransacted(DefaultExchange.java:331) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:57) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> Looking at the source, both NullPointerExceptions were thrown by code like:
> {code}
> return getUnitOfWork() != null && getUnitOfWork().isTransacted();
> {code}
> Oddly, I've only seen this happen soon after startup and only once per run.
> The actual route is company confidential, but it's basically:
> JMS -> Stream Resequencer -> Bean
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-4447) thread safety issue with
Exchange.getUnitOfWork()
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112654#comment-13112654 ]
Claus Ibsen commented on CAMEL-4447:
------------------------------------
David do you mind posting your Camel route?
> thread safety issue with Exchange.getUnitOfWork()
> -------------------------------------------------
>
> Key: CAMEL-4447
> URL: https://issues.apache.org/jira/browse/CAMEL-4447
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.8.1
> Environment: JDK 1.6.0_20 on Linux x86_64
> Reporter: David Tombs
>
> I'm having a somewhat rare issue with NullPointerExceptions in a multithreaded route. It seems that there is a race condition between one thread operating on the UnitOfWork and another removing it. I have gotten the following stacktraces so far:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.processor.DefaultChannel$1.done(DefaultChannel.java:309) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:349) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:305) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> And:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.impl.DefaultExchange.isTransacted(DefaultExchange.java:331) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:57) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> Looking at the source, both NullPointerExceptions were thrown by code like:
> {code}
> return getUnitOfWork() != null && getUnitOfWork().isTransacted();
> {code}
> Oddly, I've only seen this happen soon after startup and only once per run.
> The actual route is company confidential, but it's basically:
> JMS -> Stream Resequencer -> Bean
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-4447) thread safety issue with
Exchange.getUnitOfWork()
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13113159#comment-13113159 ]
Claus Ibsen commented on CAMEL-4447:
------------------------------------
Yeah you would need to adjust the patch accordingly.
Or take a look at the backport to the 2.8 branch
http://svn.apache.org/viewvc?view=revision&revision=1174248
> thread safety issue with Exchange.getUnitOfWork()
> -------------------------------------------------
>
> Key: CAMEL-4447
> URL: https://issues.apache.org/jira/browse/CAMEL-4447
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.8.1
> Environment: JDK 1.6.0_20 on Linux x86_64
> Reporter: David Tombs
> Assignee: Claus Ibsen
> Fix For: 2.8.2, 2.9.0
>
> Attachments: CAMEL-4447.patch
>
>
> I'm having a somewhat rare issue with NullPointerExceptions in a multithreaded route. It seems that there is a race condition between one thread operating on the UnitOfWork and another removing it. I have gotten the following stacktraces so far:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.processor.DefaultChannel$1.done(DefaultChannel.java:309) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:349) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:305) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> And:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.impl.DefaultExchange.isTransacted(DefaultExchange.java:331) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:57) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> Looking at the source, both NullPointerExceptions were thrown by code like:
> {code}
> return getUnitOfWork() != null && getUnitOfWork().isTransacted();
> {code}
> Oddly, I've only seen this happen soon after startup and only once per run.
> The actual route is company confidential, but it's basically:
> JMS -> Stream Resequencer -> Bean
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-4447) thread safety issue with
Exchange.getUnitOfWork()
Posted by "David Tombs (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112590#comment-13112590 ]
David Tombs commented on CAMEL-4447:
------------------------------------
Upon further testing, I get 1-5 of these exceptions within 6 minutes of startup both on Solaris and Linux.
> thread safety issue with Exchange.getUnitOfWork()
> -------------------------------------------------
>
> Key: CAMEL-4447
> URL: https://issues.apache.org/jira/browse/CAMEL-4447
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.8.1
> Environment: JDK 1.6.0_20 on Linux x86_64
> Reporter: David Tombs
>
> I'm having a somewhat rare issue with NullPointerExceptions in a multithreaded route. It seems that there is a race condition between one thread operating on the UnitOfWork and another removing it. I have gotten the following stacktraces so far:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.processor.DefaultChannel$1.done(DefaultChannel.java:309) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:349) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:305) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> And:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.impl.DefaultExchange.isTransacted(DefaultExchange.java:331) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:57) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> Looking at the source, both NullPointerExceptions were thrown by code like:
> {code}
> return getUnitOfWork() != null && getUnitOfWork().isTransacted();
> {code}
> Oddly, I've only seen this happen soon after startup and only once per run.
> The actual route is company confidential, but it's basically:
> JMS -> Stream Resequencer -> Bean
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-4447) thread safety issue with
Exchange.getUnitOfWork()
Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104206#comment-13104206 ]
Willem Jiang commented on CAMEL-4447:
-------------------------------------
I just check the code of Camel 2.8.x, there are some change on the DefaultChannel.
Can you try the latest released Camel 2.8.1, not the 2.8.1-SNAPSHOT to see if the bug is still there?
> thread safety issue with Exchange.getUnitOfWork()
> -------------------------------------------------
>
> Key: CAMEL-4447
> URL: https://issues.apache.org/jira/browse/CAMEL-4447
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.8.1
> Environment: JDK 1.6.0_20 on Linux x86_64
> Reporter: David Tombs
>
> I'm having a somewhat rare issue with NullPointerExceptions in a multithreaded route. It seems that there is a race condition between one thread operating on the UnitOfWork and another removing it. I have gotten the following stacktraces so far:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.processor.DefaultChannel$1.done(DefaultChannel.java:309) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:349) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:305) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> And:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.impl.DefaultExchange.isTransacted(DefaultExchange.java:331) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:57) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> Looking at the source, both NullPointerExceptions were thrown by code like:
> {code}
> return getUnitOfWork() != null && getUnitOfWork().isTransacted();
> {code}
> Oddly, I've only seen this happen soon after startup and only once per run.
> The actual route is company confidential, but it's basically:
> JMS -> Stream Resequencer -> Bean
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CAMEL-4447) thread safety issue with
Exchange.getUnitOfWork()
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-4447:
-------------------------------
Attachment: CAMEL-4447.patch
A patch with a potential fix. David you can try this patch on the Camel 2.8.1 source code (eg from the 2.8.1 tag).
> thread safety issue with Exchange.getUnitOfWork()
> -------------------------------------------------
>
> Key: CAMEL-4447
> URL: https://issues.apache.org/jira/browse/CAMEL-4447
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.8.1
> Environment: JDK 1.6.0_20 on Linux x86_64
> Reporter: David Tombs
> Attachments: CAMEL-4447.patch
>
>
> I'm having a somewhat rare issue with NullPointerExceptions in a multithreaded route. It seems that there is a race condition between one thread operating on the UnitOfWork and another removing it. I have gotten the following stacktraces so far:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.processor.DefaultChannel$1.done(DefaultChannel.java:309) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:349) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:305) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> And:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.impl.DefaultExchange.isTransacted(DefaultExchange.java:331) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:57) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> Looking at the source, both NullPointerExceptions were thrown by code like:
> {code}
> return getUnitOfWork() != null && getUnitOfWork().isTransacted();
> {code}
> Oddly, I've only seen this happen soon after startup and only once per run.
> The actual route is company confidential, but it's basically:
> JMS -> Stream Resequencer -> Bean
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (CAMEL-4447) thread safety issue with
Exchange.getUnitOfWork()
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen reassigned CAMEL-4447:
----------------------------------
Assignee: Claus Ibsen
> thread safety issue with Exchange.getUnitOfWork()
> -------------------------------------------------
>
> Key: CAMEL-4447
> URL: https://issues.apache.org/jira/browse/CAMEL-4447
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.8.1
> Environment: JDK 1.6.0_20 on Linux x86_64
> Reporter: David Tombs
> Assignee: Claus Ibsen
> Attachments: CAMEL-4447.patch
>
>
> I'm having a somewhat rare issue with NullPointerExceptions in a multithreaded route. It seems that there is a race condition between one thread operating on the UnitOfWork and another removing it. I have gotten the following stacktraces so far:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.processor.DefaultChannel$1.done(DefaultChannel.java:309) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:349) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:305) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> And:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.impl.DefaultExchange.isTransacted(DefaultExchange.java:331) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:57) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> Looking at the source, both NullPointerExceptions were thrown by code like:
> {code}
> return getUnitOfWork() != null && getUnitOfWork().isTransacted();
> {code}
> Oddly, I've only seen this happen soon after startup and only once per run.
> The actual route is company confidential, but it's basically:
> JMS -> Stream Resequencer -> Bean
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CAMEL-4447) thread safety issue with
Exchange.getUnitOfWork()
Posted by "Claus Ibsen (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-4447.
--------------------------------
Resolution: Fixed
> thread safety issue with Exchange.getUnitOfWork()
> -------------------------------------------------
>
> Key: CAMEL-4447
> URL: https://issues.apache.org/jira/browse/CAMEL-4447
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.8.1
> Environment: JDK 1.6.0_20 on Linux x86_64
> Reporter: David Tombs
> Assignee: Claus Ibsen
> Fix For: 2.8.2, 2.9.0
>
> Attachments: CAMEL-4447.patch
>
>
> I'm having a somewhat rare issue with NullPointerExceptions in a multithreaded route. It seems that there is a race condition between one thread operating on the UnitOfWork and another removing it. I have gotten the following stacktraces so far:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.processor.DefaultChannel$1.done(DefaultChannel.java:309) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:349) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:305) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> And:
> {noformat}
> ERROR [Camel0 - Resequencer Delivery] o.a.c.p.StreamResequencer - Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException: null
> at org.apache.camel.impl.DefaultExchange.isTransacted(DefaultExchange.java:331) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:57) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:116) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:79) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:59) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:165) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer.sendElement(StreamResequencer.java:61) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliverNext(ResequencerEngine.java:254) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.resequencer.ResequencerEngine.deliver(ResequencerEngine.java:218) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> at org.apache.camel.processor.StreamResequencer$Delivery.run(StreamResequencer.java:212) ~[camel-core-2.8.1-SNAPSHOT.jar:2.8.1-SNAPSHOT]
> {noformat}
> Looking at the source, both NullPointerExceptions were thrown by code like:
> {code}
> return getUnitOfWork() != null && getUnitOfWork().isTransacted();
> {code}
> Oddly, I've only seen this happen soon after startup and only once per run.
> The actual route is company confidential, but it's basically:
> JMS -> Stream Resequencer -> Bean
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira