Skip to content

Remove local StringFileWriter workaround once buildbot ships the upstream fix #372

Description

@alexreinking

Background

master/custom_steps.py has a local _BytesFileWriter / getFileBytesFromWorker that sidesteps a buildbot bug: StringFileWriter decodes each 32KB transfer chunk independently as UTF-8, so a multi-byte character split across a chunk boundary (or any invalid/mixed-encoding byte sequence) raises UnicodeDecodeError from inside a Twisted PB handler. That exception escapes buildbot's normal command-failure path, so the affected CTest step's deferred never fires and the build hangs forever, pinning the worker's performance_lock and starving other builds.

Added in #371 (commit d17cbc5).

Upstream fix

Filed and fixed upstream: buildbot/buildbot#9166, which fixes buildbot/buildbot#3982 by decoding StringFileWriter incrementally (codecs.getincrementaldecoder) instead of per-chunk.

Action item

Once a released version of buildbot (i.e. a version publishable to PyPI, not just merged to its master) contains that fix:

  1. Bump the buildbot/buildbot-worker pins in pyproject.toml to that version.
  2. Remove _BytesFileWriter and getFileBytesFromWorker from master/custom_steps.py, and revert CTest.run() to call getFileContentFromWorker (buildbot's own, now-fixed, StringFileWriter-based method) instead.
  3. Confirm ctest steps involving non-ASCII output (e.g. failing test names/messages with accented characters) still parse correctly.

Until then, keep the workaround — the upstream bug is still open in the currently-pinned buildbot 4.3.0, with no released fix available yet.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions