[Bug] Deadlock in SystemTopicBasedTopicPoliciesService in TopicsConsumerImplTest
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Read release policy
- [X] I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.
### Version
master branch
### Minimal reproduce step
Happened in https://github.com/apache/pulsar/actions/runs/11631141771/job/32397464599?pr=23540#step:13:1110 while running TopicsConsumerImplTest
### What did you expect to see?
No deadlocks
### What did you see instead?
The test didn't shutdown cleanly due to a deadlock.
### Anything else?
This might also cause production issues although this happened in a test.
Thread dump: https://gist.github.com/lhotari/ce85ed30ed1c137b69aba7e03b63bfb6
Thread dump in analysis tool: https://jstack.review/?https://gist.github.com/lhotari/ce85ed30ed1c137b69aba7e03b63bfb6#tda_1_thread_generated-id-5
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
Contributor guide
Research direction
Start by reproducing the failure in TopicsConsumerImplTest on the master branch and review the linked thread dump for the lock cycle involving SystemTopicBasedTopicPoliciesService. Trace the shutdown path identified by the dump and verify that the test exits cleanly without a deadlock.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100