Query: Fix panic in ZLabelsToPromLabels due to unsafe pointer cast incompatible with stringlabels #8709
Open
coleenquadros wants to merge 5 commits intothanos-io:mainfrom
Open
Query: Fix panic in ZLabelsToPromLabels due to unsafe pointer cast incompatible with stringlabels #8709coleenquadros wants to merge 5 commits intothanos-io:mainfrom
coleenquadros wants to merge 5 commits intothanos-io:mainfrom
Conversation
Signed-off-by: Coleen Iona Quadros <coleen.quadros27@gmail.com>
Signed-off-by: Coleen Iona Quadros <coleen.quadros27@gmail.com>
Signed-off-by: Coleen Iona Quadros <coleen.quadros27@gmail.com>
Signed-off-by: Coleen Iona Quadros <coleen.quadros27@gmail.com>
c818861 to
d5bc5fe
Compare
GiedriusS
reviewed
Mar 11, 2026
Member
GiedriusS
left a comment
There was a problem hiding this comment.
It's a bit more involved. For starters, you can read https://giedrius.blog/2022/02/04/things-learned-from-trying-to-migrate-to-protobuf-v2-api-from-gogoprotobuf-so-far/ or look through my previous PRs on this repo. I personally think we need to handwrite the marshaling/unmarshaling functions that construct labels.Labels directly, and then return the used memory to a pool on query.Close(). Feel free to jump onto the CNCF slack to discuss further.
Contributor
Author
|
@GiedriusS however is this failure/panic specific to a set up? I was using v0.41.0 version and the query, query frontend pods were crashlooping on bring up |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
[]ZLabel(slice of structs) andlabels.Labelsviaunsafe.Pointer, which broke when Prometheus v0.308.0 changedlabels.Labelsfrom a slice-of-structs to a compact string encoding (stringlabels)panic: runtime error: index out of range [108] with length 1atlabels_stringlabels.go:decodeSizeChanges
Verification