Skip to content

anacrolix/torrent: Serve peerconn panic fix#20748

Merged
AskAlexSharov merged 1 commit intomainfrom
anacrolix/serve-peerconn-panic
Apr 23, 2026
Merged

anacrolix/torrent: Serve peerconn panic fix#20748
AskAlexSharov merged 1 commit intomainfrom
anacrolix/serve-peerconn-panic

Conversation

@anacrolix
Copy link
Copy Markdown
Contributor

@anacrolix anacrolix commented Apr 23, 2026

Addresses https://github.com/erigontech/erigon-qa/issues/403 in main. Needs to also be backported to 3.4.

Looks like a rare path where if there's an issue reading torrent data in order to serve a peer request, then an invariant was broken and triggered a logic panic. The fix ensures that on a bad read the invariants are maintained.

Make sure to trigger the first 2 workflows per the issue to verify.

@anacrolix anacrolix self-assigned this Apr 23, 2026
@anacrolix anacrolix requested a review from mriccobene April 23, 2026 05:38
@anacrolix
Copy link
Copy Markdown
Contributor Author

@anacrolix anacrolix force-pushed the anacrolix/serve-peerconn-panic branch from 43a11b8 to c7c82f9 Compare April 23, 2026 05:58
@anacrolix anacrolix marked this pull request as ready for review April 23, 2026 05:58
@anacrolix
Copy link
Copy Markdown
Contributor Author

QA workflows appear stuck, so I'm running manually from scratch on mainnet.

@AskAlexSharov AskAlexSharov added this pull request to the merge queue Apr 23, 2026
Merged via the queue into main with commit 2b1856f Apr 23, 2026
41 of 43 checks passed
@AskAlexSharov AskAlexSharov deleted the anacrolix/serve-peerconn-panic branch April 23, 2026 13:27
@anacrolix
Copy link
Copy Markdown
Contributor Author

Workflow failures seem to be unrelated. My local test passed. I'll move on to backporting.

AskAlexSharov pushed a commit that referenced this pull request Apr 24, 2026
Cherry-pick of #20748 to release/3.4.

Closes erigontech/erigon-qa#403 — a rare path where a bad read while
serving a peer request broke an invariant and triggered a logic panic.
The fix keeps invariants intact on bad reads.

Pulled in via bumps:
- `github.com/anacrolix/torrent` to the version containing the fix
- transitive `github.com/RoaringBitmap/roaring/v2` to v2.16.0 (required
by the new torrent version); drops unused indirect
`github.com/RoaringBitmap/roaring` v1

Make sure to trigger the first two workflows per the linked issue to
verify.
lupin012 pushed a commit that referenced this pull request Apr 24, 2026
Addresses erigontech/erigon-qa#403 in main.
Needs to also be backported to 3.4.

Looks like a rare path where if there's an issue reading torrent data in
order to serve a peer request, then an invariant was broken and
triggered a logic panic. The fix ensures that on a bad read the
invariants are maintained.

Make sure to trigger the first 2 workflows per the issue to verify.
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.

2 participants