You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/06/01 12:02:46 UTC
[GitHub] [pulsar] codelipenghui opened a new pull request #10768: Unlock the write lock of the UnAckedMessageTracker before call redeliverUnacknowledgedMessages
codelipenghui opened a new pull request #10768:
URL: https://github.com/apache/pulsar/pull/10768
Fixes #10767
### Motivation
The deadlock will happen in following steps:
1. The client internal thread got the consumer instance lock when call internalBatchReceiveAsync
2. The timer thread got the write lock of the UnAckedMessageTracker and then waiting on the consumer instance lock when call redeliverUnacknowledgedMessages
3. The client internal thread try to get the write lock of the UnAckedMessageTracker when adding unacked messages
The deadlock happens.
The fix is to ensure the timer thread unlock the write lock before call redeliverUnacknowledgedMessages
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] codelipenghui commented on pull request #10768: Unlock the write lock of the UnAckedMessageTracker before call redeliverUnacknowledgedMessages
Posted by GitBox <gi...@apache.org>.
codelipenghui commented on pull request #10768:
URL: https://github.com/apache/pulsar/pull/10768#issuecomment-852146129
@315157973 As described in the PR description, they are from different threads, one is the client internal thread, one is timer thread.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] eolivelli merged pull request #10768: Unlock the write lock of the UnAckedMessageTracker before call redeliverUnacknowledgedMessages
Posted by GitBox <gi...@apache.org>.
eolivelli merged pull request #10768:
URL: https://github.com/apache/pulsar/pull/10768
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] 315157973 commented on pull request #10768: Unlock the write lock of the UnAckedMessageTracker before call redeliverUnacknowledgedMessages
Posted by GitBox <gi...@apache.org>.
315157973 commented on pull request #10768:
URL: https://github.com/apache/pulsar/pull/10768#issuecomment-852085892
Write lock is reentrant, why is it deadlock? Please correct me if I am wrong.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org