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

Panic on RecordValue #195

Open
chrisirhc opened this issue Jan 7, 2023 · 2 comments
Open

Panic on RecordValue #195

chrisirhc opened this issue Jan 7, 2023 · 2 comments

Comments

@chrisirhc
Copy link

chrisirhc commented Jan 7, 2023

Despite this comment:

tally/stats.go

Lines 374 to 377 in a80396b

// Find the highest inclusive of the bucket upper bound
// and emit directly to it. Since we use BucketPairs to derive
// buckets there will always be an inclusive bucket as
// we always have a math.MaxFloat64 bucket.

I just saw this panic:

panic: runtime error: index out of range [101] with length 101 goroutine 1904106 [running]: github.com/uber-go/tally.(*histogram).RecordValue(0xc000161810, 0x3bd1507?) external/com_github_uber_go_tally/stats.go:381 

The panic line:

tally/stats.go

Line 381 in a80396b

h.samples[idx].counter.Inc(1)

This is on the go-code monorepo, which I believe is on the v3 branch.
I used: var BucketsPercent = tally.MustMakeLinearValueBuckets(0.00, 0.01, 100) with this.

@kritin01
Copy link

+1

@Conceptron
Copy link

the root cause here was the input data having NaN values which fail the binary search comparison

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants