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

libtorrent v2 creation broken #181

Closed
AlyoshaVasilieva opened this issue Jun 4, 2023 · 4 comments
Closed

libtorrent v2 creation broken #181

AlyoshaVasilieva opened this issue Jun 4, 2023 · 4 comments
Assignees
Labels
bug Something isn't working upstream issue Issue is caused by external sources

Comments

@AlyoshaVasilieva
Copy link

Repro:

$ head -c 1048575 </dev/urandom >1mb-1.bin
$ torrentfile -m --meta-version 3 -a udp://tracker.opentrackr.org:1337/announce -o 1mb-1.bin.v3.torrent 1mb-1.bin

Loading this torrent file into qBittorrent (v4.5.3 libtorrent 2.0.9) and hashing against 1mb-1.bin results in 98.4% progress, missing the last piece. (Pieces: 64 x 16.0 KiB (have 63))

$ torrentfile -m --meta-version 2 -a udp://tracker.opentrackr.org:1337/announce -o 1mb-1.bin.v2.torrent 1mb-1.bin

Loading this torrent file into qBittorrent and hashing against 1mb-1.bin results in 0% progress.

$ torrentfile -m --meta-version 1 -a udp://tracker.opentrackr.org:1337/announce -o 1mb-1.bin.v1.torrent 1mb-1.bin

Loading this torrent file into qBittorrent and hashing against 1mb-1.bin results in 100% progress.

Using torrentfile v0.9.0. It occurred on an earlier version but I didn't come up with a repro. I initially thought this was some kind of last-block issue, but as I wrote this report it seems more like a v2 issue.

@alexpdev
Copy link
Owner

alexpdev commented Jun 4, 2023

You are right... I am reproducing the same results. I will investigate further.

@alexpdev alexpdev self-assigned this Jun 4, 2023
@alexpdev alexpdev added the bug Something isn't working label Jun 4, 2023
@alexpdev
Copy link
Owner

alexpdev commented Jun 4, 2023

Beleive it or not this actually appears to be an issue with qbittorrent and not torrentfile. I checked the output against the torrent checker from the official bittorrent v2 creator and both output the exact same piece hashes at every size.

@alexpdev alexpdev closed this as not planned Won't fix, can't repro, duplicate, stale Jun 4, 2023
@AlyoshaVasilieva
Copy link
Author

Would you be able to file an issue to libtorrent? I've checked and Deluge w/ libtorrent 2.0 has the same issue as qBittorrent, as well as PicoTorrent which reports "Error: v1 and v2 hashes do not describe the same data". All are based on https://github.com/arvidn/libtorrent

@alexpdev
Copy link
Owner

Hi @AlyoshaVasilieva It already is an issue on libtorrent arvidn/libtorrent#7439

@alexpdev alexpdev reopened this Jun 10, 2023
@alexpdev alexpdev added the upstream issue Issue is caused by external sources label Jun 10, 2023
@alexpdev alexpdev changed the title Torrent v2 creation broken libtorrent v2 creation broken Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream issue Issue is caused by external sources
Projects
None yet
Development

No branches or pull requests

2 participants