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

integer divide by zero #30

Closed
christophefromparis opened this issue Apr 10, 2018 · 3 comments
Closed

integer divide by zero #30

christophefromparis opened this issue Apr 10, 2018 · 3 comments

Comments

@christophefromparis
Copy link

I'm using the tricksterio/trickster:0.0.11 image with Prometheus and I receive several times the same error: integer divide by zero

10/04/2018 16:55:142018/04/10 14:55:14 http: panic serving 10.42.90.128:37778: runtime error: integer divide by zero
10/04/2018 16:55:14goroutine 3022 [running]:
10/04/2018 16:55:14net/http.(*conn).serve.func1(0xc42387a8c0)
10/04/2018 16:55:14 /usr/local/go/src/net/http/server.go:1697 +0xd0
10/04/2018 16:55:14panic(0x772e60, 0x9fe640)
10/04/2018 16:55:14 /usr/local/go/src/runtime/panic.go:491 +0x283
10/04/2018 16:55:14main.alignStepBoundaries(...)
10/04/2018 16:55:14 /go/src/github.com/comcast/trickster/handlers.go:763
10/04/2018 16:55:14main.(*TricksterHandler).buildRequestContext(0xc42013e000, 0x9d2960, 0xc42012dae0, 0xc4212da200, 0xc420ae3b90)
10/04/2018 16:55:14 /go/src/github.com/comcast/trickster/handlers.go:393 +0x2b85
10/04/2018 16:55:14main.(*TricksterHandler).promQueryRangeHandler(0xc42013e000, 0x9d2960, 0xc42012dae0, 0xc4212da200)
10/04/2018 16:55:14 /go/src/github.com/comcast/trickster/handlers.go:120 +0x4d
10/04/2018 16:55:14main.(*TricksterHandler).(main.promQueryRangeHandler)-fm(0x9d2960, 0xc42012dae0, 0xc4212da200)
10/04/2018 16:55:14 /go/src/github.com/comcast/trickster/main.go:58 +0x48
10/04/2018 16:55:14net/http.HandlerFunc.ServeHTTP(0xc4201568f0, 0x9d2960, 0xc42012dae0, 0xc4212da200)
10/04/2018 16:55:14 /usr/local/go/src/net/http/server.go:1918 +0x44
10/04/2018 16:55:14github.com/comcast/trickster/vendor/github.com/gorilla/mux.(*Router).ServeHTTP(0xc420130690, 0x9d2960, 0xc42012dae0, 0xc4212da200)
10/04/2018 16:55:14 /go/src/github.com/comcast/trickster/vendor/github.com/gorilla/mux/mux.go:159 +0xed
10/04/2018 16:55:14github.com/comcast/trickster/vendor/github.com/gorilla/handlers.CompressHandlerLevel.func1(0x9d2ea0, 0xc427795a40, 0xc42015b800)
10/04/2018 16:55:14 /go/src/github.com/comcast/trickster/vendor/github.com/gorilla/handlers/compress.go:146 +0x462
10/04/2018 16:55:14net/http.HandlerFunc.ServeHTTP(0xc420115080, 0x9d2ea0, 0xc427795a40, 0xc42015b800)
10/04/2018 16:55:14 /usr/local/go/src/net/http/server.go:1918 +0x44
10/04/2018 16:55:14net/http.serverHandler.ServeHTTP(0xc420120680, 0x9d2ea0, 0xc427795a40, 0xc42015b800)
10/04/2018 16:55:14 /usr/local/go/src/net/http/server.go:2619 +0xb4
10/04/2018 16:55:14net/http.(*conn).serve(0xc42387a8c0, 0x9d36e0, 0xc4236f9280)
10/04/2018 16:55:14 /usr/local/go/src/net/http/server.go:1801 +0x71d
10/04/2018 16:55:14created by net/http.(*Server).Serve
10/04/2018 16:55:14 /usr/local/go/src/net/http/server.go:2720 +0x288

@jranson
Copy link
Member

jranson commented Apr 10, 2018

@christophefromparis Will take a look today and root cause. Thank you for the report!

@jranson
Copy link
Member

jranson commented Apr 10, 2018

@christophefromparis it looks like somehow the Step size is not being picked up so the math is failing. That's a curious condition because it shouldn't happen! I'll add in a sanity check to see if that will fix it up while we figure out how it's happening in the first place.

@jranson
Copy link
Member

jranson commented Apr 10, 2018

Fixed in #31

@jranson jranson closed this as completed Apr 10, 2018
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

2 participants