marfrit-publish reports false-positive failure on scp clean-shutdown #4
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
/usr/local/bin/marfrit-publishon boltzmann reports "Connection closed" and exits non-zero immediately after the scp upload to hertz, even when the upload completed successfully. The hertz-side step (/opt/herding/bin/marfrit-publish-arch) is then never invoked, leaving the package staged inhertz:/tmp/but not signed/repo-add'd/rsync'd.Reproduce
On boltzmann, with a freshly-built package:
Output:
Exit non-zero.
Underlying
scp -vagainst the same target shows the file is fully transferred (Transferred: sent 2513440, received 5940 bytes ... Exit status 0) — the "Connection closed" is just sftp's normal subsystem shutdown, not an error. The script is treating it as one.Workaround used in this case: re-run the hertz-side step manually:
That published cleanly on first try.
Likely fix
marfrit-publishprobably runsscp ... 2>&1and greps the stderr for "closed" or relies on a non-zero exit from a sub-process that's not the actual scp. Either:${PIPESTATUS[0]}of the scp specifically, orrsync -e sshwhich has cleaner exit-status semantics, orImpact
Low — the workaround is one ssh away. But every
marfrit-publishinvocation today has hit this, so it eats one extra command per publish. Worth ~10 minutes to fix.Context
Discovered while publishing
vulkan-panfrost-1:26.0.5-1-aarch64from the fourier campaign (2026-04-29 evening session). Same pattern hit the firefox-fourier and kwin-fourier publishes too, per the his agent's session notes from earlier the same evening.Root cause found
The "Connection closed" is not just a false positive — for filenames containing a colon (epoch-versioned packages like
qt6-base-1:6.11.0-2-...),scpparses the colon as ahost:pathseparator and tries to treatqt6-base-1as a remote host. The connection then refuses, scp aborts mid-transfer, and the file does NOT land on hertz.Repro on boltzmann:
For the earlier
vulkan-panfrost-1:26.0.5-1-...case, the file did transfer despite the warning — that turned out to bersyncsemantics (or the way the shell quoted that specific filename). Withscpdirectly and a colon-bearing filename, the transfer always fails.Fix
Either:
marfrit-publish, prefix the source argument with./to defeat scp host:path parsing:--separator if scp version supports it.rsync -e ssh --which has cleaner argument handling.Option 1 is one line. Option 3 is cleaner long-term and would also fix the false-positive-on-clean-shutdown sub-issue.
Verified workaround
Manual scp from boltzmann with
./prefix worked forqt6-base-1:6.11.0-2-aarch64.pkg.tar.zstandqt6-xcb-private-headers-1:6.11.0-2-aarch64.pkg.tar.zstthis evening; both published cleanly via the hertz step after that.Fixed in
/usr/local/bin/marfrit-publishon boltzmann 2026-05-17 (option 1 from the analysis above):The
caseprefixes relative paths with./(absolute paths pass through unchanged) so scp can never misparse a:inside the filename as ahost:pathseparator. Verified live during the kwin-fourier 6.6.5 and qt6-base-fourier 6.11.1 publishes that triggered the bug originally — both pushed cleanly without intervention.Memory entry covering the gotcha for future operators:
feedback_marfrit_publish_colon.mdin the noether memory store.Closing.