qbittorrent / qBittorrent

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

"I/O error" spammed when seeding partial torrent downloaded #19048

Open orblazer opened 1 year ago

orblazer commented 1 year ago

qBittorrent & operating system versions

qBittorrent: 4.5.2 x64 Operating system: Linux 6.1.30-1-MANJARO x64 Qt: 5.15.9 libtorrent-rasterbar: 1:2.0.8-3

What is the problem?

When we unselect some files from torrent and it is downloaded, when the torrent is seeding an "I/O Error" is thrown quite often and some time that spamming the error.

Steps to reproduce

  1. Add an torrent
  2. Unselect some files from that torrent
  3. Wait download is finish
  4. See error when its seeding

Additional context

No response

Log(s) & preferences file(s)

(N) 2023-05-31T10:11:29 - qBittorrent v4.5.2 started (N) 2023-05-31T10:11:29 - Using config directory: /home/orblazer/.config/qBittorrent (N) 2023-05-31T10:11:29 - Trying to listen on the following list of IP addresses: "0.0.0.0:33356,[::]:33356" (I) 2023-05-31T10:11:29 - Peer ID: "-qB4520-" (I) 2023-05-31T10:11:29 - HTTP User-Agent: "qBittorrent/4.5.2" (I) 2023-05-31T10:11:29 - Distributed Hash Table (DHT) support: ON (I) 2023-05-31T10:11:29 - Local Peer Discovery support: ON (I) 2023-05-31T10:11:29 - Peer Exchange (PeX) support: ON (I) 2023-05-31T10:11:29 - Anonymous mode: ON (I) 2023-05-31T10:11:29 - Encryption support: ON (I) 2023-05-31T10:11:29 - UPnP/NAT-PMP support: ON (I) 2023-05-31T10:11:29 - Successfully listening on IP. IP: "127.0.0.1". Port: "TCP/33356" (I) 2023-05-31T10:11:29 - Successfully listening on IP. IP: "127.0.0.1". Port: "UTP/33356" (I) 2023-05-31T10:11:29 - Successfully listening on IP. IP: "10.0.0.108". Port: "TCP/33356" (I) 2023-05-31T10:11:29 - Successfully listening on IP. IP: "10.0.0.108". Port: "UTP/33356" (I) 2023-05-31T10:11:29 - Successfully listening on IP. IP: "::1". Port: "TCP/33356" (I) 2023-05-31T10:11:29 - Successfully listening on IP. IP: "::1". Port: "UTP/33356" (I) 2023-05-31T10:11:29 - Successfully listening on IP. IP: "fe80::531f:b3c9:82dd:8d12%enp0s31f6". Port: "TCP/33356" (I) 2023-05-31T10:11:29 - Successfully listening on IP. IP: "fe80::531f:b3c9:82dd:8d12%enp0s31f6". Port: "UTP/33356" (W) 2023-05-31T10:11:29 - UPnP/NAT-PMP port mapping failed. Message: "could not map port using UPnP[10.0.0.108]: unknown UPnP error (-911)" (W) 2023-05-31T10:11:29 - UPnP/NAT-PMP port mapping failed. Message: "could not map port using UPnP[10.0.0.108]: unknown UPnP error (-911)" (N) 2023-05-31T10:11:29 - Restored torrent. Torrent: "[torrentName]" (I) 2023-05-31T10:11:29 - IP geolocation database loaded. Type: DBIP-Country-Lite. Build time: Mon May 1 02:23:20 2023. (I) 2023-05-31T10:11:30 - Detected external IP. IP: "X.X.X.X" (I) 2023-05-31T10:11:30 - Python detected, executable name: 'python3', version: 3.10.10 (W) 2023-05-31T10:56:28 - File error alert. Torrent: "[torrentName]". File: "/run/media/data/download/Movies/www.YTS.AM.jpg". Reason: "[torrentName] partfile_read ([filePath]" (W) 2023-05-31T10:57:30 - File error alert. Torrent: "[torrentName]". File: "/run/media/data/download/Movies/www.YTS.AM.jpg". Reason: "[torrentName] partfile_read ([filePath]" (W) 2023-05-31T10:58:34 - File error alert. Torrent: "[torrentName]". File: "/run/media/data/download/Movies/www.YTS.AM.jpg". Reason: "[torrentName] partfile_read ([filePath]" (W) 2023-05-31T10:59:14 - File error alert. Torrent: "[torrentName]". File: "/run/media/data/download/Movies/www.YTS.AM.jpg". Reason: "[torrentName] partfile_read ([filePath]" (W) 2023-05-31T11:00:16 - File error alert. Torrent: "[torrentName]". File: "/run/media/data/download/Movies/www.YTS.AM.jpg". Reason: "[torrentName] partfile_read ([filePath]" (W) 2023-05-31T11:01:10 - File error alert. Torrent: "[torrentName]". File: "/run/media/data/download/Movies/www.YTS.AM.jpg". Reason: "[torrentName] partfile_read ([filePath]" (W) 2023-05-31T11:02:12 - File error alert. Torrent: "[torrentName]". File: "/run/media/data/download/Movies/www.YTS.AM.jpg". Reason: "[torrentName] partfile_read ([filePath]" (W) 2023-05-31T11:03:16 - File error alert. Torrent: "[torrentName]". File: "/run/media/data/download/Movies/www.YTS.AM.jpg". Reason: "[torrentName] partfile_read ([filePath]" (W) 2023-05-31T11:04:50 - File error alert. Torrent: "[torrentName]". File: "/run/media/data/download/Movies/www.YTS.AM.jpg". Reason: "[torrentName] partfile_read ([filePath]"

