-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
thanos tools bucket rewrite
fails with a segmentation violation on v0.36.0 and later of thanos.
#7844
Comments
Hey, @chris-barbour-as! I'm here to help you with any bugs, questions, or contributions you have. Let's work together to solve this issue. The segmentation violation you're encountering with the To address this issue, you might consider the following steps:
If the issue persists, it might be beneficial to report it to the Thanos maintainers with the details you've provided, including the specific JSON structure that triggers the error. |
Possible this is related to: #7338 |
@chris-barbour-as The issue here is that We can either change Prometheus or switch to use jsoniter in Thanos so that we can add our own encoding/decoding function to |
I created prometheus/prometheus#15383 which should fix this issue. |
Thanos, Prometheus and Golang version used:
[email protected]
[email protected]
Also tested with:
thanos@main (v0.35.2-0.20241017120053-731e4607d34a according to go.mod)
[email protected]
Confirmed issue does not affect:
[email protected]
Object Storage Provider:
FILESYSTEM
What happened:
Starting with v0.36.0
thanos tools bucket rewrite
fails with a Segmentation Violation while attempting to write the new block back to the store.What you expected to happen:
thanos tools bucket rewrite
should not fail with a Segmentation ViolationHow to reproduce it (as minimally and precisely as possible):
Attached go code will reproduce error.
My specific command invocation is as follows:
thanos tools bucket rewrite --objstore.config-file=objstore-local.yaml --rewrite.to-relabel-config-file=relabel-config.yaml --no-dry-run --delete-blocks --id "01HCGZPEM6EEHJ75218N914HNM" --tmp.dir="/home/appuser/data/thanos-rewrite"
objstore-local.yaml:
relabel-config.yaml:
However, the attached code will reproduce the issue by simply running:
go get
go run main.go
Full logs to relevant components:
Anything else we need to know:
The issue is specifically related to the helpful information that
thanos tools bucket rewrite
adds to the updated block's meta.json file.The following JSON can be used to reproduce the problem:
Removing
"Regex": "foo",
will make the problem go away. See attached code.thanos-rewrites-segv.tar.gz
The text was updated successfully, but these errors were encountered: