You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Stan Lewis (JIRA)" <ji...@apache.org> on 2010/02/03 22:58:32 UTC

[jira] Created: (CAMEL-2445) BatchProcesser.processExchange needs to catch Throwable

BatchProcesser.processExchange needs to catch Throwable
-------------------------------------------------------

                 Key: CAMEL-2445
                 URL: https://issues.apache.org/activemq/browse/CAMEL-2445
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 1.6.2
            Reporter: Stan Lewis
             Fix For: 1.6.3


Have to test this on 2.x still.

If an aggregator sends an exchange to a processor that throws an Error this causes the thread started by BatchProcessor to exit, exchanges will then accumulate in the aggregator until an OutOfMemoryError occurs.

This patch sorts that out and adds a unit test, however there's another problem that I'm still looking into, namely that BatchProcessor just uses an instance of LoggingErrorHandler as it's exception handler, so any exceptions/errors caught by this processor will just get logged and not follow the normal Camel error handling.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-2445) BatchProcesser.processExchange needs to catch Throwable

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57367#action_57367 ] 

Claus Ibsen commented on CAMEL-2445:
------------------------------------

Willem applied patch to trunk: 906342

And I refined the patch a bit: 906381

> BatchProcesser.processExchange needs to catch Throwable
> -------------------------------------------------------
>
>                 Key: CAMEL-2445
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2445
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.6.2, 2.1.0
>            Reporter: Stan Lewis
>            Assignee: Stan Lewis
>             Fix For: 1.6.3, 2.3.0
>
>         Attachments: 1.x.patch, 2.x.patch, patch-1.x.txt, patch-2.x.txt
>
>
> If an aggregator sends an exchange to a processor that throws an Error this causes the thread started by BatchProcessor to exit, exchanges will then accumulate in the aggregator until an OutOfMemoryError occurs.
> This patch sorts that out and adds a unit test, however there's another problem that I'm still looking into, namely that BatchProcessor just uses an instance of LoggingErrorHandler as it's exception handler, so any exceptions/errors caught by this processor will just get logged and not follow the normal Camel error handling.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CAMEL-2445) BatchProcesser.processExchange needs to catch Throwable

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-2445.
--------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 2.2.0)
                   2.3.0

> BatchProcesser.processExchange needs to catch Throwable
> -------------------------------------------------------
>
>                 Key: CAMEL-2445
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2445
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.6.2, 2.1.0
>            Reporter: Stan Lewis
>            Assignee: Stan Lewis
>             Fix For: 1.6.3, 2.3.0
>
>         Attachments: 1.x.patch, 2.x.patch, patch-1.x.txt, patch-2.x.txt
>
>
> If an aggregator sends an exchange to a processor that throws an Error this causes the thread started by BatchProcessor to exit, exchanges will then accumulate in the aggregator until an OutOfMemoryError occurs.
> This patch sorts that out and adds a unit test, however there's another problem that I'm still looking into, namely that BatchProcessor just uses an instance of LoggingErrorHandler as it's exception handler, so any exceptions/errors caught by this processor will just get logged and not follow the normal Camel error handling.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-2445) BatchProcesser.processExchange needs to catch Throwable

Posted by "Jeff Genender (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeff Genender updated CAMEL-2445:
---------------------------------

    Attachment: 2.x.patch
                1.x.patch

> BatchProcesser.processExchange needs to catch Throwable
> -------------------------------------------------------
>
>                 Key: CAMEL-2445
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2445
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.6.2, 2.1.0
>            Reporter: Stan Lewis
>            Assignee: Stan Lewis
>             Fix For: 1.6.3, 2.2.0
>
>         Attachments: 1.x.patch, 2.x.patch, patch-1.x.txt, patch-2.x.txt
>
>
> If an aggregator sends an exchange to a processor that throws an Error this causes the thread started by BatchProcessor to exit, exchanges will then accumulate in the aggregator until an OutOfMemoryError occurs.
> This patch sorts that out and adds a unit test, however there's another problem that I'm still looking into, namely that BatchProcessor just uses an instance of LoggingErrorHandler as it's exception handler, so any exceptions/errors caught by this processor will just get logged and not follow the normal Camel error handling.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-2445) BatchProcesser.processExchange needs to catch Throwable

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-2445:
-------------------------------

    Fix Version/s:     (was: 2.3.0)
                   2.2.0

