send keepalives during checksum operations in daemon mode#840
Conversation
|
@tenox7 I reproduced #839 from your description and dug into the mechanism — your diagnosis (keepalives during the checksum pass) is right. Two things I found while testing this patch, which I thought were worth passing on: 1. The 5-second interval means it doesn't fix the case in the report. I applied this PR and re-ran a reproducer (single 2 GiB file in a daemon module, ~4.3s to hash):
With 2. The The good news is rsync already has exactly the right primitive: I've put that up as #1031, with the tick folded into a single loop shared by all six digests (this file has six copies of the same chunk loop, which is why this PR had to patch each one). It's verified digest-identical to master in both directions across the chunk-boundary sizes. Full credit to you for the report and for spotting that keepalives were the answer — please take anything useful from it, or say the word if you'd rather fold the interval change into this PR instead and I'll close mine. |
This is an experimental PR that helps to prevent timeouts during file list generation with
--checksum.Even with
--timeout=xxxfar exceeding file list generation time, both client and server end up stuck atpselect6()forever. I have triedSO_KEEPALIVEand all combinations of partial/whole recursive, non-recursive, etc etc. Nothing really helps.I have NOT extensively tested it, but it resolves my issue #839.