Fix TorrentRunner infinite crash loop on duplicate download path (#1033) - #1037
Open
websterwh wants to merge 1 commit into
Open
Fix TorrentRunner infinite crash loop on duplicate download path (#1033)#1037websterwh wants to merge 1 commit into
websterwh wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One unfetchable file in a multi-file torrent put TorrentRunner into a permanent crash loop (~8 exceptions/sec, 29 GB of logs reported). Root cause: when a download with RetryCount > 0 refreshed its link from the provider, UpdatePath could write a restricted link that already existed on a sibling row, violating the unique (TorrentId, Path) index. Because the scoped DataContext shares one change tracker per tick, every subsequent save replayed the failed update — so the download could never be marked errored and TaskRunner hot-looped forever.
Changes:
SQLite Error 19: 'FOREIGN KEY constraint failed'.with lockup #906