Skip to content

panic: runtime error: invalid memory address or nil pointer dereference in serviceQuotaFetcher #205

@marina-armis

Description

@marina-armis

We are running v0.10.0 in EKS on Amazon Linux 2 nodes and the exporter is crashing from time to time with the following error on serviceQuotaFetcher:

{"time":"2024-08-13T19:16:17.606187975Z","level":"INFO","msg":"starting the HTTP server component"}
{"time":"2024-08-13T19:16:47.125168277Z","level":"INFO","msg":"get RDS metrics"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1c48718]

goroutine 72 [running]:
golang.org/x/exp/slog.(*Logger).Handler(...)
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/slog/logger.go:89
golang.org/x/exp/slog.(*Logger).Enabled(0x0?, {0x0?, 0x0?}, 0x322f780?)
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/slog/logger.go:136 +0x18
golang.org/x/exp/slog.(*Logger).log(0x0, {0x0, 0x0}, 0x8, {0x22c7b7c, 0x11}, {0xc000515d88, 0x4, 0x4})
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/slog/logger.go:233 +0x6a
golang.org/x/exp/slog.(*Logger).Error(...)
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/slog/logger.go:215
github.com/qonto/prometheus-rds-exporter/internal/app/servicequotas.(*serviceQuotaFetcher).getQuota(0xc000515f30, {0x22b1ac1, 0x3}, {0x22ba8e7, 0xa})
	/home/runner/work/prometheus-rds-exporter/prometheus-rds-exporter/internal/app/servicequotas/servicequotas.go:89 +0x60a
github.com/qonto/prometheus-rds-exporter/internal/app/servicequotas.(*serviceQuotaFetcher).GetRDSQuotas(0xc000515f30)
	/home/runner/work/prometheus-rds-exporter/prometheus-rds-exporter/internal/app/servicequotas/servicequotas.go:110 +0x34
github.com/qonto/prometheus-rds-exporter/internal/app/exporter.(*rdsCollector).getQuotasMetrics(0xc00027a2c8, {0x7f2788394240, 0xc00012f040})
	/home/runner/work/prometheus-rds-exporter/prometheus-rds-exporter/internal/app/exporter/exporter.go:482 +0x1cb
created by github.com/qonto/prometheus-rds-exporter/internal/app/exporter.(*rdsCollector).fetchMetrics in goroutine 15
	/home/runner/work/prometheus-rds-exporter/prometheus-rds-exporter/internal/app/exporter/exporter.go:368 +0x755

The exporter is configured with:

  PROMETHEUS_RDS_EXPORTER_COLLECT_LOGS_SIZE: "false"
  PROMETHEUS_RDS_EXPORTER_COLLECT_USAGES: "false"
  PROMETHEUS_RDS_EXPORTER_COLLECT_INSTANCE_TAGS: "false"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions