-
Notifications
You must be signed in to change notification settings - Fork 986
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
PauseDetector acquisition hang in DefaultCommandLatencyCollector #1300
Comments
Can you provide a reproducer? We had recently a change in the mentioned area to actually fix an issue. Potentially, we introduced another bug. |
I decided to refactor the code for an improved |
Previously, PauseDetectorWrapper was initialized once and a later loop attempted to retrieve the PauseDetector assuming that the previous code would had initialized the PauseDetector. Due to concurrency it is possible that the PauseDetector instance is being released while another thread wants to obtain the PauseDetector. This gap could lead to infinite loops as the instance is never allocated. The refactored code include now the initialization so concurrent initialization/release are now properly guarded.
Previously, PauseDetectorWrapper was initialized once and a later loop attempted to retrieve the PauseDetector assuming that the previous code would had initialized the PauseDetector. Due to concurrency it is possible that the PauseDetector instance is being released while another thread wants to obtain the PauseDetector. This gap could lead to infinite loops as the instance is never allocated. The refactored code include now the initialization so concurrent initialization/release are now properly guarded.
That's fixed and backported now. |
Thanks for your fix. After i saw the change in the commit, i think it makes sense. |
I found it through code analysis. I wasn't able to reproduce the issue, but there was always a potential race issue when |
Bug Report
Current Behavior
Lettuce thread block after upgrade to the latest lettuce version.
Stack trace
After my service onboard the latest release version 5.3.0.Release, the service stuck in a block state. The problem will not happen after i rollback the lettuce version to `4.2.2.Final`.It may related to the upgrade of lettuce. I am not sure the root cause.
The thread info in java progress.
I pick the thread PID
12459
and look for the detail thread state in jstack file.Input Code
Input Code
// your code here;
Expected behavior/code
Environment
Possible Solution
Additional context
The text was updated successfully, but these errors were encountered: