jash-kothari-forks / libtorrent

Automatically exported from code.google.com/p/libtorrent
Other
0 stars 0 forks source link

Webseed leaks and causes 100s of GB of traffic #463

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I first addressed this to the qbittorrent bug tracker, but the maintainer said, 
this bug is caused by the libtorrent.

I noticed that there is a webseed download leak in V 3.1.0alpha. It happens 
quite often (around 1/20), that when I download a file via http-webseed, that 
qbittorrent has some hashing problems. It redownloads the same part again and 
again and causes lots of dropped traffic. In my case up to 50 or 60 GB 
sometimes until I noticed it and stoped it manually.

There should be two things fixed:

1.) If more than 100 or 200 MB of traffic for one torrent was droppend, 
eliminate the webseed. Just as it would happen with a torrent peer that uploads 
useless parts aswell.

2.) All the webseeds, that caused these problems, could be loaded perfectly via 
wget or any browser. After the download was completed, I could easyly import 
them with the torrent file to qbittorrent in order to seed them. So the torrent 
file was not corrupted either and there must be an issue around the validating 
of downloaded data via webseed.

What steps will reproduce the problem?

It's not totaly reproducable, but happens quite often. I download a lot of 
files via webseed in order to seed them afterwords. 

What is the expected output? What do you see instead?
Drop the webseed. Instead it reloads the part thousands of times and produces 
tons of useless traffic.

What version of the product are you using? On what operating system?
libtorrent-rastarbar6: 0.15.10-1
qbittorrent: V3.1.0alpha
Ubuntu 12.04.2 64bit
uname -a: Linux Server0 3.5.0-26-generic #42~precise1-Ubuntu SMP Mon Mar 11 
22:17:58 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Please provide any additional information below.

Original issue reported on code.google.com by Matthias...@googlemail.com on 14 Apr 2013 at 10:35

GoogleCodeExporter commented 8 years ago
Can you provide a torrent that exhibits this behavior?

Do these torrents typically have multiple files? Perhaps many small files 
spanning a single piece?

There is a known issue that if the web server doesn't support keep-alive, 16 
kiB blocks that would require more than a single request won't work. libtorrent 
currently must request an entire block within the same connection. If the 
server closes the connection, the partial block that may have been downloaded 
is discarded (just like normal bittorrent peers).

The symptom you describe sound like what you would see with multi-file torrents 
and web server that don't support keep-alive.

It's possible you're seeing something else though. Would it be possible for you 
to test with libtorrent-0.16.9? (the 0.15.x series was retired over a year ago).

Original comment by arvid.no...@gmail.com on 14 Apr 2013 at 5:11

GoogleCodeExporter commented 8 years ago
However, the leak you talk of is certainly not a known issue. I'm still 
interested in an example torrent to reproduce this with.

Original comment by arvid.no...@gmail.com on 14 Apr 2013 at 5:17

GoogleCodeExporter commented 8 years ago
No, unfortunately it's not that easy reproducible. Deleting and re-adding the 
same torrent normally fixes it.

But all my torrents are single file torrents. So it won't have anything to do 
with multiple files.

Original comment by Matthias...@googlemail.com on 14 Apr 2013 at 5:19

GoogleCodeExporter commented 8 years ago
You may get a more recent libtorrent by using the following PPA:
https://launchpad.net/~surfernsk/+archive/internet-software

Make sure to install both libtorrent-rasterbar and qBittorrent from that PPA 
(Do not mix packages from different PPAs as this will lead to problems).

Original comment by dch...@gmail.com on 14 Apr 2013 at 5:19

GoogleCodeExporter commented 8 years ago
@Arvid: I believe you will find a test torrent at the original bug report:
https://github.com/qbittorrent/qBittorrent/issues/581#issuecomment-16348900

Original comment by dch...@gmail.com on 14 Apr 2013 at 5:22

GoogleCodeExporter commented 8 years ago
Thank you for that link. I searched around a long time this morning to find a 
ppa for 12.04 with rastarbar 16.9. Nice :)

That test torrent I created this morning, does not reproduce the bug! That's 
the problem, it just happens sometimes...

I still need to concider to downgrade qbittorrent as 3.1 fixes some annoying 
bugs of 3.0.9.

Original comment by Matthias...@googlemail.com on 14 Apr 2013 at 5:23

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Okay, I downgraded qbit and upgraded libtorrent-rasterbar to package version 7. 
I will report if a leak happens again.

Original comment by Matthias...@googlemail.com on 14 Apr 2013 at 5:47

GoogleCodeExporter commented 8 years ago

Original comment by arvid.no...@gmail.com on 13 Feb 2014 at 2:55