[ 
https://issues.apache.org/jira/browse/QPID-6213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chuck Rolke updated QPID-6213:
------------------------------
    Attachment: qpid-6213-svn-01.patch

Review request.

Here's a patch that solves a windows issue and possibly is a general solution 
the base problem.

1. On windows the queue cleaner runs before there are any queues. This causes 
an empty list of queues to get posted by the task which exits without 
rescheduling itself. Then the pollable queue never fires because nothing ever 
got added. Finally the original task never gets rescheduled and the process is 
deadlocked. The solution is to add a null pointer to pollable queue in the 
event that the pollable queue appears empty. This makes sure that the task on 
the other side of the pollable queue runs. Note that this null may get added 
even though a batch is already in flight. That will not break anything.

2. This patch adds a timeout, currently one second, which when exceeded gets 
the purge function to reschedule it's pending work and exit. This gives the 
other i/o tasks a shot at running before the queue cleaning starts again. In my 
testing I had 2000 queues and in its current form the queue cleaner will clean 
all 2000 before releasing the thread regardless of the batch size presented to 
the fire function. With this patch the 2000 queues are processed but in chunks 
that are called by the pollable queue.

> qpidd misses heartbeats
> -----------------------
>
>                 Key: QPID-6213
>                 URL: https://issues.apache.org/jira/browse/QPID-6213
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>    Affects Versions: 0.30
>            Reporter: Gordon Sim
>            Assignee: Gordon Sim
>             Fix For: 0.31
>
>         Attachments: qpid-6213-svn-01.patch
>
>
> Caused by https://issues.apache.org/jira/browse/QPID-5758. Reproducer from 
> Pavel Moravec: create many heartbeat enabled connections and queues (e.g. 500 
> idle receivers, each with their own queue) and have the purge interval 
> relatively short (to speed up reproducing).
> The broker misses heartbeats and connections get timed out.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to