> BatchProcesser.processExchange needs to catch Throwable
> -------------------------------------------------------
>
>                 Key: CAMEL-2445
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2445
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.6.2, 2.1.0
>            Reporter: Stan Lewis
>            Assignee: Stan Lewis
>             Fix For: 1.6.3, 2.2.0
>
>         Attachments: 1.x.patch, 2.x.patch, patch-1.x.txt, patch-2.x.txt
>
>
> If an aggregator sends an exchange to a processor that throws an Error this causes the thread started by BatchProcessor to exit, exchanges will then accumulate in the aggregator until an OutOfMemoryError occurs.
> This patch sorts that out and adds a unit test, however there's another problem that I'm still looking into, namely that BatchProcessor just uses an instance of LoggingErrorHandler as it's exception handler, so any exceptions/errors caught by this processor will just get logged and not follow the normal Camel error handling.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-2445) BatchProcesser.processExchange needs to catch Throwable

Posted by "Stan Lewis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stan Lewis updated CAMEL-2445:
------------------------------

    Attachment:     (was: patch.txt)

> BatchProcesser.processExchange needs to catch Throwable
> -------------------------------------------------------
>
>                 Key: CAMEL-2445
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2445
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.6.2
>            Reporter: Stan Lewis
>            Assignee: Stan Lewis
>             Fix For: 1.6.3
>
>         Attachments: patch-1.x.txt
>
>
> Have to test this on 2.x still.
> If an aggregator sends an exchange to a processor that throws an Error this causes the thread started by BatchProcessor to exit, exchanges will then accumulate in the aggregator until an OutOfMemoryError occurs.
> This patch sorts that out and adds a unit test, however there's another problem that I'm still looking into, namely that BatchProcessor just uses an instance of LoggingErrorHandler as it's exception handler, so any exceptions/errors caught by this processor will just get logged and not follow the normal Camel error handling.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-2445) BatchProcesser.processExchange needs to catch Throwable

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57366#action_57366 ] 

Claus Ibsen commented on CAMEL-2445:
------------------------------------

Merged to 1.x: 906376.

> BatchProcesser.processExchange needs to catch Throwable
> -------------------------------------------------------
>
>                 Key: CAMEL-2445
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2445
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.6.2, 2.1.0
>            Reporter: Stan Lewis
>            Assignee: Stan Lewis
>             Fix For: 1.6.3, 2.2.0
>
>         Attachments: 1.x.patch, 2.x.patch, patch-1.x.txt, patch-2.x.txt
>
>
> If an aggregator sends an exchange to a processor that throws an Error this causes the thread started by BatchProcessor to exit, exchanges will then accumulate in the aggregator until an OutOfMemoryError occurs.
> This patch sorts that out and adds a unit test, however there's another problem that I'm still looking into, namely that BatchProcessor just uses an instance of LoggingErrorHandler as it's exception handler, so any exceptions/errors caught by this processor will just get logged and not follow the normal Camel error handling.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-2445) BatchProcesser.processExchange needs to catch Throwable

Posted by "Jeff Genender (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57361#action_57361 ] 

Jeff Genender commented on CAMEL-2445:
--------------------------------------

This is caused by the the trapping of Exception in the BatchSender but wont fire for Throwable (i.e. NoSuchMethodError/LingageError, etc).  Thus when the exceptions fire, it continues on about its way, filling the LinkedList and thus a memory leak ensues.  The patch really should be at where it is already looking for errors.  Patches for 1.x and 2.x. are attached.

> BatchProcesser.processExchange needs to catch Throwable
> -------------------------------------------------------
>
>                 Key: CAMEL-2445
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2445
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.6.2, 2.1.0
>            Reporter: Stan Lewis
>            Assignee: Stan Lewis
>             Fix For: 1.6.3, 2.2.0
>
>         Attachments: patch-1.x.txt, patch-2.x.txt
>
>
> If an aggregator sends an exchange to a processor that throws an Error this causes the thread started by BatchProcessor to exit, exchanges will then accumulate in the aggregator until an OutOfMemoryError occurs.
> This patch sorts that out and adds a unit test, however there's another problem that I'm still looking into, namely that BatchProcessor just uses an instance of LoggingErrorHandler as it's exception handler, so any exceptions/errors caught by this processor will just get logged and not follow the normal Camel error handling.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (CAMEL-2445) BatchProcesser.processExchange needs to catch Throwable

Posted by "Stan Lewis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stan Lewis reassigned CAMEL-2445:
---------------------------------

    Assignee: Stan Lewis

> BatchProcesser.processExchange needs to catch Throwable
> -------------------------------------------------------
>
>                 Key: CAMEL-2445
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2445
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.6.2
>            Reporter: Stan Lewis
>            Assignee: Stan Lewis
>             Fix For: 1.6.3
>
>
> Have to test this on 2.x still.
> If an aggregator sends an exchange to a processor that throws an Error this causes the thread started by BatchProcessor to exit, exchanges will then accumulate in the aggregator until an OutOfMemoryError occurs.
> This patch sorts that out and adds a unit test, however there's another problem that I'm still looking into, namely that BatchProcessor just uses an instance of LoggingErrorHandler as it's exception handler, so any exceptions/errors caught by this processor will just get logged and not follow the normal Camel error handling.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-2445) BatchProcesser.processExchange needs to catch Throwable

Posted by "Stan Lewis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stan Lewis updated CAMEL-2445:
------------------------------

    Attachment: patch.txt

> BatchProcesser.processExchange needs to catch Throwable
> -------------------------------------------------------
>
>                 Key: CAMEL-2445
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2445
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.6.2
>            Reporter: Stan Lewis
>            Assignee: Stan Lewis
>             Fix For: 1.6.3
>
>         Attachments: patch.txt
>
>
> Have to test this on 2.x still.
> If an aggregator sends an exchange to a processor that throws an Error this causes the thread started by BatchProcessor to exit, exchanges will then accumulate in the aggregator until an OutOfMemoryError occurs.
> This patch sorts that out and adds a unit test, however there's another problem that I'm still looking into, namely that BatchProcessor just uses an instance of LoggingErrorHandler as it's exception handler, so any exceptions/errors caught by this processor will just get logged and not follow the normal Camel error handling.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-2445) BatchProcesser.processExchange needs to catch Throwable

Posted by "Stan Lewis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stan Lewis updated CAMEL-2445:
------------------------------

    Attachment: patch-1.x.txt

> BatchProcesser.processExchange needs to catch Throwable
> -------------------------------------------------------
>
>                 Key: CAMEL-2445
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2445
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.6.2
>            Reporter: Stan Lewis
>            Assignee: Stan Lewis
>             Fix For: 1.6.3
>
>         Attachments: patch-1.x.txt
>
>
> Have to test this on 2.x still.
> If an aggregator sends an exchange to a processor that throws an Error this causes the thread started by BatchProcessor to exit, exchanges will then accumulate in the aggregator until an OutOfMemoryError occurs.
> This patch sorts that out and adds a unit test, however there's another problem that I'm still looking into, namely that BatchProcessor just uses an instance of LoggingErrorHandler as it's exception handler, so any exceptions/errors caught by this processor will just get logged and not follow the normal Camel error handling.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-2445) BatchProcesser.processExchange needs to catch Throwable

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57365#action_57365 ] 

Claus Ibsen commented on CAMEL-2445:
------------------------------------

I will change Camel 2.x to catch all kind of exceptions in CAMEL-2448. Then the regular camel error handler will also handle this NoSuchMethodException which will at minimum be logged, so there is a trace in the log now.

In 1.x we will patch it with your patches so BatchProcessor will log the exceptions.

I have adjusted your patch a bit as you need to catch the exception in the loop so Camel will process the next exchange to drain the aggregated exceptions. Otherwise they will be kept in the memory and it will only process 1 exchange at every trigger. And thus it can lead to consume more memory if your fill in more messages than it can drain.

