qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
27.05k stars 3.89k forks source link

BitTorrent v2 Torrent Removed from Client Upon Restart #16836

Closed drippyer closed 2 years ago

drippyer commented 2 years ago

qBittorrent & operating system versions

qBittorrent: 4.4.2 x64 Operating system: Windows 10 Pro 20H2 x64

What is the problem?

Upon rebooting, BitTorrent v2 torrents are removed from the client. They can be re-added and checked to resume progress, but this appears to only be the case with v2 torrents.

Steps to reproduce

  1. Download BitTorrent v2 torrent
  2. (?) Begin seeding torrent
  3. Restart client

Additional context

No response

Log(s) & preferences file(s)

(N) 2022-04-06T13:57:54 - qBittorrent v4.4.2 started
(N) 2022-04-06T13:57:54 - Using config directory: C:/Users/%user%/AppData/Roaming/qBittorrent
(I) 2022-04-06T13:57:54 - Trying to listen on: %interface%
(N) 2022-04-06T13:57:54 - Peer ID: %id%
(N) 2022-04-06T13:57:54 - HTTP User-Agent is 'qBittorrent/4.4.2'
(I) 2022-04-06T13:57:54 - DHT support [ON]
(I) 2022-04-06T13:57:54 - Local Peer Discovery support [OFF]
(I) 2022-04-06T13:57:54 - PeX support [ON]
(I) 2022-04-06T13:57:54 - Anonymous mode [ON]
(I) 2022-04-06T13:57:54 - Encryption support [ON]
(I) 2022-04-06T13:57:54 - IP geolocation database loaded. Type: DBIP-Country-Lite. Build time: Thu Mar 31 19:19:19 2022.
(N) 2022-04-06T13:57:54 - Using built-in Web UI.
(N) 2022-04-06T13:57:54 - Web UI translation for selected locale (en) has been successfully loaded.
(N) 2022-04-06T13:57:54 - Web UI: Now listening on IP: *, port: 6969
(I) 2022-04-06T13:57:54 - Successfully listening on IP: %tcp_ip_port%
(I) 2022-04-06T13:57:54 - Successfully listening on IP: %udp_ip_port%
(I) 2022-04-06T13:57:54 - Successfully listening on IP: %tcp_ip_port%
(I) 2022-04-06T13:57:54 - Successfully listening on IP: %udp_ip_port%
(I) 2022-04-06T13:57:54 - Detected external IP: %ip%
(C) 2022-04-06T13:57:57 - Unable to resume torrent '%torrent1%'.
(N) 2022-04-06T13:57:58 - '%torrent2%' restored.

Where %torrent1% is a BitTorrent v2 torrent, and %torrent2% is v1.x

glassez commented 2 years ago

qBittorrent: 4.4.2 x64

More details about qBittorrent build you use?

Download BitTorrent v2 torrent

Are every v2 torrents affected?

@qbittorrent/bug-handlers, can someone confirm?

thalieht commented 2 years ago

I can't reproduce this specific problem but i found others for v2 only in 4.4.2

  1. Select only one file and download it -- Restart client and now all files are selected. Current progress is incorrect and it starts downloading.
  2. Don't create subfolder and select one file and download it -- Restart and now it says "Missing files" with "file sizes mismatch" error in log. Resuming fails and force rechecking brings back -- the subfolder and all files are checked but the download never starts (like upload only mode).

The test torrent: magnet:?xt=urn:btmh:1220caf1e1c30e81cb361b9ee167c4aa64228a7fa4fa9f6105232b28ad099f3a302e&dn=bittorrent-v2-test

ghost commented 2 years ago

Supply the .torrent files that are affected.

drippyer commented 2 years ago

More details about qBittorrent build you use?

Qt: 6.2.4
Libtorrent: 2.0.5.0
Boost: 1.78.0
OpenSSL: 1.1.1n
zlib: 1.2.11

Are every v2 torrents affected?

I have been trying to determine that since I encountered the issue and it seems that it doesn't remove all v2 torrents from the client, but does have issues with remembering Save Location (maybe Category?) upon restart for v2 torrents which are seeding. The original torrent is still entirely removed from the client. I am beginning to think that the file size may play a factor as the content of the removed torrent is in excess of 70 GB

Restart and now it says "Missing files" with "file sizes mismatch" error in log

This appears to be not specific to selecting a single file. While the full torrent is seeding, a restart causes the Missing files and File sizes mismatch to appear for the test torrent. Changing the save location to the location where the file is located and rechecking successfully finds and begins seeding the content, but a restart induces the same behavior.

Supply the .torrent files that are affected.

It is from a private tracker, TDB. I admit I am not well-versed enough to know if I am able/permitted to share it. I do think I can share that it's nearly 75 GB is size which might be having an effect.

ghost commented 2 years ago

It is from a private tracker, TDB. I admit I am not well-versed enough to know if I am able/permitted to share it. I do think I can share that it's nearly 75 GB is size which might be having an effect.

Does this tracker officially support Bittorrent v2? Are they able to parse and upload v2 torrents correctly? Are the able to provide v2 torrents to end user with all appropriate parameters?

glassez commented 2 years ago

I am beginning to think that the file size may play a factor as the content of the removed torrent is in excess of 70 GB

Could you add such a torrent and report what is the size of corresponding .fastresume file?

glassez commented 2 years ago

i found others for v2 only in 4.4.2

  1. Select only one file and download it -- Restart client and now all files are selected. Current progress is incorrect and it starts downloading.
  2. Don't create subfolder and select one file and download it -- Restart and now it says "Missing files" with "file sizes mismatch" error in log. Resuming fails and force rechecking brings back -- the subfolder and all files are checked but the download never starts (like upload only mode).

I was unable to reproduce such symptoms (maybe because I used .torrent file for tesying), but I found a bug that most likely causes them.

UPDATE: Should be fixed by #16841.

glassez commented 2 years ago

I am beginning to think that the file size may play a factor as the content of the removed torrent is in excess of 70 GB

Could you add such a torrent and report what is the size of corresponding .fastresume file?

So how about it?

drippyer commented 2 years ago

Could you add such a torrent and report what is the size of corresponding .fastresume file?

So how about it?

Had to handle a personal matter which took precedence.

Windows states 167 MB

.fastresume

glassez commented 2 years ago

Windows states 167 MB

Well, it exceeds some limit hardcoded in libtorrent. Related issue: https://github.com/arvidn/libtorrent/issues/6809.

ghost commented 2 years ago

fixed by https://github.com/arvidn/libtorrent/pull/6817

@glassez I hope there's nothing to be addressed on the qBt side?