Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Deadlock in DrainingHashesTracker due to synchronized methods #23848

Closed
3 tasks done
lhotari opened this issue Jan 14, 2025 · 1 comment · Fixed by #23854
Closed
3 tasks done

[Bug] Deadlock in DrainingHashesTracker due to synchronized methods #23848

lhotari opened this issue Jan 14, 2025 · 1 comment · Fixed by #23854
Assignees
Labels
type/bug The PR fixed a bug or issue reported a bug

Comments

@lhotari
Copy link
Member

lhotari commented Jan 14, 2025

Search before asking

  • I searched in the issues and found nothing similar.

Read release policy

  • 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

Pulsar 4.0.1

Minimal reproduce step

Exact steps to reproduce aren't yet confirmed.

This problem was faced in a test. The problem is that there isn't a jstack -l <PID> thread dump of the deadlocked state. I have a heap dump, but since heap dumps don't contain exactly the same information as a thread dump about threads, it's hard to find out the exact reason why the dead lock happens. There are multiple blocked threads which indicates a dead lock:

Image Image Image Image Image Image Image Image Image

What did you expect to see?

No dead locks.

What did you see instead?

There are multiple threads in blocked state which indicates a dead lock.

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@lhotari lhotari added the type/bug The PR fixed a bug or issue reported a bug label Jan 14, 2025
@lhotari lhotari self-assigned this Jan 14, 2025
@lhotari
Copy link
Member Author

lhotari commented Jan 14, 2025

I'm planning to first reproduce the issue and then addressing that. One improvement in DrainingHashesTracker is to replace synchronized with the use of a read-write lock.

@lhotari lhotari changed the title [Bug] Potential deadlock in DrainingHashesTracker due to synchronized methods [Bug] Deadlock in DrainingHashesTracker due to synchronized methods Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant