Concurrent cross-seed matches to the same multi-file release share a non-unique hardlink destination path; failed add's cleanup deletes the successful sibling's files #2282
Replies: 2 comments 1 reply
1 reply
|
Fixed in #2287. The rollback after a failed add removed every path in the plan, not just what that attempt had created, so the redundant duplicate wiped the files of the torrent that was added a second earlier. EDIT: Unsolicited comment made by Opus 5 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Description
When two locally-scanned torrents independently match the same tracker release within about a second of each other, hardlink-mode cross-seeding for multi-file (season-pack) torrents builds both attempts' hardlink trees at the same destination folder, because that path isn't made unique per attempt/hash the way it is for single-file torrents (which get a
<filename>--<hash>suffix).The first attempt succeeds and adds the torrent to the download client. The second (redundant) attempt rebuilds hardlinks at the identical path, then fails to add with a client-side
conflicts detected: torrent(s) failed to be addederror. qui logs"Hardlink mode: failed to add torrent, aborting"for the failed attempt — and whatever cleanup runs on that abort appears to remove the shared destination folder, taking the first attempt's already-linked files with it.Net effect: the torrent shows as added in the client, but sits at 0% with "files missing", and the expected folder is completely absent on disk.
This looks related to the concurrent-processing path-collision issues discussed in #1589 (and PRs #1594, #1710, #1912) — possibly a same-tracker edge case that wasn't fully covered by those fixes, since here both attempts target the same tracker (Luminarr) rather than colliding across trackers.
Expected: A failed/aborted hardlink-mode add should never delete files belonging to a different, already-successfully-added torrent. Multi-file destinations should get the same per-attempt uniqueness single-file torrents already have, and abort/cleanup should log what it removes.
Actual: A successfully-added torrent's backing folder was deleted moments later by an unrelated failed duplicate attempt for the same release, silently (no cleanup/removal log line anywhere for this failure pattern).
Steps to reproduce
5478f80d…andc9f682c8…) both resolved to the same Luminarr candidate one second apart.linkDir/<Tracker>/<ReleaseName>/(8/8 files) and adds successfully to the client.conflicts detected: torrent(s) failed to be added.Environment
Relevant logs
Compare to single-file torrents, which get a
<filename>--<hash>suffix specifically to avoid path collisions, e.g.:The successful add, immediately followed one second later by the conflicting/aborted add for the same path:
All reactions