Skip to content

fix(transfer,engine): revert parallel-receive-delta default-on (PIP-7 receiver corruption) - #4725

Merged
oferchen merged 1 commit into
masterfrom
fix/pip-7-revert-parallel-default-receiver-corruption
May 22, 2026
Merged

oferchen merged 1 commit into
masterfrom
fix/pip-7-revert-parallel-default-receiver-corruption

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

URGENT regression fix. PIP-4 (#4720) added the parallel-threshold-trip interop scenario that crosses PARALLEL_RECEIVE_FILE_COUNT_THRESHOLD = 100. That scenario exposed a real corruption bug: the receiver writes wrong bytes for the first dispatched file (parallel_threshold/file_1.txt) whenever a transfer trips the parallel-receive-delta dispatch path.

Failure mode (both directions of the matrix):

parallel-threshold: content mismatch for parallel_threshold/file_1.txt

Because PIP-5 (#4666) flipped parallel-receive-delta into the default feature set across cli, core, transfer, and engine, stock cargo build --release corrupts data on any transfer of more than 100 files. This is a shipping bug, not a test bug.

The master CI run that reproduced the failure on commit bc1476c (the PIP-4 merge) is at https://github.com/oferchen/rsync/actions/runs/26279354408.

This PR ships the immediate mitigation so default builds are safe again while PIP-7 investigates the receiver-side corruption.

Changes (4 parts)

  1. Revert PIP-5 default-on. Removed parallel-receive-delta from default = [...] in workspace Cargo.toml, crates/transfer/Cargo.toml, and crates/engine/Cargo.toml. The feature stays defined and remains opt-in via --features parallel-receive-delta for testing. ParallelDeltaApplier, dispatch_receiver_strategy(), enable_parallel_receive_delta(), and the OC_RSYNC_FORCE_PARALLEL debug knob are intentionally retained.
  2. Remove the failing interop scenario. Deleted the parallel-threshold-trip matrix entry from tools/ci/run_interop.sh along with its setup, cleanup, and verify branches. The threshold constants in crates/transfer/src/receiver/mod.rs stay in place; only the scenario that trips them is removed pending the PIP-7 fix.
  3. Add tracking design doc. docs/design/pip-7-parallel-receive-delta-receiver-corruption-2026-05-22.md captures status, symptom, reproduction, suspected locations (crates/engine/src/concurrent_delta/parallel_apply.rs and crates/transfer/src/delta_pipeline/parallel.rs), required investigation steps (tcpdump on up: direction, slot-map instrumentation, serialised-first-batch diagnostic), and acceptance criteria for re-promotion.
  4. Flag shipped claims. Added DEFERRED-pending-PIP-7 notes to README.md (feature table row), CHANGELOG.md (PIP-4 entry), docs/design/parallel-receive-delta-default-on.md, docs/design/pip-4-closure-2026-05-21.md, and docs/design/br-6-sign-off-check-in-2026-05-21.md so the shipped claims no longer read as if default builds exercise the parallel receive-delta path.

Test plan

  • CI required checks pass (fmt+clippy, nextest stable, Windows stable, macOS stable, Linux musl stable).
  • Interop workflow no longer runs the removed parallel-threshold-trip scenario.
  • bash -n tools/ci/run_interop.sh is clean (verified locally).
  • Spot-check that --features parallel-receive-delta still compiles when opted into (deferred to CI matrix; nothing in the feature definition itself changes).

… receiver corruption)

PIP-4 (#4720) added the `parallel-threshold-trip` interop scenario that
crosses `PARALLEL_RECEIVE_FILE_COUNT_THRESHOLD = 100` and exposed a real
corruption bug: the receiver writes wrong bytes for the first dispatched
file (`parallel_threshold/file_1.txt`) whenever a transfer trips the
parallel-receive-delta dispatch path. The bug reproduces on stock
`cargo build --release` because PIP-5 (#4666) flipped the feature into
the default set across the workspace.

This PR ships the immediate mitigation so default builds are safe again
while PIP-7 investigates the receiver-side corruption:

1. Remove `parallel-receive-delta` from `default = [...]` in the
   workspace `Cargo.toml`, `crates/transfer/Cargo.toml`, and
   `crates/engine/Cargo.toml`. The feature stays defined and remains
   opt-in via `--features parallel-receive-delta` for testing.
2. Remove the `parallel-threshold-trip` matrix entry from
   `tools/ci/run_interop.sh` along with its setup, cleanup, and verify
   branches. The threshold constants in `receiver/mod.rs` stay in place.
3. Add `docs/design/pip-7-parallel-receive-delta-receiver-corruption-2026-05-22.md`
   tracking the open investigation, suspected locations
   (`crates/engine/src/concurrent_delta/parallel_apply.rs` and
   `crates/transfer/src/delta_pipeline/parallel.rs`), reproduction
   recipe, and acceptance criteria for re-promotion.
4. Flag the deferred-pending-PIP-7 status in `README.md`,
   `CHANGELOG.md`, `docs/design/parallel-receive-delta-default-on.md`,
   `docs/design/pip-4-closure-2026-05-21.md`, and
   `docs/design/br-6-sign-off-check-in-2026-05-21.md` so the shipped
   claims no longer read as if default builds exercise the parallel
   receive-delta path.

The `ParallelDeltaApplier`, `dispatch_receiver_strategy()`,
`enable_parallel_receive_delta()`, and the `OC_RSYNC_FORCE_PARALLEL`
debug env knob from PIP-4 are intentionally retained; they remain
reachable when the feature is opted into so the PIP-7 investigation can
iterate against them.
@github-actions github-actions Bot added the bug Something isn't working label May 22, 2026
@oferchen
oferchen merged commit 531e88d into master May 22, 2026
64 of 65 checks passed
@oferchen
oferchen deleted the fix/pip-7-revert-parallel-default-receiver-corruption branch May 22, 2026 10:28
oferchen added a commit that referenced this pull request May 22, 2026
…dentity assertion (PIP-9.c)

Reintroduce the parallel-threshold-trip regression coverage that PR #4725
removed when it reverted the parallel-receive-delta default-on flip after
PIP-4 (#4720) surfaced receiver corruption on file_1.txt under dist-profile
builds (LTO + panic=abort).

The new tests/parallel_threshold_trip.rs runs a local-mode recursive
transfer of 120 deterministically seeded 16 KiB files under
parallel_threshold/file_N.txt (the same shape the deleted scenario used in
tools/ci/run_interop.sh) and asserts byte identity via SHA-256 on every
file, with file_1.txt called out explicitly first so a future regression
of the original corruption is unambiguous.

The test passes on master HEAD because the sequential receiver path is
correct; once PIP-9.b wires the parallel applier into production it will
catch any regression of the PIP-4 corruption. Test name starts with
parallel_threshold_ so the dist-profile CI cell from PIP-9.d can filter
via nextest -E 'test(parallel_threshold)'.

Payload generation uses an inline xorshift64* PRNG seeded by a fixed
constant XORed with the file index, mirroring the existing pattern in
tests/inc_recurse_sender_fuzz_1863.rs. No new external dependencies; the
checksums dev-dep already exposes a Sha256 helper used by other workspace
tests.

Refs: docs/design/pip-9-parallel-receive-delta-wire-up-2026-05-22.md
oferchen added a commit that referenced this pull request May 22, 2026
…dentity assertion (PIP-9.c) (#4738)

Reintroduce the parallel-threshold-trip regression coverage that PR #4725
removed when it reverted the parallel-receive-delta default-on flip after
PIP-4 (#4720) surfaced receiver corruption on file_1.txt under dist-profile
builds (LTO + panic=abort).

The new tests/parallel_threshold_trip.rs runs a local-mode recursive
transfer of 120 deterministically seeded 16 KiB files under
parallel_threshold/file_N.txt (the same shape the deleted scenario used in
tools/ci/run_interop.sh) and asserts byte identity via SHA-256 on every
file, with file_1.txt called out explicitly first so a future regression
of the original corruption is unambiguous.

The test passes on master HEAD because the sequential receiver path is
correct; once PIP-9.b wires the parallel applier into production it will
catch any regression of the PIP-4 corruption. Test name starts with
parallel_threshold_ so the dist-profile CI cell from PIP-9.d can filter
via nextest -E 'test(parallel_threshold)'.

Payload generation uses an inline xorshift64* PRNG seeded by a fixed
constant XORed with the file index, mirroring the existing pattern in
tests/inc_recurse_sender_fuzz_1863.rs. No new external dependencies; the
checksums dev-dep already exposes a Sha256 helper used by other workspace
tests.

Refs: docs/design/pip-9-parallel-receive-delta-wire-up-2026-05-22.md
oferchen added a commit that referenced this pull request Aug 24, 2026
… receiver corruption) (#4725)

PIP-4 (#4720) added the `parallel-threshold-trip` interop scenario that
crosses `PARALLEL_RECEIVE_FILE_COUNT_THRESHOLD = 100` and exposed a real
corruption bug: the receiver writes wrong bytes for the first dispatched
file (`parallel_threshold/file_1.txt`) whenever a transfer trips the
parallel-receive-delta dispatch path. The bug reproduces on stock
`cargo build --release` because PIP-5 (#4666) flipped the feature into
the default set across the workspace.

This PR ships the immediate mitigation so default builds are safe again
while PIP-7 investigates the receiver-side corruption:

1. Remove `parallel-receive-delta` from `default = [...]` in the
   workspace `Cargo.toml`, `crates/transfer/Cargo.toml`, and
   `crates/engine/Cargo.toml`. The feature stays defined and remains
   opt-in via `--features parallel-receive-delta` for testing.
2. Remove the `parallel-threshold-trip` matrix entry from
   `tools/ci/run_interop.sh` along with its setup, cleanup, and verify
   branches. The threshold constants in `receiver/mod.rs` stay in place.
3. Add `docs/design/pip-7-parallel-receive-delta-receiver-corruption-2026-05-22.md`
   tracking the open investigation, suspected locations
   (`crates/engine/src/concurrent_delta/parallel_apply.rs` and
   `crates/transfer/src/delta_pipeline/parallel.rs`), reproduction
   recipe, and acceptance criteria for re-promotion.
4. Flag the deferred-pending-PIP-7 status in `README.md`,
   `CHANGELOG.md`, `docs/design/parallel-receive-delta-default-on.md`,
   `docs/design/pip-4-closure-2026-05-21.md`, and
   `docs/design/br-6-sign-off-check-in-2026-05-21.md` so the shipped
   claims no longer read as if default builds exercise the parallel
   receive-delta path.

The `ParallelDeltaApplier`, `dispatch_receiver_strategy()`,
`enable_parallel_receive_delta()`, and the `OC_RSYNC_FORCE_PARALLEL`
debug env knob from PIP-4 are intentionally retained; they remain
reachable when the feature is opted into so the PIP-7 investigation can
iterate against them.
oferchen added a commit that referenced this pull request Aug 24, 2026
…dentity assertion (PIP-9.c) (#4738)

Reintroduce the parallel-threshold-trip regression coverage that PR #4725
removed when it reverted the parallel-receive-delta default-on flip after
PIP-4 (#4720) surfaced receiver corruption on file_1.txt under dist-profile
builds (LTO + panic=abort).

The new tests/parallel_threshold_trip.rs runs a local-mode recursive
transfer of 120 deterministically seeded 16 KiB files under
parallel_threshold/file_N.txt (the same shape the deleted scenario used in
tools/ci/run_interop.sh) and asserts byte identity via SHA-256 on every
file, with file_1.txt called out explicitly first so a future regression
of the original corruption is unambiguous.

The test passes on master HEAD because the sequential receiver path is
correct; once PIP-9.b wires the parallel applier into production it will
catch any regression of the PIP-4 corruption. Test name starts with
parallel_threshold_ so the dist-profile CI cell from PIP-9.d can filter
via nextest -E 'test(parallel_threshold)'.

Payload generation uses an inline xorshift64* PRNG seeded by a fixed
constant XORed with the file index, mirroring the existing pattern in
tests/inc_recurse_sender_fuzz_1863.rs. No new external dependencies; the
checksums dev-dep already exposes a Sha256 helper used by other workspace
tests.

Refs: docs/design/pip-9-parallel-receive-delta-wire-up-2026-05-22.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant