Skip to content

The FreeBSD canary's own test suite eats the script that launched it - #1756

Merged
xroche merged 1 commit into
masterfrom
fix-freebsd-canary-stdin
Sep 23, 2026
Merged

xroche merged 1 commit into
masterfrom
fix-freebsd-canary-stdin

Conversation

@xroche

@xroche xroche commented Sep 23, 2026

Copy link
Copy Markdown
Owner

The weekly FreeBSD canary went red on 2026-09-23. It printed "testsuite: 464 passed of 510", then sh: Syntax error: Unterminated quoted string, and gave no verdict.

The action pipes this run: block to the remote sh on stdin. sh reads that pipe a buffer at a time, so its unread tail still sits there when make check starts httrack. httrack reads stdin and eats the tail, and sh resumes in the middle of a quoted word.

The su that launches the suite now reads /dev/null. I reproduced the mechanism with dash: a piped script longer than the read buffer loses everything after the first child that reads stdin. It keeps that tail once the child gets </dev/null.

vmactions/freebsd-vm pipes the `run:` block to the remote `sh` on
stdin. `sh` reads it a buffer at a time, so the unread tail is still
sitting in the pipe while the earlier commands run. `make check` runs
httrack, httrack reads stdin, and the bytes it swallows are the rest of
the canary's own script.

The 2026-09-23 run echoed "testsuite: 464 passed of 510" and then died
with "sh: Syntax error: Unterminated quoted string": `sh` came back for
more input and resumed in the middle of a quoted word. The verdict the
canary exists to give was never reached.

Redirecting the `su` that launches the suite from /dev/null leaves the
pipe untouched. Reproduced with dash: a script longer than the read
buffer, piped to the shell, loses everything after the first child that
reads stdin, and keeps it when that child gets `</dev/null`.

Signed-off-by: Xavier Roche <xroche@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
@xroche
xroche enabled auto-merge (squash) September 23, 2026 05:21
@xroche
xroche merged commit fadc0be into master Sep 23, 2026
38 checks passed
@xroche
xroche deleted the fix-freebsd-canary-stdin branch September 23, 2026 05:36
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