-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Exponential histogram throws ArrayIndexOutOfBoundsException #5740
Comments
Thank you for the issue! I've edited your comment to improve the formatting. You might want to check out this Mastering Markdown guide for future reference. For the record, this discussion started on Slack: https://micrometer-metrics.slack.com/archives/C662HUJC9/p1733775869763389 I understand that you are still working on a reproducer but could you please provide a bit more details?
|
|
Full stack trace:
|
Thank you for the details.
|
Yesterday I tried reproduce this, basically had the same config as yours but I was not able to so a reproducer would be really appreciated. Also, how frequent is this issue? |
I guess this might be related to concurrent around re-scaling. That is the only thing I could think of when the index returned seems to be very high. One thing I was initially tempted to do was full synchronization of the histogram but thought that could have negative performance issues. Let me see if I can reproduce this with some concurrency tests. @sfc-gh-dguy Is this issue re-producible or is it very hard to re-produce (later would mean this might be related to concurrency but former might hint at something else)? |
@lenin-jaganathan @jonatan-ivanov We reverted the change since it was impacting our production environment. It definitely seems to be a concurrency issue, since it only created an incident in our workload tests and production environment. @sfc-gh-dguy and I are adding a try/catch around the record call to safely reproduce the issue. We will update you when we have more information. |
@jonatan-ivanov @lenin-jaganathan Here are some additional logs:
Stacktrace for both:
The difference is this stacktrace happens during downscaling while the previous does not. |
I have added this PR which would fix these concurrency issues. If you have a reproducer that would catch, please share it. Otherwise, I will try to work on concurrency tests sometime (possibly before next patch) |
Describe the bug
We get this exception when using a Timer to emit exponential histograms. It seems like it's trying to put a value in bucket index 254614 while there are only 40 buckets (40 is what we set for max number of buckets)
We are currently still trying to log this error when it happens to understand what value produces this exception. We'll update here once we'll have more information.
This is the stack trace:
The text was updated successfully, but these errors were encountered: