qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rafael H. Schloming (JIRA)" <qpid-...@incubator.apache.org>
Subject [jira] Created: (QPID-573) race condition between rollback() and the dispatcher thread in the java client
Date Tue, 04 Sep 2007 19:00:44 GMT
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.


Mime
View raw message