Skip to content

Skip leeching from Transmission on Windows in the release gate - #44

Merged
ligenq merged 1 commit into
mainfrom
skip-windows-transmission-leech-gate
Nov 21, 2026
Merged

ligenq merged 1 commit into
mainfrom
skip-windows-transmission-leech-gate

Conversation

@ligenq

@ligenq ligenq commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Unblocks the 5.4.1 release. The Windows interop job has failed three release runs in a row on Leeching_FromTransmission_ReceivesTheWholeFile, and the cause is a Transmission defect, not ours.

Why

Transmission 4.1.x on Windows discards its unsent output when send() fails. tr-buffer.h compares the int result against 0U, so -1 counts as success, and the whole queue is drained while its RC4 keystream has already moved past those bytes. Everything after that decrypts to garbage on our side. This was diagnosed in d88363f and ffca401, against a patched Transmission build and against MonoTorrent. CI installs Transmission 4.1.4, which still has it.

A local run today showed the same thing: the stream desynchronised about 85 ms into each burst after Transmission unchoked us (Message size 555525743 exceeds limit, Invalid negative message length), and there were no hash failures on our side. In CI, about half of runs stall before the 10-minute timeout. That has been true of the scheduled interop runs since mid-September, on unchanged commits.

Change

  • Leeching_FromTransmission_ReceivesTheWholeFile skips on Windows unless PEERSHARP_TRANSMISSION_LEECH_ON_WINDOWS=1. The skip reason names the defect and the commits, so it shows up in the results file.
  • Linux CI still runs the leech test, where the comparison is correct. Seeding to Transmission still runs on Windows.
  • Test-only. No library or workflow changes.

Validation

  • dotnet format --verify-no-changes is clean, and the Release build with warnings as errors succeeds.
  • Locally on Windows with Transmission installed, the test reports as skipped with the reason above.

After merging

Run the Release workflow on main again. 5.4.1 has not been published: the earlier run stopped before the publish job.

🤖 Generated with Claude Code

Transmission 4.1.x on Windows discards its unsent output when send() fails:
tr-buffer.h compares the int result against 0U, so -1 counts as success and
the queue is drained while its RC4 keystream has already moved past those
bytes. Diagnosed in d88363f and ffca401 against a patched build and
MonoTorrent; CI's Transmission 4.1.4 still has it.

Each break drops our connection, and in about half of runs the 64 MiB
download stalls before its timeout. Since the interop job became a release
gate, that has failed three release runs in a row on a defect that is not
ours. The test now skips on Windows unless
PEERSHARP_TRANSMISSION_LEECH_ON_WINDOWS=1. Linux CI still runs it, and
seeding to Transmission still runs on Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ligenq
ligenq merged commit bfddaad into main Nov 21, 2026
24 checks passed
@ligenq
ligenq deleted the skip-windows-transmission-leech-gate branch November 21, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant