Repository navigation
fix: print a failed exit wait after the client's error trailer - #8362
Merged
oferchen merged 1 commit intoNov 11, 2026
Merged
Conversation
On a client, 3.5.1's _exit_cleanup() calls log_exit() before noop_io_until_death() (cleanup.c:221-253). So when the wait for the daemon's exit fails, its `read error` or `io timeout` line comes after the `rsync error:` trailer of the failure that started it. oc printed the wait's line from inside the transfer, before core built the trailer. The transfer now carries the failed wait out behind the error that ended it. Core splits the two apart, classifies the error as before, and attaches the wait's line to the report. The CLI prints that line after the trailer: with the program-name prefix for a read error (log.c:483-500), and as-is for a timeout. Task 639.
oferchen
force-pushed
the
fix/client-trailer-before-wait
branch
from
November 10, 2026 21:59
0b7022e to
c72bead
Compare
oferchen
added a commit
that referenced
this pull request
Nov 11, 2026
On a client, 3.5.1's _exit_cleanup() calls log_exit() before noop_io_until_death() (cleanup.c:221-253). So when the wait for the daemon's exit fails, its `read error` or `io timeout` line comes after the `rsync error:` trailer of the failure that started it. oc printed the wait's line from inside the transfer, before core built the trailer. The transfer now carries the failed wait out behind the error that ended it. Core splits the two apart, classifies the error as before, and attaches the wait's line to the report. The CLI prints that line after the trailer: with the program-name prefix for a read error (log.c:483-500), and as-is for a timeout. Task 639.
oferchen
added a commit
that referenced
this pull request
Nov 11, 2026
On a client, 3.5.1's _exit_cleanup() calls log_exit() before noop_io_until_death() (cleanup.c:221-253). So when the wait for the daemon's exit fails, its `read error` or `io timeout` line comes after the `rsync error:` trailer of the failure that started it. oc printed the wait's line from inside the transfer, before core built the trailer. The transfer now carries the failed wait out behind the error that ended it. Core splits the two apart, classifies the error as before, and attaches the wait's line to the report. The CLI prints that line after the trailer: with the program-name prefix for a read error (log.c:483-500), and as-is for a timeout. Task 639.
oferchen
added a commit
that referenced
this pull request
Nov 11, 2026
On a client, 3.5.1's _exit_cleanup() calls log_exit() before noop_io_until_death() (cleanup.c:221-253). So when the wait for the daemon's exit fails, its `read error` or `io timeout` line comes after the `rsync error:` trailer of the failure that started it. oc printed the wait's line from inside the transfer, before core built the trailer. The transfer now carries the failed wait out behind the error that ended it. Core splits the two apart, classifies the error as before, and attaches the wait's line to the report. The CLI prints that line after the trailer: with the program-name prefix for a read error (log.c:483-500), and as-is for a timeout. Task 639.
oferchen
added a commit
that referenced
this pull request
Nov 11, 2026
On a client, 3.5.1's _exit_cleanup() calls log_exit() before noop_io_until_death() (cleanup.c:221-253). So when the wait for the daemon's exit fails, its `read error` or `io timeout` line comes after the `rsync error:` trailer of the failure that started it. oc printed the wait's line from inside the transfer, before core built the trailer. The transfer now carries the failed wait out behind the error that ended it. Core splits the two apart, classifies the error as before, and attaches the wait's line to the report. The CLI prints that line after the trailer: with the program-name prefix for a read error (log.c:483-500), and as-is for a timeout. Task 639.
oferchen
added a commit
that referenced
this pull request
Nov 11, 2026
On a client, 3.5.1's _exit_cleanup() calls log_exit() before noop_io_until_death() (cleanup.c:221-253). So when the wait for the daemon's exit fails, its `read error` or `io timeout` line comes after the `rsync error:` trailer of the failure that started it. oc printed the wait's line from inside the transfer, before core built the trailer. The transfer now carries the failed wait out behind the error that ended it. Core splits the two apart, classifies the error as before, and attaches the wait's line to the report. The CLI prints that line after the trailer: with the program-name prefix for a read error (log.c:483-500), and as-is for a timeout. Task 639.
oferchen
added a commit
that referenced
this pull request
Nov 11, 2026
On a client, 3.5.1's _exit_cleanup() calls log_exit() before noop_io_until_death() (cleanup.c:221-253). So when the wait for the daemon's exit fails, its `read error` or `io timeout` line comes after the `rsync error:` trailer of the failure that started it. oc printed the wait's line from inside the transfer, before core built the trailer. The transfer now carries the failed wait out behind the error that ended it. Core splits the two apart, classifies the error as before, and attaches the wait's line to the report. The CLI prints that line after the trailer: with the program-name prefix for a read error (log.c:483-500), and as-is for a timeout. Task 639.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #8357 (base
fix/error-exit-echo-drain); it retargets to master once #8357 lands.Summary
On a client, rsync 3.5.1's _exit_cleanup() calls log_exit() before noop_io_until_death() (cleanup.c:221-253). So when the wait for the daemon's exit fails, its
read error(io.c:918-925) orio timeout(io.c:261-262) line comes after the client's ownrsync error:trailer. oc printed it from inside the transfer, before core built the trailer.drain_until_peer_exitsreturns anExitWaitFailure:ReadError("[who] read error: ...")orTimeout("[who] io timeout ...").log_line(), which adds thersync:prefix.after_exit_wait). The wrapper keeps that error's kind.map_server_transfer_errorsplits the wait off withtransfer::split_exit_wait. It classifies the error exactly as before (classify_server_transfer_error) and attaches the line to theClientError(followed_by_exit_wait).emit_error_reportprints that line after the trailer, and also when the trailer is suppressed after a peer'sMSG_ERROR_EXIT.program_line(log.c:483-500).Evidence
Replayed daemon at protocol 31 against the 3.5.1 tarball build. The daemon sends a one-entry file list, the client's destination-root mkdir fails, and the daemon reads the client's MSG_ERROR_EXIT and resets the connection.
3.5.1 prints:
oc now prints the same three lines in the same order. Before, the
read errorline came first.a_failed_wait_for_the_daemon_prints_after_the_trailer(crates/transfer/tests/daemon_pull_unexpected_close_byte_count.rs, Linux) pins it, keyed on frame bytes and the reset.Residuals
announce_error_exitgrades the error withrerr_for_io_errorwhile core classifies it separately. This shares a root with fix: report a failed destination-root mkdir as RERR_FILEIO on every path #8344 / task 611.--no-msgs2stderrresidual), so only that path needs the split.Test plan
python3 tools/ci/check_rustfmt_all.pycargo nextest run -p transfer --all-features(daemon_pull_unexpected_close_byte_count, error_exit): 29 passedcargo nextest run -p core -p cli --all-features(daemon, summary, error, exit filters): 992 passed