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:
- Bump the
buildbot/buildbot-worker pins in pyproject.toml to that version.
- 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.
- 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.
Background
master/custom_steps.pyhas a local_BytesFileWriter/getFileBytesFromWorkerthat sidesteps a buildbot bug:StringFileWriterdecodes 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) raisesUnicodeDecodeErrorfrom inside a Twisted PB handler. That exception escapes buildbot's normal command-failure path, so the affectedCTeststep's deferred never fires and the build hangs forever, pinning the worker'sperformance_lockand starving other builds.Added in #371 (commit d17cbc5).
Upstream fix
Filed and fixed upstream: buildbot/buildbot#9166, which fixes buildbot/buildbot#3982 by decoding
StringFileWriterincrementally (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 itsmaster) contains that fix:buildbot/buildbot-workerpins inpyproject.tomlto that version._BytesFileWriterandgetFileBytesFromWorkerfrommaster/custom_steps.py, and revertCTest.run()to callgetFileContentFromWorker(buildbot's own, now-fixed,StringFileWriter-based method) instead.cteststeps 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.