> BatchProcesser.processExchange needs to catch Throwable
> -------------------------------------------------------
>
>                 Key: CAMEL-2445
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2445
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.6.2, 2.1.0
>            Reporter: Stan Lewis
>            Assignee: Stan Lewis
>             Fix For: 1.6.3, 2.2.0
>
>         Attachments: 1.x.patch, 2.x.patch, patch-1.x.txt, patch-2.x.txt
>
>
> If an aggregator sends an exchange to a processor that throws an Error this causes the thread started by BatchProcessor to exit, exchanges will then accumulate in the aggregator until an OutOfMemoryError occurs.
> This patch sorts that out and adds a unit test, however there's another problem that I'm still looking into, namely that BatchProcessor just uses an instance of LoggingErrorHandler as it's exception handler, so any exceptions/errors caught by this processor will just get logged and not follow the normal Camel error handling.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-2445) BatchProcesser.processExchange needs to catch Throwable

Posted by "Stan Lewis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stan Lewis updated CAMEL-2445:
------------------------------

    Attachment: patch-2.x.txt

> BatchProcesser.processExchange needs to catch Throwable
> -------------------------------------------------------
>
>                 Key: CAMEL-2445
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2445
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.6.2, 2.1.0
>            Reporter: Stan Lewis
>            Assignee: Stan Lewis
>             Fix For: 1.6.3, 2.2.0
>
>         Attachments: patch-1.x.txt, patch-2.x.txt
>
>
> Have to test this on 2.x still.
> If an aggregator sends an exchange to a processor that throws an Error this causes the thread started by BatchProcessor to exit, exchanges will then accumulate in the aggregator until an OutOfMemoryError occurs.
> This patch sorts that out and adds a unit test, however there's another problem that I'm still looking into, namely that BatchProcessor just uses an instance of LoggingErrorHandler as it's exception handler, so any exceptions/errors caught by this processor will just get logged and not follow the normal Camel error handling.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-2445) BatchProcesser.processExchange needs to catch Throwable

Posted by "Stan Lewis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stan Lewis updated CAMEL-2445:
------------------------------

          Description: 
If an aggregator sends an exchange to a processor that throws an Error this causes the thread started by BatchProcessor to exit, exchanges will then accumulate in the aggregator until an OutOfMemoryError occurs.

This patch sorts that out and adds a unit test, however there's another problem that I'm still looking into, namely that BatchProcessor just uses an instance of LoggingErrorHandler as it's exception handler, so any exceptions/errors caught by this processor will just get logged and not follow the normal Camel error handling.

  was:
Have to test this on 2.x still.

If an aggregator sends an exchange to a processor that throws an Error this causes the thread started by BatchProcessor to exit, exchanges will then accumulate in the aggregator until an OutOfMemoryError occurs.

This patch sorts that out and adds a unit test, however there's another problem that I'm still looking into, namely that BatchProcessor just uses an instance of LoggingErrorHandler as it's exception handler, so any exceptions/errors caught by this processor will just get logged and not follow the normal Camel error handling.

    Affects Version/s: 2.1.0
        Fix Version/s: 2.2.0

> BatchProcesser.processExchange needs to catch Throwable
> -------------------------------------------------------
>
>                 Key: CAMEL-2445
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2445
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.6.2, 2.1.0
>            Reporter: Stan Lewis
>            Assignee: Stan Lewis
>             Fix For: 1.6.3, 2.2.0
>
>         Attachments: patch-1.x.txt, patch-2.x.txt
>
>
> If an aggregator sends an exchange to a processor that throws an Error this causes the thread started by BatchProcessor to exit, exchanges will then accumulate in the aggregator until an OutOfMemoryError occurs.
> This patch sorts that out and adds a unit test, however there's another problem that I'm still looking into, namely that BatchProcessor just uses an instance of LoggingErrorHandler as it's exception handler, so any exceptions/errors caught by this processor will just get logged and not follow the normal Camel error handling.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.