Skip to content

fix(ci): make the nightly OCI job robust to TCG login flakiness - #141

Merged
hodgesds merged 1 commit into
mainfrom
oci-fixes
Aug 10, 2026
Merged

fix(ci): make the nightly OCI job robust to TCG login flakiness#141
hodgesds merged 1 commit into
mainfrom
oci-fixes

Conversation

@hodgesds

Copy link
Copy Markdown
Owner

The nightly-oci job has never passed. Both failure modes are TCG-timing artifacts, not functional bugs — the OCI smoke runs clean end-to-end under KVM (login as root, unshare namespaces, chroot, exec the entrypoint, and emit oci-uts-isolated).

Mode 1 (the common one): machine-speed login keystrokes garble under slow TCG — a byte-reordering race in the console line discipline turns root into e.g. orot — so getty prints "Login incorrect" while the harness blindly waits out the full 900s prompt timeout for a narf> that never comes. run-interactive's Stage 0 now retries the credential exchange (up to 8 attempts), resyncing on getty's re-prompt and fast-failing on "Login incorrect" instead of waiting for "Welcome"; it also types the login a bit slower (25ms vs 5ms per byte) to reduce the garble in the first place. Even a lost newline recovers, since the next attempt's bytes complete the stuck line.

Mode 2 (rarer): a flaky TCG-only #UD right after the shell prompt that QEMU exits on. That fails fast (stdout EOF), so the workflow now passes --retries 3 — a cheap re-boot clears the flake while a genuine break still fails every attempt.

Validated: the smoke passes under KVM and twice under TCG (the CI configuration: no balloon, 2048 MB, 900s timeouts) with the reworked login.

The nightly-oci job has never passed. Both failure modes are TCG-timing
artifacts, not functional bugs — the OCI smoke runs clean end-to-end
under KVM (login as root, unshare namespaces, chroot, exec the
entrypoint, and emit oci-uts-isolated).

Mode 1 (the common one): machine-speed login keystrokes garble under
slow TCG — a byte-reordering race in the console line discipline turns
`root` into e.g. `orot` — so getty prints "Login incorrect" while the
harness blindly waits out the full 900s prompt timeout for a `narf> `
that never comes. run-interactive's Stage 0 now retries the credential
exchange (up to 8 attempts), resyncing on getty's re-prompt and
fast-failing on "Login incorrect" instead of waiting for "Welcome"; it
also types the login a bit slower (25ms vs 5ms per byte) to reduce the
garble in the first place. Even a lost newline recovers, since the next
attempt's bytes complete the stuck line.

Mode 2 (rarer): a flaky TCG-only #UD right after the shell prompt that
QEMU exits on. That fails fast (stdout EOF), so the workflow now passes
--retries 3 — a cheap re-boot clears the flake while a genuine break
still fails every attempt.

Validated: the smoke passes under KVM and twice under TCG (the CI
configuration: no balloon, 2048 MB, 900s timeouts) with the reworked
login.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@hodgesds
hodgesds merged commit cc2f475 into main Aug 10, 2026
24 of 26 checks passed
@hodgesds
hodgesds deleted the oci-fixes branch August 11, 2026 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant