GoogleCloudPlatform/prometheus

Panic in export.seriesCache.populate

Opened this issue · 0 comments

Found panic while debugging customer's Prometheus. Not sure what version of fork it is (might be bit older).

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x22f5dca]

goroutine 39683679 [running]:
github.com/prometheus/prometheus/tsdb.NewHead.func2(0xc000bb54e8)
   /app/tsdb/head.go:227 +0x2a
github.com/GoogleCloudPlatform/prometheus-engine/pkg/export.(*seriesCache).populate(0xc0003d0240, 0xc000cba6f0, 0xc57a007e00, {0xc0042da8c0, 0x5, 0x5}, 0xc97a3f8d98)
   /app/vendor/github.com/GoogleCloudPlatform/prometheus-engine/pkg/export/series_cache.go:339 +0x77
github.com/GoogleCloudPlatform/prometheus-engine/pkg/export.(*seriesCache).get(0xc0003d0240, {0x5, 0x5, 0xc97a3f8d98}, {0xc0042da8c0, 0x5, 0x5}, 0x100000000000000)
   /app/vendor/github.com/GoogleCloudPlatform/prometheus-engine/pkg/export/series_cache.go:241 +0x1c5
github.com/GoogleCloudPlatform/prometheus-engine/pkg/export.(*sampleBuilder).next(0xc0156ad588, 0xe2dd4fa8a6528e0a, {0xc0042da8c0, 0x5, 0x5}, {0xca26ec3808, 0x1b77, 0x2c55})
   /app/vendor/github.com/GoogleCloudPlatform/prometheus-engine/pkg/export/transform.go:80 +0x10c
github.com/GoogleCloudPlatform/prometheus-engine/pkg/export.(*Exporter).Export(0xc000753a20, 0x186ad69397d, {0xca26e8e000, 0x3f22, 0x5000})
   /app/vendor/github.com/GoogleCloudPlatform/prometheus-engine/pkg/export/export.go:406 +0x2f7
github.com/prometheus/prometheus/tsdb.(*headAppender).Commit(0xc8c3759cc0)
   /app/tsdb/head_append.go:487 +0x63f
github.com/prometheus/prometheus/tsdb.dbAppender.Commit({{0x38b0858, 0xc8c3759cc0}, 0xc000514340})
   /app/tsdb/db.go:870 +0x35
github.com/prometheus/prometheus/storage.(*fanoutAppender).Commit(0xc9c00d5f00)
   /app/storage/fanout.go:176 +0x3f
github.com/prometheus/prometheus/scrape.(*scrapeLoop).scrapeAndReport.func1()
   /app/scrape/scrape.go:1259 +0x45
github.com/prometheus/prometheus/scrape.(*scrapeLoop).scrapeAndReport(0xc866cf5d40, {0xedb9565e7, 0x5247100, 0x5247100}, {0xedb9565e7, 0x5247100, 0x5247100}, 0x0)
   /app/scrape/scrape.go:1330 +0xf70
github.com/prometheus/prometheus/scrape.(*scrapeLoop).run(0xc866cf5d40, 0xc8)
   /app/scrape/scrape.go:1212 +0x351