grafana / synthetic-monitoring-agent

Synthetic Monitoring Agent

Home Page:https://grafana.com/docs/grafana-cloud/how-do-i/synthetic-monitoring/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bug: panic during metrics serialisation

adriansr opened this issue · comments

We've observed this panic in synthetic-monitoring-agent v0.14.3:

panic: runtime error: slice bounds out of range [-3:]

goroutine 4069902855 [running]:
github.com/prometheus/prometheus/prompb.(*Label).MarshalToSizedBuffer(0xc01397fd80, {0xc04372a000, 0x19, 0x4334})
	github.com/prometheus/prometheus@v1.8.2-0.20200727090838-6f296594a852/prompb/types.pb.go:767 +0x27b
github.com/prometheus/prometheus/prompb.(*TimeSeries).MarshalToSizedBuffer(0xc0228df500, {0xc04372a000, 0x46, 0x4334})
	github.com/prometheus/prometheus@v1.8.2-0.20200727090838-6f296594a852/prompb/types.pb.go:720 +0x133
github.com/prometheus/prometheus/prompb.(*WriteRequest).MarshalToSizedBuffer(0xc04d9b0100, {0xc04372a000, 0x4334, 0x4334})
	github.com/prometheus/prometheus@v1.8.2-0.20200727090838-6f296594a852/prompb/remote.pb.go:473 +0x127
github.com/prometheus/prometheus/prompb.(*WriteRequest).XXX_Marshal(0x20?, {0xc04372a000, 0xc04d9b0100?, 0x4334}, 0x0?)
	github.com/prometheus/prometheus@v1.8.2-0.20200727090838-6f296594a852/prompb/remote.pb.go:85 +0x37
github.com/gogo/protobuf/proto.Marshal({0xeab0c0, 0xc04d9b0100})
	github.com/gogo/protobuf@v1.3.2/proto/table_marshal.go:2940 +0x144
github.com/grafana/synthetic-monitoring-agent/internal/pkg/prom.buildTimeSeriesWriteRequest({0xc0228df500, 0x56, 0x88}, {0xc0368b2000, 0x2f0, 0x2800})
	github.com/grafana/synthetic-monitoring-agent/internal/pkg/prom/prom.go:134 +0xc9
github.com/grafana/synthetic-monitoring-agent/internal/pkg/prom.SendSamplesWithBackoff({0xeabf20, 0xc04d9a4720}, 0xc046967b48?, {0xc0228df500?, 0xc00007e720?, 0xc04d9b00c0?}, 0xc036847f20)
	github.com/grafana/synthetic-monitoring-agent/internal/pkg/prom/prom.go:111 +0x56
github.com/grafana/synthetic-monitoring-agent/internal/pusher.(*Publisher).pushMetrics(0xc057ffcea0?, {0xeabeb0, 0xc0001ffb80}, 0x0?, {0xc0228df500, 0x56, 0x88})
	github.com/grafana/synthetic-monitoring-agent/internal/pusher/pusher.go:221 +0x130
github.com/grafana/synthetic-monitoring-agent/internal/pusher.(*Publisher).publish(0xc00022a000, {0xeabeb0, 0xc0001ffb80}, {0xeaa430, 0xc004944400})
	github.com/grafana/synthetic-monitoring-agent/internal/pusher/pusher.go:176 +0x83b
created by github.com/grafana/synthetic-monitoring-agent/internal/pusher.(*Publisher).Run
	github.com/grafana/synthetic-monitoring-agent/internal/pusher/pusher.go:131 +0x4a