-
Notifications
You must be signed in to change notification settings - Fork 64
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
panic: runtime error: index out of range #49
Comments
Hi there @mdogan , during the weekend I'll work on extending the tests to try to reach this state ( edge case ). I will keep you posted. Just a safe check:
The version you had before was v1.1.1 ? |
Thanks @filipecosta90. Actually no. It was v1.1.0 before v1.1.2. |
we also met this panic. we use v1.1.2 panic: runtime error: index out of range [25600] with length 25600
goroutine 212 [running]:
github.com/HdrHistogram/hdrhistogram-go.(*Histogram).getCountAtIndexGivenBucketBaseIdx(...)
/root/gopath/pkg/mod/github.com/!hdr!histogram/hdrhistogram-go@v1.1.2/hdr.go:599
github.com/HdrHistogram/hdrhistogram-go.(*Histogram).getValueFromIdxUpToCount(0x1d?, 0xc08fbaa200?)
/root/gopath/pkg/mod/github.com/!hdr!histogram/hdrhistogram-go@v1.1.2/hdr.go:361 +0xb7
github.com/HdrHistogram/hdrhistogram-go.(*Histogram).ValueAtPercentile(0xc05b2fe200, 0x9?)
/root/gopath/pkg/mod/github.com/!hdr!histogram/hdrhistogram-go@v1.1.2/hdr.go:335 +0x65 |
@stefanv5 do you have an easy reproduction of the bug? |
|
We have the same problem - likely related to getting 99.9999 centile. I think workaround is to use ValueAtPercentiles as it iterates all the buckets and looks to check range (if i.bucketIdx >= i.h.bucketCount) whereas getValueFromIdxUpToCount relies on maths to prevent range overflow and this is what looks to be broken. |
After upgrading to
v1.1.2
, occasionally we are observing the following panic:Histogram is created with:
WindowedHistogram
is being rotated on every 10mins andHistogram.ValueAtQuantile()
is called on aHistogram
produced byWindowedHistogram.Merge()
.This panic happened twice in the last ten days. But I'm not able to reproduce it on a local environment. This application is running on production more than a year and we haven't seen this issue with earlier versions.
The text was updated successfully, but these errors were encountered: