Skip to content

Crash if get script of a resource returns unrenderable unicode characters. #9205

Closed

Description

@scarytom

Summary

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.

Image

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

Activity

  1. taylorsilva commented on May 22, 2025

    @taylorsilva
    Member

    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?

    Error appears to come from here:

    _, err = c.container.SetLabels(context.Background(), labelSet)
    if err != nil {
    return fmt.Errorf("set label: %w", err)
    }

  2. scarytom commented on May 22, 2025

    @scarytom
    Author

    What runtime is your worker using? containerd or guardian?

    we are using containerd.

  3. taylorsilva commented on May 22, 2025

    @taylorsilva
    Member

    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 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.

  4. moved this from Icebox to Backlog in Concourse Roadmapon May 22, 2025
  5. scarytom commented on May 22, 2025

    @scarytom
    Author

    might be a misuse on our part of the container labels feature from containerd

    I agree it seems unlikely that the labels were intended to be anything more than simple string values

    might be a misuse on our part of the container labels feature from containerd

    This seems like a sensible change, at least pending a more thorough investigation.

  6. moved this from Backlog to Icebox in Concourse Roadmapon Dec 2, 2025
  7. moved this from Icebox to In progress in Concourse Roadmapon Jan 20, 2026
  8. moved this from In progress to Done in Concourse Roadmapon Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions