Jason918 opened a new issue #12726:
URL: https://github.com/apache/pulsar/issues/12726


   **Describe the bug**
   This is a deep digging of previous flaky test #12672.
   The previous fix are all work around by changing the namespace, reducing 
messages, setting retentions.
   As I can reproduce it locally repeatedly by running the whole test class, I 
found it's actually a dead lock issue.
   
   As the screenshot showed below, the backlogQuota checking procedure is 
running on the metadata-store thread ( the thread is in **a single thread 
executor**, owned by 
org.apache.pulsar.metadata.impl.AbstractMetadataStore#executor), and 
org.apache.pulsar.broker.resources.NamespaceResources#getPolicies is called to 
get the policy data. `NamespaceResources#getPolicies` is a blocking method and 
depends on metadata-store thread to executed to be finished.
   So the deadlock happens.
   
   **To Reproduce**
   1. checkout git-id ffccd46168f473514308903a6719fe01059ce92d
   2. Run test in class PersistentTopicsTest
   
   **Expected behavior**
   metadata-store thread
   
   **Screenshots**
   
![image](https://user-images.githubusercontent.com/2770146/141104649-59d70ac7-780d-4e49-9f7a-b2b3e4c1731a.png)
   
   
   **Desktop (please complete the following information):**
    - OS: macOS
   
   **Additional context**
   nop.
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to