You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Rafael H. Schloming (JIRA)" <qp...@incubator.apache.org> on 2007/09/04 21:00:44 UTC

[jira] Created: (QPID-573) race condition between rollback() and the dispatcher thread in the java client

race condition between rollback() and the dispatcher thread in the java client
------------------------------------------------------------------------------

                 Key: QPID-573
                 URL: https://issues.apache.org/jira/browse/QPID-573
             Project: Qpid
          Issue Type: Bug
          Components: Java Client
    Affects Versions: M2
            Reporter: Rafael H. Schloming


SVN change 572751 fixes a rather subtle race condition in the java client implementation of rollback() that is responsible for one of the intermittent failure modes of TransactedTest.

Prior to this change it was possible for the cleanup code in rollback() to occasionally miss a message because the dispatcher thread in AMQSession holds the message for a short time after extracting it from _queue and prior to dispatching it to a consumer. If the rollback code runs during this period, the prefetched message being held in the dispatcher thread is erroneously delivered despite being rolled back.

I suspect this race condition also occurs on the M2 branch as well, so it may be worth merging this fix to the branch. Placing a Thread.sleep(500) as the first line in the dispatcher thread and running TransactedTest should consistently reproduce the issue if it exists.

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


[jira] Closed: (QPID-573) race condition between rollback() and the dispatcher thread in the java client

Posted by "Martin Ritchie (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Ritchie closed QPID-573.
-------------------------------

    Resolution: Fixed

Closed as there is a test and commits to both M2 and trunk

> race condition between rollback() and the dispatcher thread in the java client
> ------------------------------------------------------------------------------
>
>                 Key: QPID-573
>                 URL: https://issues.apache.org/jira/browse/QPID-573
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: M2
>            Reporter: Rafael H. Schloming
>            Assignee: Aidan Skinner
>             Fix For: M3
>
>
> SVN change 572751 fixes a rather subtle race condition in the java client implementation of rollback() that is responsible for one of the intermittent failure modes of TransactedTest.
> Prior to this change it was possible for the cleanup code in rollback() to occasionally miss a message because the dispatcher thread in AMQSession holds the message for a short time after extracting it from _queue and prior to dispatching it to a consumer. If the rollback code runs during this period, the prefetched message being held in the dispatcher thread is erroneously delivered despite being rolled back.
> I suspect this race condition also occurs on the M2 branch as well, so it may be worth merging this fix to the branch. Placing a Thread.sleep(500) as the first line in the dispatcher thread and running TransactedTest should consistently reproduce the issue if it exists.

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


[jira] Updated: (QPID-573) race condition between rollback() and the dispatcher thread in the java client

Posted by "Martin Ritchie (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Ritchie updated QPID-573:
--------------------------------

    Fix Version/s:     (was: M2)
                   M2.1

> race condition between rollback() and the dispatcher thread in the java client
> ------------------------------------------------------------------------------
>
>                 Key: QPID-573
>                 URL: https://issues.apache.org/jira/browse/QPID-573
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: M2
>            Reporter: Rafael H. Schloming
>             Fix For: M2.1
>
>
> SVN change 572751 fixes a rather subtle race condition in the java client implementation of rollback() that is responsible for one of the intermittent failure modes of TransactedTest.
> Prior to this change it was possible for the cleanup code in rollback() to occasionally miss a message because the dispatcher thread in AMQSession holds the message for a short time after extracting it from _queue and prior to dispatching it to a consumer. If the rollback code runs during this period, the prefetched message being held in the dispatcher thread is erroneously delivered despite being rolled back.
> I suspect this race condition also occurs on the M2 branch as well, so it may be worth merging this fix to the branch. Placing a Thread.sleep(500) as the first line in the dispatcher thread and running TransactedTest should consistently reproduce the issue if it exists.

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


[jira] Updated: (QPID-573) race condition between rollback() and the dispatcher thread in the java client

Posted by "Aidan Skinner (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aidan Skinner updated QPID-573:
-------------------------------

    Fix Version/s:     (was: M2.1)
                   M3

> race condition between rollback() and the dispatcher thread in the java client
> ------------------------------------------------------------------------------
>
>                 Key: QPID-573
>                 URL: https://issues.apache.org/jira/browse/QPID-573
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: M2
>            Reporter: Rafael H. Schloming
>             Fix For: M3
>
>
> SVN change 572751 fixes a rather subtle race condition in the java client implementation of rollback() that is responsible for one of the intermittent failure modes of TransactedTest.
> Prior to this change it was possible for the cleanup code in rollback() to occasionally miss a message because the dispatcher thread in AMQSession holds the message for a short time after extracting it from _queue and prior to dispatching it to a consumer. If the rollback code runs during this period, the prefetched message being held in the dispatcher thread is erroneously delivered despite being rolled back.
> I suspect this race condition also occurs on the M2 branch as well, so it may be worth merging this fix to the branch. Placing a Thread.sleep(500) as the first line in the dispatcher thread and running TransactedTest should consistently reproduce the issue if it exists.

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


[jira] Updated: (QPID-573) race condition between rollback() and the dispatcher thread in the java client

Posted by "Martin Ritchie (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Ritchie updated QPID-573:
--------------------------------

    Fix Version/s: M2

> race condition between rollback() and the dispatcher thread in the java client
> ------------------------------------------------------------------------------
>
>                 Key: QPID-573
>                 URL: https://issues.apache.org/jira/browse/QPID-573
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: M2
>            Reporter: Rafael H. Schloming
>             Fix For: M2
>
>
> SVN change 572751 fixes a rather subtle race condition in the java client implementation of rollback() that is responsible for one of the intermittent failure modes of TransactedTest.
> Prior to this change it was possible for the cleanup code in rollback() to occasionally miss a message because the dispatcher thread in AMQSession holds the message for a short time after extracting it from _queue and prior to dispatching it to a consumer. If the rollback code runs during this period, the prefetched message being held in the dispatcher thread is erroneously delivered despite being rolled back.
> I suspect this race condition also occurs on the M2 branch as well, so it may be worth merging this fix to the branch. Placing a Thread.sleep(500) as the first line in the dispatcher thread and running TransactedTest should consistently reproduce the issue if it exists.

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