[
https://issues.apache.org/jira/browse/CAMEL-19497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17737519#comment-17737519
]
Claus Ibsen edited comment on CAMEL-19497 at 6/27/23 8:15 AM:
--------------------------------------------------------------
However the regular routing engine have catch Throwable and it will usually
then deal with is, so for custom end user code its less of a problem. However
the DefaultAsyncProcessorAwaitManager is a mehanism for waiting an async
process to be complete (callback.done) and it waits for this (if needed) and
therefore blocks.
You can monitor for blocked exchanges and unblock them via management apis.
A timeout is always questionable as you don't know what value to use that fits
all use-cases. You can set it to 15 minutes and then assume its way to long for
everyone, and that if it triggers then end users will notice and "fix their
buggy code or find the root cause".
was (Author: davsclaus):
However the regular routing engine have catch Throwable and it will usually
then deal with is, so for custom end user code its less of a problem. However
the DefaultAsyncProcessorAwaitManager is a mehanism for waiting an async
process to be complete (callback.done) and it waits for this (if needed) and
therefore blocks.
You can monitor for blocked exchanges and unblock them via management apis.
A timeout is always questionable as you don't know what value to use that fits
all use-cases. You can set it to 15 minutes and then assume its way to long for
everyone, and that if it triggers then end users will notice and "fix it".
> camel-core: DefaultAsyncProcessorAwaitManager can lock forever
> --------------------------------------------------------------
>
> Key: CAMEL-19497
> URL: https://issues.apache.org/jira/browse/CAMEL-19497
> Project: Camel
> Issue Type: Task
> Reporter: Otavio Rodolfo Piske
> Priority: Major
>
> I am not sure if this is a bug or not, so this is more like an investigative
> task.
>
> The DefaultAsyncProcessorAwaitManager can [lock
> indefinitely|https://github.com/apache/camel/blob/b2f6af4a695439d51ace77331f79157547f6cfd8/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultAsyncProcessorAwaitManager.java#L105]
> under some circumstances.
>
> One scenario where this could happen is by ignoring/not handling the
> exceptions on [this block on the
> AbstractBeanProcessor|https://github.com/apache/camel/blob/main/components/camel-bean/src/main/java/org/apache/camel/component/bean/AbstractBeanProcessor.java#L109].
> This was originally found when fixing the code to not catch a Throwable and
> then running the BeanThrowAssertionErrorTest. Because that test would throw a
> descendant of an AssertionError, it would cause the code to not handle the
> exception.
> This [has been fixed already|https://github.com/apache/camel/pull/10489], but
> there could be other circumstances that could cause this.
>
> Maybe we should investigate if it's feasible to have a timeout or something
> similar.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)