-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(blooms): Fix panic in initialisation of the bloom planner and builder #14110
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
chaudum
added
type/bug
Somehing is not working as expected
backport k218
backport k219
labels
Sep 11, 2024
This PR must be merged before a backport PR will be created. |
2 similar comments
This PR must be merged before a backport PR will be created. |
This PR must be merged before a backport PR will be created. |
salvacorts
approved these changes
Sep 11, 2024
grafanabot
pushed a commit
that referenced
this pull request
Sep 11, 2024
…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> (cherry picked from commit 8307c42)
Merged
7 tasks
grafanabot
pushed a commit
that referenced
this pull request
Sep 11, 2024
…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> (cherry picked from commit 8307c42)
Merged
7 tasks
This was referenced Oct 14, 2024
This was referenced Oct 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
The targets
bloom-planner
andbloom-builder
panic at startup on branchmain
.This is because
t.indexGatewayRingManager
is not nil and therefore incorrectly tries to initialize the ring watcher, which fails.Checklist
CONTRIBUTING.md
guide (required)feat
PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.docs/sources/setup/upgrade/_index.md
production/helm/loki/Chart.yaml
and updateproduction/helm/loki/CHANGELOG.md
andproduction/helm/loki/README.md
. Example PRdeprecated-config.yaml
anddeleted-config.yaml
files respectively in thetools/deprecated-config-checker
directory. Example PR