Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: generate peer-id on launch #5233

Merged
merged 1 commit into from Mar 16, 2023
Merged

Conversation

ckerr
Copy link
Member

@ckerr ckerr commented Mar 15, 2023

Fixes #5232.

Notes: Updated torrent Peer ID generation to happen once per session, even for public torrents.

edit: the root cause of OP's bug report appears to not be a Transmission bug. The PR is still worthwhile and harmless; but following strict semver, probably should not have been merged into the bugfix line since it's not a bugfix.

@ckerr ckerr added scope:core type:fix A bug fix semver:patch make backwards compatible bug fixes labels Mar 15, 2023
@ckerr ckerr merged commit 5cc3bf8 into main Mar 16, 2023
19 checks passed
@ckerr ckerr deleted the fix/5232-generate-peer-id-on-launch branch March 16, 2023 01:53
@Tockman
Copy link

Tockman commented Mar 16, 2023

I must specify that my issue is about changing first, fixed part of peer_id (TR4010-XXXXXX), not the random part (TR4010-XXXXXX)!

@transmission transmission deleted a comment from garoto Mar 18, 2023
@transmission transmission deleted a comment from Tockman Mar 18, 2023
@transmission transmission deleted a comment from Tockman Mar 18, 2023
@transmission transmission deleted a comment from Tockman Mar 18, 2023
@transmission transmission deleted a comment from Tockman Mar 18, 2023
@transmission transmission deleted a comment from Tockman Mar 18, 2023
@transmission transmission deleted a comment from Tockman Mar 18, 2023
@transmission transmission deleted a comment from Tockman Mar 18, 2023
@transmission transmission deleted a comment from Tockman Mar 18, 2023
@transmission transmission deleted a comment from Tockman Mar 18, 2023
@transmission transmission deleted a comment from Tockman Mar 18, 2023
@transmission transmission deleted a comment from Tockman Mar 18, 2023
@transmission transmission deleted a comment from Tockman Mar 18, 2023
@transmission transmission deleted a comment from Tockman Mar 18, 2023
@transmission transmission deleted a comment from Tockman Mar 18, 2023
@ckerr ckerr added type:perf A code change that improves performance and removed type:fix A bug fix labels Mar 18, 2023
@andreygursky
Copy link

edit: the root cause of OP's bug report appears to not be a Transmission bug.

Being curious, how this could happen. Provided Transmission sets the version in the fixed part correctly (which seems obvious) and the tracker uses exactly these 8 bytes (no other complaints), how the last could be different so often? One possible explanation: memory corruption in Transmission, which looks like has been fixed in 4.0.0.

@ckerr
Copy link
Member Author

ckerr commented Mar 18, 2023

NFI. There is something that doesn't add up and I think we either have incomplete or inaccurate info from somewhere. It's not productive to speculate where that's coming from, IMO.

Just for thinking out the hypothetical -- if it were some kind of memory corruption, we would see more feedback from more users. There is something unique going on here that doesn't add up.

@ckerr
Copy link
Member Author

ckerr commented Mar 18, 2023

Also if peer ID was being corrupted due to memory corruption, the tracker wouldn't be able to recognize it as Transmission

@andreygursky
Copy link

more feedback from more users

It looks like some very infrequent event (even for those "huge" 700 times it took several months), which one would only proving by running always Wireshark. Since on the other side just only one specific database design with a corresponding limitation made it visible, otherwise it went unnoticed.

the tracker wouldn't be able to recognize it as Transmission

Before writing the initial message, I've been thinking about it also. Until I realized, that the tracker got it explicitly just from "User Agent", which Transmission sets using CURLOPT_USERAGENT to "Transmission/SHORT_VERSION_STRING". This fact made me pretty sure, the tracker might indeed got garbage in the fixed part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:core semver:patch make backwards compatible bug fixes type:perf A code change that improves performance
Development

Successfully merging this pull request may close these issues.

generate torrent peer-ids on launch; do not periodically recycle
4 participants