You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Raul Kripalani (JIRA)" <ji...@apache.org> on 2012/11/03 13:58:11 UTC
[jira] [Created] (CAMEL-5769) Camel JMS producer can block a thread
under specific circumstances
Raul Kripalani created CAMEL-5769:
-------------------------------------
Summary: Camel JMS producer can block a thread under specific circumstances
Key: CAMEL-5769
URL: https://issues.apache.org/jira/browse/CAMEL-5769
Project: Camel
Issue Type: Bug
Components: camel-jms
Affects Versions: 2.10.2, 2.9.4, 2.8.6
Reporter: Raul Kripalani
Assignee: Raul Kripalani
Priority: Critical
Fix For: 2.9.5, 2.10.3, 2.11.0
This is an edge case, but when the following circumstances concur, the asynchronous routing engine in Camel become blocked:
- Sending an InOut exchange over JMS (request/reply), where:
- Persistent messages are enabled (deliveryPersistent=true)
- useMessageIDasCorrelationID is enabled
- replyToType is Temporary queues (default) (using TemporaryQueueReplyManager)
- a timeout is set
You have to be really unlucky, but if the following condition is satisfied, a thread will become blocked:
{{time the broker takes to ACK the produced message > message timeout}}
Hence, if we have a timeout of 3000ms, and the broker takes 4000ms to ACK the message (e.g. slow Disk I/O while the journal is rotating - it happened to us), at some point we'll see this.
{code}
2012-10-30 10:46:57,680 | WARN | CorrelationMap | 89 - org.apache.camel.camel-core - 2.8.0.fuse-06-11 | Exception occurred during purge task. This exception will be ignored.
java.lang.NullPointerException
{code}
The CorrelationMap is rendered useless, so if subsequent exchanges time out, the ReplyHandler may never get an onTimeout callback, thus leading to the waiting thread getting blocked forever if the async routing engine was in place.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-5769) Camel JMS producer can block a
thread under specific circumstances
Posted by "Raul Kripalani (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13490328#comment-13490328 ]
Raul Kripalani commented on CAMEL-5769:
---------------------------------------
I noticed that the issue doesn't necessarily happen with persistent messages only. It happens under any situation where the broker takes longer than the value set for the request timeout to ACK the message to the producer (and thus send back the final Message ID). In other words, this situation is reproduceable also when ActiveMQ Producer Flow Control has kicked in.
> Camel JMS producer can block a thread under specific circumstances
> ------------------------------------------------------------------
>
> Key: CAMEL-5769
> URL: https://issues.apache.org/jira/browse/CAMEL-5769
> Project: Camel
> Issue Type: Bug
> Components: camel-jms
> Affects Versions: 2.8.6, 2.9.4, 2.10.2
> Reporter: Raul Kripalani
> Assignee: Raul Kripalani
> Priority: Critical
> Fix For: 2.9.5, 2.10.3, 2.11.0
>
>
> This is an edge case, but when the following circumstances concur, the asynchronous routing engine in Camel become blocked:
> - Sending an InOut exchange over JMS (request/reply), where:
> - Persistent messages are enabled (deliveryPersistent=true)
> - useMessageIDasCorrelationID is enabled
> - replyToType is Temporary queues (default) (using TemporaryQueueReplyManager)
> - a timeout is set
> You have to be really unlucky, but if the following condition is satisfied, a thread will become blocked:
> {{time the broker takes to ACK the produced message > message timeout}}
> Hence, if we have a timeout of 3000ms, and the broker takes 4000ms to ACK the message (e.g. slow Disk I/O while the journal is rotating - it happened to us), at some point we'll see this.
> {code}
> 2012-10-30 10:46:57,680 | WARN | CorrelationMap | 89 - org.apache.camel.camel-core - 2.8.0.fuse-06-11 | Exception occurred during purge task. This exception will be ignored.
> java.lang.NullPointerException
> {code}
> The CorrelationMap is rendered useless, so if subsequent exchanges time out, the ReplyHandler may never get an onTimeout callback, thus leading to the waiting thread getting blocked forever if the async routing engine was in place.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (CAMEL-5769) Camel JMS producer can block a thread
under specific circumstances
Posted by "Raul Kripalani (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5769?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Raul Kripalani closed CAMEL-5769.
---------------------------------
Resolution: Fixed
Fixed in trunk, 2.10.x and 2.9.x. Added a test case to reproduce the buggy situation: JmsBlockedAsyncRoutingEngineTest.
> Camel JMS producer can block a thread under specific circumstances
> ------------------------------------------------------------------
>
> Key: CAMEL-5769
> URL: https://issues.apache.org/jira/browse/CAMEL-5769
> Project: Camel
> Issue Type: Bug
> Components: camel-jms
> Affects Versions: 2.8.6, 2.9.4, 2.10.2
> Reporter: Raul Kripalani
> Assignee: Raul Kripalani
> Priority: Critical
> Fix For: 2.9.5, 2.10.3, 2.11.0
>
>
> This is an edge case, but when the following circumstances concur, the asynchronous routing engine in Camel become blocked:
> - Sending an InOut exchange over JMS (request/reply), where:
> - Persistent messages are enabled (deliveryPersistent=true)
> - useMessageIDasCorrelationID is enabled
> - replyToType is Temporary queues (default) (using TemporaryQueueReplyManager)
> - a timeout is set
> You have to be really unlucky, but if the following condition is satisfied, a thread will become blocked:
> {{time the broker takes to ACK the produced message > message timeout}}
> Hence, if we have a timeout of 3000ms, and the broker takes 4000ms to ACK the message (e.g. slow Disk I/O while the journal is rotating - it happened to us), at some point we'll see this.
> {code}
> 2012-10-30 10:46:57,680 | WARN | CorrelationMap | 89 - org.apache.camel.camel-core - 2.8.0.fuse-06-11 | Exception occurred during purge task. This exception will be ignored.
> java.lang.NullPointerException
> {code}
> The CorrelationMap is rendered useless, so if subsequent exchanges time out, the ReplyHandler may never get an onTimeout callback, thus leading to the waiting thread getting blocked forever if the async routing engine was in place.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira