You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Crash if get script of a resource returns unrenderable unicode characters. #9205
If the JSON payload returned by the get script of a resource contains a unicode character that cannot be rendered, then Concourse fails the corresponding build.
This bug has been reported against the github-release-resource but it is probably an issue with Concourse itself.
Steps to reproduce
There are reproduction steps on the github-release-resource issue linked above.
Expected results
Build continues
Actual results
Build fails, with error: set label: grpc: error while marshaling: string field contains invalid UTF-8: unknown
Triaging info
Concourse version: 7.12.1
Browser (if applicable): Chrome
Did this used to work? No
Reacted by Tom Denley, sdwood992, Rachel Westmacott and alanforr
What runtime is your worker using? containerd or guardian?
Because of the reference to grpc in the error I'd guess you're using containerd. If that's the case, I wonder if the issue might actually be with a containerd mechanism we're using?
But we can't change the type SetLabels() takes from string to []byte, we don't own that function.
Off-the-cuff here, I'm thinking this might be a misuse on our part of the container labels feature from containerd. Probably not meant to store large user data like this. Not sure if there's a better way to do this.
It seems like the only thing we could reasonably do is try stripping any non-UTF-8 characters out before setting the label.
Activity
taylorsilva commentedon May 22, 2025
What runtime is your worker using? containerd or guardian?
Because of the reference to
grpcin the error I'd guess you're using containerd. If that's the case, I wonder if the issue might actually be with a containerd mechanism we're using?Error appears to come from here:
concourse/worker/runtime/container.go
Lines 240 to 243 in 05fce13
scarytom commentedon May 22, 2025
we are using containerd.
taylorsilva commentedon May 22, 2025
Yeah I'm not sure how much control we have over this... The
SetLabels()comes straight from containerd.This SO seems relevant: https://stackoverflow.com/questions/76769291/error-while-using-proto-unmarshal-for-protocol-buffers-data-string-field-conta
But we can't change the type
SetLabels()takes fromstringto[]byte, we don't own that function.Off-the-cuff here, I'm thinking this might be a misuse on our part of the container labels feature from containerd. Probably not meant to store large user data like this. Not sure if there's a better way to do this.
It seems like the only thing we could reasonably do is try stripping any non-UTF-8 characters out before setting the label.
scarytom commentedon May 22, 2025
I agree it seems unlikely that the labels were intended to be anything more than simple string values
This seems like a sensible change, at least pending a more thorough investigation.