[ 
https://issues.apache.org/jira/browse/QPID-572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12526031
 ] 

Robert Greig commented on QPID-572:
-----------------------------------

Rafi, I have tried reproducing this. Hardware is a 4 way dual-core opteron box 
running RHEL 4. Java 6 update 2.

I ran the tests several times without modifying the code and they all passed.

I tried adding in a sleep (500) and the tests still passed. Maybe I didn't add 
the sleep to the right place? I added it to the 
ConcurrentSelectorDeliveryManager, to run run() method of the inner Runner 
class:

       public void run()
        {
            boolean running = true;
            while (running && !_movingMessages.get())
            {
                  try { Thread.sleep(500); } catch (Exception e) {}
                processQueue();

Is that right? I haven't had much time to investigate the problem so I was 
really just trying to make the changes and run the tests a few times to see 
what happens.

> broker delivers messages out of order
> -------------------------------------
>
>                 Key: QPID-572
>                 URL: https://issues.apache.org/jira/browse/QPID-572
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: M2, M2.1, M3
>            Reporter: Rafael H. Schloming
>
> ConcurrentSelectorDeliveryManager will sometimes deliver messages out of 
> order. This is caused by the code in deliver(...) that attempts to 
> short-circuit message queuing when there is an available subscription. This 
> code can result in the currently published message skipping ahead of queued 
> messages causing out of order delivery. Although unrelated to transactions, I 
> have observed this failure occuring in TransactedTest both in testCommit and 
> testRollback. Normally it does not happen very frequently, however placing a 
> Thread.sleep(500) in the async delivery thread will cause the failure to 
> occur almost all the time.
> I tried fixing the problem by only attempting synchronous delivery when there 
> are no queued messages, however this appears to break other tests that use 
> selectors. This makes me suspect that the selector implementation is somehow 
> incorrectly coupled to synchronous delivery.
> I have only verfied this issue on the trunk, however I believe it effects M2 
> as well.

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

Reply via email to