Skip to content
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.

panic: runtime error: invalid memory address or nil pointer dereference #13

Open
calexandre opened this issue Jan 15, 2020 · 2 comments

Comments

@calexandre
Copy link

Hello,
Been trying this operator in our development environment. It was working fine until we started noticing a lot of restarts...
After digging through the logs I found this:

{"level":"error","msg":"error processing SLO: 2.843567 can't be higher than 0.000000","sl":"device-info-api","slo":"9999_http_request_lt_500","src":"asm_amd64.s:1357","time":"2020-01-15T17:37:17Z"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x106b4bc]

goroutine 673 [running]:
github.com/spotahome/service-level-operator/pkg/service/output.(*prometheusOutput).Collect(0xc000046280, 0xc0004d3680)
        /src/pkg/service/output/prometheus.go:137 +0x3fc
github.com/prometheus/client_golang/prometheus.(*Registry).Gather.func1()
        /go/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:445 +0x164
created by github.com/prometheus/client_golang/prometheus.(*Registry).Gather
        /go/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:535 +0xe12
@primeroz
Copy link

we had a similar issue, i think in our case the problem was caused by a typo in the total query and indeed we had the same can't be higher than 0.000000" ... that is saying that the total for the query was 0 ... which , since the error one was not, probably meant that the total query was wrong .

@primeroz
Copy link

@slok could this Medium@9581c6a actually fix this issue ?

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

No branches or pull requests

2 participants