Repository navigation
log: avoid recursive deletion-message overflow - #1130
Conversation
A quiet daemon receiver queued one MSG_DELETED per path until the generator hit --max-alloc, so skip names the client did not request. If requested output legitimately fills the queue, keep allocator error reporting from re-entering the same buffer and exhausting the stack. Preserve explicit deletion requests across the daemon max-verbosity clamp.
|
Thank you Andrew. |
|
Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head Thanks for this. The crash fix works: the new test segfaults on the base commit and passes with the PR, and a verbose --max-alloc overflow now logs one error and exits where base recursed and hung. One regression needs fixing before merge. The new gate in log_delete() (https://github.com/RsyncProject/rsync/pull/1130/files#diff-cac4c5e540bb96b16908efb139929424aa8065d1acaa0af3791e19aa775bbf42R998) means a server only sends MSG_DELETED when the client asked for stdout deletion output. But the client also uses those messages to write '*deleting' lines to its own --log-file. So a plain Minor, no action needed: once the guard at https://github.com/RsyncProject/rsync/pull/1130/files#diff-92194f057884b3287a3a6bf84e6e3b2bf433a556b68562799252a091744e7854R1099 trips on a fatal allocation it stays set, so the client sees a generic code 12 while the daemon log shows the real code 22. It's still a clear improvement on the crash. |
A quiet daemon receiver queued one MSG_DELETED per path until the generator hit --max-alloc, so skip names the client did not request. If requested output legitimately fills the queue, keep allocator error reporting from re-entering the same buffer and exhausting the stack. Preserve explicit deletion requests across the daemon max-verbosity clamp.
I hit this bug during a large backup that needed to delete a few million files