glassez commented 1 year ago

Looks like something wrong with "partfile" handling (unless the user interfered with it himself). @arvidn, ping!

orblazer commented 1 year ago

@PriitUring i have force update to v4.5.3, and i in approx 4 hours i havent see any issue, BUT i have just seen an new one.

So i think the update have partially fix, but i continue to check the error for see if that re appear as often before update or not.

orblazer commented 1 year ago

Ok, after a few days the update to v4.5.3 have change nothing, that just an coincidence to have less errors, because in fact i things that just due to unseeding torrents.

WojtekKowaluk commented 1 year ago

Still happening in 4.5.4. Any idea if parts file gets corrupted in the process or this is just annoying error message?

glassez commented 1 year ago

Steps to reproduce

  1. Add an torrent
  2. Unselect some files from that torrent
  3. Wait download is finish
  4. See error when its seeding
  1. Did you unselect the files in "Add new torrent dialog"? Or after torrent was added and has a chance to start download unneeded files?
  2. Do you use another directory for incomplete (being downloaded) torrent?
  3. Does the partfile actually exist in the path referenced by the error message?
glassez commented 1 year ago

Or did you maybe remove partfile by hand?

WojtekKowaluk commented 1 year ago
  1. Did you unselect the files in "Add new torrent dialog"? Or after torrent was added and has a chance to start download unneeded files?

I unselect in "Add new torrent dialog" and never touch them.

  1. Do you use another directory for incomplete (being downloaded) torrent?

No.

  1. Does the partfile actually exist in the path referenced by the error message?

Referenced file does not exist, it is one of files which were never selected.

Or did you maybe remove partfile by hand?

I have never removed any file.

glassez commented 1 year ago

5. Does the partfile actually exist in the path referenced by the error message?

Referenced file does not exist, it is one of files which were never selected.

I asked for partfile mentioned there, not for file from torrent:

Reason: "[torrentName] partfile_read ([filePath]"

orblazer commented 1 year ago
  1. Did you unselect the files in "Add new torrent dialog"? Or after torrent was added and has a chance to start download unneeded files?

I have try both

  1. Do you use another directory for incomplete (being downloaded) torrent?

Yes

  1. Does the partfile actually exist in the path referenced by the error message? Or did you maybe remove partfile by hand?

No it doesn't seem to exist and i havent delete anything

TheColorman commented 1 year ago

+1, same issue. Tries to read a nonexistent partfile for a file in a directory that was specifically chosen not to be downloaded. v4.5.4

stalkerok commented 1 year ago

This is most likely a permissions error to create the parts file in the parent directory, since qbt does not create .parts in the same folder as the files.

WojtekKowaluk commented 1 year ago

though I'm not sure which torrents they belong to

TheColorman: That's easy to check, enable Info Hash v1 column in torrent list.

LazyDev2k commented 5 months ago

Still have this problem on qBittorrent v4.6.4 Regular `File error alert. Torrent: "...". Reason: "... partfile_read (...) error: No such file or directory"

The parent directory has a part file with corresponding hash.

yueisme commented 4 months ago

maybe you delete *.parts files, try force recheck torrent.

according to bittrrent protocol design, a torrent split to many pieces, a single piece maybe include multiple file. so when you seeding some file, libtorrent needs check hash or something to make sure all the pieces required for this file are complete, i think libtorrent .parts file contain pieces data to resolve partial seeding probs.

https://github.com/arvidn/libtorrent/blob/v1.2.19/src/part_file.cpp#L36-L41 https://en.wikipedia.org/wiki/BitTorrent#Design https://github.com/qbittorrent/qBittorrent/issues/12471#issuecomment-612166981

Menard01 commented 4 months ago

I had this too, and with Deluge I had some problem like this, with a recheck showing some incomplete downloads as before that the download was complete, but for most it was because I had deleted the .parts file. After this I must say I never deleted .parts files anymore and though I have still some events like this, but far more rarely.

Rubber-Duckie commented 3 months ago

I am not sure #20849 is exactly the same, but does seem related for sure. When downloading a torrent, before starting, deselecting some files within will result in the torrent suffering an IO error toward the end, as the larger files tend to slow at the end, the client seems to want to turn attention to any remaining smaller files. Despite those smaller files being marked as "do not download", the client tries to do so anyway and an internal conflict takes place resulting in a vary strange and seemingly incorrect error "access denied".