Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(blooms): Fix panic in initialisation of the bloom planner and bui…
…lder (#14110) The targets `bloom-planner` and `bloom-builder` panic at startup on branch `main`. ```console $ make loki && ./cmd/loki/loki -target=bloom-builder CGO_ENABLED=0 go build -ldflags "-extldflags \"-static\" -s -w -X github.com/grafana/loki/v3/pkg/util/build.Branch=main -X github.com/grafana/loki/v3/pkg/util/build.Version=main-b29b4b4 -X github.com/grafana/loki/v3/pkg/util/build.Revision=b29b4b4bb -X github.com/grafana/loki/v3/pkg/util/build.BuildUser=christian@grafana1210 -X github.com/grafana/loki/v3/pkg/util/build.BuildDate=2024-09-11T08:30:11Z" -tags netgo -o cmd/loki/loki ./cmd/loki panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x287b590] goroutine 1 [running]: github.com/grafana/dskit/ring.(*BasicLifecycler).GetInstanceID(...) /home/christian/sandbox/grafana/loki/vendor/github.com/grafana/dskit/ring/basic_lifecycler.go:132 github.com/grafana/loki/v3/pkg/bloombuild/builder.New({{0x6400000, 0x6400000, {0x0, 0x0}, 0x0, 0x0, 0x0, {0x5f5e100, 0x2540be400, 0xa}, ...}, ...}, ...) /home/christian/sandbox/grafana/loki/pkg/bloombuild/builder/builder.go:92 +0x470 github.com/grafana/loki/v3/pkg/loki.(*Loki).initBloomBuilder(0xc002984008) /home/christian/sandbox/grafana/loki/pkg/loki/modules.go:1750 +0x4b6 github.com/grafana/dskit/modules.(*Manager).initModule(0xc000d2e6f0, {0x7ffe36edcb45, 0xd}, 0xc0027a22f8, 0xc0013ce960) /home/christian/sandbox/grafana/loki/vendor/github.com/grafana/dskit/modules/modules.go:136 +0x1ea github.com/grafana/dskit/modules.(*Manager).InitModuleServices(0xc000d2e6f0, {0xc000dbeed0, 0x1, 0x7510c18f88e2e5ce?}) /home/christian/sandbox/grafana/loki/vendor/github.com/grafana/dskit/modules/modules.go:108 +0xe8 github.com/grafana/loki/v3/pkg/loki.(*Loki).Run(0xc002984008, {0x0?, {0x4?, 0x2?, 0x6457fc0?}}) /home/christian/sandbox/grafana/loki/pkg/loki/loki.go:497 +0x97 main.main() /home/christian/sandbox/grafana/loki/cmd/loki/main.go:129 +0x131e ```` This is because `t.indexGatewayRingManager` is not nil and therefore incorrectly tries to initialize the ring watcher, which fails. --- Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
- Loading branch information