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/08/31 19:16:10 UTC

[jira] [Created] (CAMEL-4401) StreamResequencer poisoned by bad Exchange

StreamResequencer poisoned by bad Exchange
------------------------------------------

                 Key: CAMEL-4401
                 URL: https://issues.apache.org/jira/browse/CAMEL-4401
             Project: Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.7.1
         Environment: JDK 1.6.0_20, Linux x86_64
            Reporter: David Tombs
            Priority: Minor


If a StreamResequencer's configured Expression returns null for an Exchange (e.g., if a header does not exist) and the resequencer's pipeline is currently empty, the bad Exchange will be added to the pipeline. ResequencerEnginer.insert() succeeds in calling sequence.add() with the bad Exchange, but throws an Exception when calling sequence.successor(). This results in the message ending up at the Error Handler but the bad Exchange still in the Engine's sequence. Probably insert() should be probably be more transactional.

After this happens:
1) Trying to add a further exchange (even a "good" one) results in an Exception when calling sequence.add().
2) ResequencerEngine.deliverNext() results in an Exception so no further messages will be delievered.

I will attach a unit test to reproduce when I get a chance.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4401) StreamResequencer poisoned by bad Exchange

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

Claus Ibsen commented on CAMEL-4401:
------------------------------------

David do you have an unit test reproducing this issue?

> StreamResequencer poisoned by bad Exchange
> ------------------------------------------
>
>                 Key: CAMEL-4401
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4401
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.7.1
>         Environment: JDK 1.6.0_20, Linux x86_64
>            Reporter: David Tombs
>            Priority: Minor
>
> If a StreamResequencer's configured Expression returns null for an Exchange (e.g., if a header does not exist) and the resequencer's pipeline is currently empty, the bad Exchange will be added to the pipeline. ResequencerEnginer.insert() succeeds in calling sequence.add() with the bad Exchange, but throws an Exception when calling sequence.successor(). This results in the message ending up at the Error Handler but the bad Exchange still in the Engine's sequence. Probably insert() should be probably be more transactional.
> After this happens:
> 1) Trying to add a further exchange (even a "good" one) results in an Exception when calling sequence.add().
> 2) ResequencerEngine.deliverNext() results in an Exception so no further messages will be delievered.
> I will attach a unit test to reproduce when I get a chance.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4401) StreamResequencer poisoned by bad Exchange

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

Claus Ibsen commented on CAMEL-4401:
------------------------------------

I can reproduce the issue and I am working on a fix.

> StreamResequencer poisoned by bad Exchange
> ------------------------------------------
>
>                 Key: CAMEL-4401
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4401
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.7.1
>         Environment: JDK 1.6.0_20, Linux x86_64
>            Reporter: David Tombs
>            Assignee: Claus Ibsen
>            Priority: Minor
>
> If a StreamResequencer's configured Expression returns null for an Exchange (e.g., if a header does not exist) and the resequencer's pipeline is currently empty, the bad Exchange will be added to the pipeline. ResequencerEnginer.insert() succeeds in calling sequence.add() with the bad Exchange, but throws an Exception when calling sequence.successor(). This results in the message ending up at the Error Handler but the bad Exchange still in the Engine's sequence. Probably insert() should be probably be more transactional.
> After this happens:
> 1) Trying to add a further exchange (even a "good" one) results in an Exception when calling sequence.add().
> 2) ResequencerEngine.deliverNext() results in an Exception so no further messages will be delievered.
> I will attach a unit test to reproduce when I get a chance.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4401) StreamResequencer poisoned by bad Exchange

Posted by "David Tombs (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4401?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104129#comment-13104129 ] 

David Tombs commented on CAMEL-4401:
------------------------------------

Thanks for the fix. Are you sure you don't want to just catch IllegalArugmentException in StreamResequencer.process(), though?

> StreamResequencer poisoned by bad Exchange
> ------------------------------------------
>
>                 Key: CAMEL-4401
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4401
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.7.1
>         Environment: JDK 1.6.0_20, Linux x86_64
>            Reporter: David Tombs
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.0
>
>
> If a StreamResequencer's configured Expression returns null for an Exchange (e.g., if a header does not exist) and the resequencer's pipeline is currently empty, the bad Exchange will be added to the pipeline. ResequencerEnginer.insert() succeeds in calling sequence.add() with the bad Exchange, but throws an Exception when calling sequence.successor(). This results in the message ending up at the Error Handler but the bad Exchange still in the Engine's sequence. Probably insert() should be probably be more transactional.
> After this happens:
> 1) Trying to add a further exchange (even a "good" one) results in an Exception when calling sequence.add().
> 2) ResequencerEngine.deliverNext() results in an Exception so no further messages will be delievered.
> I will attach a unit test to reproduce when I get a chance.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CAMEL-4401) StreamResequencer poisoned by bad Exchange

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

Claus Ibsen reassigned CAMEL-4401:
----------------------------------

    Assignee: Claus Ibsen

> StreamResequencer poisoned by bad Exchange
> ------------------------------------------
>
>                 Key: CAMEL-4401
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4401
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.7.1
>         Environment: JDK 1.6.0_20, Linux x86_64
>            Reporter: David Tombs
>            Assignee: Claus Ibsen
>            Priority: Minor
>
> If a StreamResequencer's configured Expression returns null for an Exchange (e.g., if a header does not exist) and the resequencer's pipeline is currently empty, the bad Exchange will be added to the pipeline. ResequencerEnginer.insert() succeeds in calling sequence.add() with the bad Exchange, but throws an Exception when calling sequence.successor(). This results in the message ending up at the Error Handler but the bad Exchange still in the Engine's sequence. Probably insert() should be probably be more transactional.
> After this happens:
> 1) Trying to add a further exchange (even a "good" one) results in an Exception when calling sequence.add().
> 2) ResequencerEngine.deliverNext() results in an Exception so no further messages will be delievered.
> I will attach a unit test to reproduce when I get a chance.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4401) StreamResequencer poisoned by bad Exchange

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

Claus Ibsen commented on CAMEL-4401:
------------------------------------

Thanks David, changed the code accordingly.

> StreamResequencer poisoned by bad Exchange
> ------------------------------------------
>
>                 Key: CAMEL-4401
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4401
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.7.1
>         Environment: JDK 1.6.0_20, Linux x86_64
>            Reporter: David Tombs
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.0
>
>
> If a StreamResequencer's configured Expression returns null for an Exchange (e.g., if a header does not exist) and the resequencer's pipeline is currently empty, the bad Exchange will be added to the pipeline. ResequencerEnginer.insert() succeeds in calling sequence.add() with the bad Exchange, but throws an Exception when calling sequence.successor(). This results in the message ending up at the Error Handler but the bad Exchange still in the Engine's sequence. Probably insert() should be probably be more transactional.
> After this happens:
> 1) Trying to add a further exchange (even a "good" one) results in an Exception when calling sequence.add().
> 2) ResequencerEngine.deliverNext() results in an Exception so no further messages will be delievered.
> I will attach a unit test to reproduce when I get a chance.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CAMEL-4401) StreamResequencer poisoned by bad Exchange

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

Claus Ibsen resolved CAMEL-4401.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.9.0

Resequencer will now validate the incoming Exchange before enqueing. If invalid an exception is thrown. Added new option ignoreInvalidExchanges to ignore invalid exchanges.

> StreamResequencer poisoned by bad Exchange
> ------------------------------------------
>
>                 Key: CAMEL-4401
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4401
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.7.1
>         Environment: JDK 1.6.0_20, Linux x86_64
>            Reporter: David Tombs
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.0
>
>
> If a StreamResequencer's configured Expression returns null for an Exchange (e.g., if a header does not exist) and the resequencer's pipeline is currently empty, the bad Exchange will be added to the pipeline. ResequencerEnginer.insert() succeeds in calling sequence.add() with the bad Exchange, but throws an Exception when calling sequence.successor(). This results in the message ending up at the Error Handler but the bad Exchange still in the Engine's sequence. Probably insert() should be probably be more transactional.
> After this happens:
> 1) Trying to add a further exchange (even a "good" one) results in an Exception when calling sequence.add().
> 2) ResequencerEngine.deliverNext() results in an Exception so no further messages will be delievered.
> I will attach a unit test to reproduce when I get a chance.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4401) StreamResequencer poisoned by bad Exchange

Posted by "David Tombs (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4401?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13094707#comment-13094707 ] 

David Tombs commented on CAMEL-4401:
------------------------------------

A possible kludge-fix could be to compare() every Exchange with itself before adding to the Engine's sequence. This should weed out un-comparable Exchanges.

> StreamResequencer poisoned by bad Exchange
> ------------------------------------------
>
>                 Key: CAMEL-4401
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4401
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.7.1
>         Environment: JDK 1.6.0_20, Linux x86_64
>            Reporter: David Tombs
>            Priority: Minor
>
> If a StreamResequencer's configured Expression returns null for an Exchange (e.g., if a header does not exist) and the resequencer's pipeline is currently empty, the bad Exchange will be added to the pipeline. ResequencerEnginer.insert() succeeds in calling sequence.add() with the bad Exchange, but throws an Exception when calling sequence.successor(). This results in the message ending up at the Error Handler but the bad Exchange still in the Engine's sequence. Probably insert() should be probably be more transactional.
> After this happens:
> 1) Trying to add a further exchange (even a "good" one) results in an Exception when calling sequence.add().
> 2) ResequencerEngine.deliverNext() results in an Exception so no further messages will be delievered.
> I will attach a unit test to reproduce when I get a chance.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira