Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

panic when combining constantLine with asPercent #1781

Closed
Dieterbe opened this issue Apr 16, 2020 · 3 comments
Closed

panic when combining constantLine with asPercent #1781

Dieterbe opened this issue Apr 16, 2020 · 3 comments

Comments

@Dieterbe
Copy link
Contributor

Dieterbe commented Apr 16, 2020

A query like this:

asPercent(foo,constantLine(120))

results in a 500 response, and this log:

metrictank_1    | [Macaron] PANIC: runtime error: integer divide by zero
metrictank_1    | /usr/lib/go/src/runtime/panic.go:191 (0x432bda)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/util/util.go:30 (0x8ea88b)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/expr/normalize.go:41 (0xba5981)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/expr/func_aspercent.go:215 (0xb89556)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/expr/func_aspercent.go:90 (0xb8692b)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/expr/plan.go:309 (0xbaafbf)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/api/graphite.go:834 (0xc1b970)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/api/graphite.go:270 (0xc15886)
metrictank_1    | /usr/lib/go/src/reflect/value.go:460 (0x4b684a)
metrictank_1    | /usr/lib/go/src/reflect/value.go:321 (0x4b5d53)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/github.com/go-macaron/inject/inject.go:177 (0xab160b)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/github.com/go-macaron/inject/inject.go:137 (0xab0fe9)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/gopkg.in/macaron.v1/context.go:121 (0xacbe48)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/gopkg.in/macaron.v1/context.go:112 (0xc037d1)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/github.com/raintank/gziper/gzip.go:100 (0xc037c4)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/gopkg.in/macaron.v1/context.go:79 (0xacbcf0)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/github.com/go-macaron/inject/inject.go:157 (0xab1337)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/github.com/go-macaron/inject/inject.go:135 (0xab10d8)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/gopkg.in/macaron.v1/context.go:121 (0xacbe48)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/gopkg.in/macaron.v1/context.go:112 (0xb30d80)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/api/middleware/logger.go:45 (0xb30d69)
metrictank_1    | /usr/lib/go/src/reflect/value.go:460 (0x4b684a)
metrictank_1    | /usr/lib/go/src/reflect/value.go:321 (0x4b5d53)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/github.com/go-macaron/inject/inject.go:177 (0xab160b)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/github.com/go-macaron/inject/inject.go:137 (0xab0fe9)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/gopkg.in/macaron.v1/context.go:121 (0xacbe48)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/gopkg.in/macaron.v1/context.go:112 (0xb3260b)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/api/middleware/tracer.go:70 (0xb325f6)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/gopkg.in/macaron.v1/context.go:79 (0xacbcf0)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/github.com/go-macaron/inject/inject.go:157 (0xab1337)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/github.com/go-macaron/inject/inject.go:135 (0xab10d8)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/gopkg.in/macaron.v1/context.go:121 (0xacbe48)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/gopkg.in/macaron.v1/context.go:112 (0xb31ced)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/api/middleware/stats.go:76 (0xb31cd8)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/gopkg.in/macaron.v1/context.go:79 (0xacbcf0)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/github.com/go-macaron/inject/inject.go:157 (0xab1337)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/github.com/go-macaron/inject/inject.go:135 (0xab10d8)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/gopkg.in/macaron.v1/context.go:121 (0xacbe48)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/gopkg.in/macaron.v1/context.go:112 (0xadc955)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/gopkg.in/macaron.v1/recovery.go:161 (0xadc948)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/gopkg.in/macaron.v1/logger.go:40 (0xacf8b3)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/github.com/go-macaron/inject/inject.go:157 (0xab1337)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/github.com/go-macaron/inject/inject.go:135 (0xab10d8)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/gopkg.in/macaron.v1/context.go:121 (0xacbe48)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/gopkg.in/macaron.v1/router.go:187 (0xaddb66)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/gopkg.in/macaron.v1/router.go:294 (0xad7fcd)
metrictank_1    | /home/dieter/go/src/github.com/grafana/metrictank/vendor/gopkg.in/macaron.v1/macaron.go:220 (0xad0bea)
metrictank_1    | /usr/lib/go/src/net/http/server.go:2807 (0x7420e2)
metrictank_1    | /usr/lib/go/src/net/http/server.go:1895 (0x73db5b)
metrictank_1    | /usr/lib/go/src/runtime/asm_amd64.s:1373 (0x467100)
@Dieterbe Dieterbe added the bug label Apr 16, 2020
@Dieterbe Dieterbe added this to the sprint-10 milestone Apr 16, 2020
Dieterbe added a commit that referenced this issue Apr 16, 2020
fkaleo pushed a commit that referenced this issue Apr 17, 2020
fkaleo pushed a commit that referenced this issue Apr 17, 2020
fkaleo pushed a commit that referenced this issue Apr 17, 2020
fkaleo pushed a commit that referenced this issue Apr 17, 2020
@Dieterbe Dieterbe removed this from the sprint-10 milestone Apr 27, 2020
@stale
Copy link

stale bot commented Jul 26, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 26, 2020
@fkaleo
Copy link
Contributor

fkaleo commented Jul 27, 2020

please reopen

@stale stale bot removed the stale label Jul 27, 2020
@stale
Copy link

stale bot commented Oct 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 25, 2020
@stale stale bot closed this as completed Nov 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants