[
https://issues.apache.org/jira/browse/QPID-8206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16504958#comment-16504958
]
Kim van der Riet commented on QPID-8206:
----------------------------------------
Pavel Moravec has found a reproducer:
0) {{rm -rf /var/lib/qpidd/.qpidd # just to start with absolutely clean table}}
1) set
{{journal-flush-timeout=50ms}}
to qpidd.conf - the lower the better. I reproduce the deadlock always within a
minute or two with this value, but it took ~10 minutes with default 500ms (I
think).
2) run this script that sporadically sends and receives a durable message to a
queue that is time to time deleted - and it does so concurrently for 50 queues:
{noformat}
for i in $(seq 1 50); do
while true; do
echo "$(date): loop $i"
qpid-send -a "DurableTest-${i}; {create:always, node:{type:queue,
durable:true}}" -m 1 --content-size=1100 --durable=yes
qpid-receive -a DurableTest-${i} --print-content=no 2> /dev/null
sleep 0.2
done &
done
for i in $(seq 1 50); do
while true; do
echo "$(date): deleting queue $i"
qpid-config del queue DurableTest-${i} --force
sleep $((RANDOM%5)).$((RANDOM%10))
done &
done
{noformat}
3) check if qpidd responds, via e.g.:
{{while true; do date; qpid-stat -g; sleep 5; done}}
4) within a minute or so, deadlock comes to you and your broker.
> [linearstore] Deadlock possible in InactivityFireEvent if fire() is called at
> the same time as cancel()
> -------------------------------------------------------------------------------------------------------
>
> Key: QPID-8206
> URL: https://issues.apache.org/jira/browse/QPID-8206
> Project: Qpid
> Issue Type: Bug
> Components: C++ Broker
> Reporter: Kim van der Riet
> Assignee: Kim van der Riet
> Priority: Major
>
> A deadlock has been observed in InactivityFireEvent if
> {{InactivityFireEvent::fire()}} triggered by the timer occurs at almost the
> same time as {{InactivityFireEvent::cancel()}} on another thread, and which
> occurs if the queue is deleted.
> The mutex {{InactivityFireEvent::_ifeStateLock}} becomes deadlocked if the
> thread calling {{cancel()}} obtains the lock, but a fire event is imminent.
> The {{fire()}} call will then be blocked on this mutex. However, cancel
> cannot complete until fire competes owing to the sys::Time Monitor which
> waits for all fires to complete before allowing the cancel to occur.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]