downloading from web seed makes no progress to the torrent

Ask for help and report issues with the Mac OS X version of Transmission
Post Reply
wiknak
Posts: 9
Joined: Wed Jan 21, 2015 11:30 pm

downloading from web seed makes no progress to the torrent

Post by wiknak »

Hi,

As in the subject I have problem with torrent using web seed among standard peers. It is downloading with really high speed around 2-3 MB/s (max of my network), but it doesn't have any influence on the download progress, the percentage is still the same. Torrent summary already shows downloaded data approx 40 GB but the file itself is only 20 GB, so where did that extra 20 GB gone?

Any ideas?

thanks!
wiknak
Posts: 9
Joined: Wed Jan 21, 2015 11:30 pm

Re: downloading from web seed makes no progress to the torre

Post by wiknak »

Transmission is already updated but behaviour is the same.

What should I find or not find in the log?
wiknak
Posts: 9
Joined: Wed Jan 21, 2015 11:30 pm

Re: downloading from web seed makes no progress to the torre

Post by wiknak »

Tkanks for that. But there is no solution for this issue in that ticket.
wiknak
Posts: 9
Joined: Wed Jan 21, 2015 11:30 pm

Re: downloading from web seed makes no progress to the torre

Post by wiknak »

I don't really know how to put it on blocklist
wiknak
Posts: 9
Joined: Wed Jan 21, 2015 11:30 pm

Re: downloading from web seed makes no progress to the torre

Post by wiknak »

how come you think that web seed is not affected when it already downloaded 70 gigs of 20 gig file? :) have a look in attachment

no offence
screen from torrent inspector
screen from torrent inspector
transm.png (37.3 KiB) Viewed 10619 times
wiknak
Posts: 9
Joined: Wed Jan 21, 2015 11:30 pm

Re: downloading from web seed makes no progress to the torre

Post by wiknak »

ok. do not understand a word there :)

however, I took the URL of the web seed and I'm downloading it directly with that high bandwidth :)

I am not an expert on these matters so I give up blocking etc.

thanks for your help!
wiknak
Posts: 9
Joined: Wed Jan 21, 2015 11:30 pm

Re: downloading from web seed makes no progress to the torre

Post by wiknak »

see? I even mistaken words :)

I give up on that.
Thanks again
cfpp2p
Posts: 290
Joined: Sat Aug 08, 2009 3:14 pm

Re: downloading from web seed makes no progress to the torre

Post by cfpp2p »

I can't see the version of transmission producing the problem. There's an old version of transmission that had the bug I think you're describing: "webseed downloading never gets downloaded" https://trac.transmissionbt.com/ticket/4666
wiknak
Posts: 9
Joined: Wed Jan 21, 2015 11:30 pm

Re: downloading from web seed makes no progress to the torre

Post by wiknak »

Not sure, I did update Transmission 30 minutes before opening this topic and it helped nothing.
cfpp2p
Posts: 290
Joined: Sat Aug 08, 2009 3:14 pm

Re: downloading from web seed makes no progress to the torre

Post by cfpp2p »

What's your platform? Yosemite? How did you initiate the update?
cfpp2p
Posts: 290
Joined: Sat Aug 08, 2009 3:14 pm

Re: downloading from web seed makes no progress to the torre

Post by cfpp2p »

Ignore my previous post. I've reproduced the issue. We've got a new bug. :( I'm looking into it.
wiknak
Posts: 9
Joined: Wed Jan 21, 2015 11:30 pm

Re: downloading from web seed makes no progress to the torre

Post by wiknak »

So I did not get mad apparently :-)
Thanks
cfpp2p
Posts: 290
Joined: Sat Aug 08, 2009 3:14 pm

Re: downloading from web seed makes no progress to the torre

Post by cfpp2p »

Problem is Hm:A webseed server doesn't allow Accept-Ranges: bytes or resuming of downloads. It simply completely ignores the byte ranges and starts sending the entire file in order as a whole (as far as I can tell the Hm:A webseed doesn't work in any client I tried, but other client don't download unnecessarily like transmission :( ). Transmission mistakenly waits for the response header but it won't come until the end. Curl times out after 4 minutes (timeout = 240L) but all the while downloading at full speed wanting and waiting for the response header. It does this for all four connections of a webseed ( MAX_WEBSEED_CONNECTIONS = 4 ).

Code: Select all

static long
getTimeoutFromURL (const struct tr_web_task * task)
{
  long timeout;
  const tr_session * session = task->session;

  if (!session || session->isClosed) timeout = 20L;
  else if (strstr (task->url, "scrape") != NULL) timeout = 30L;
  else if (strstr (task->url, "announce") != NULL) timeout = 90L;
  else timeout = 240L;

  return timeout;
}
Curl would need to ask for the response header first then check if partial content is allowed, in order to stop this.

With this scenario you will never see the downloaded data as corrupt blocks either since it's not ever written to the data file.

Transmission normally checks right away for the correct response code ( const int success = (response_code == 206) ). The response header is usually received right away, but not with this particular webseed, and we continue download at full speed for four minutes. Once the four minute timeout is reached four more connections with exactly duplicate byte ranges are established, and again full speed download. This will repeat ad nauseam. Even when the response header is acquired right away (no uncontrolled download) transmission only checks for the 206 "partial content" response. If it's not then we try again and again 4 times every four minutes forever. Seems like if we got 403 or 404 codes we should drop this webseed, but we just keep trying. A 200 "OK" code may be received but this can be just a message stating some error pertaining to the file's availabilty so even then we need to take action to save repeatedly trying.

The webseed.c code seems rudimentary at best and subject to these kinds of bugs. I got a crash with trunk quite a few times when remove & trash data on the webseed torrents seemingly due to viewtopic.php?f=1&t=14053#p62388

zzzzzzzzzzzzzzzzz :arrow:

p.s. edit:
A difficult job to descriptively summarize all the problems but I'll attempt an ordered list anyway.

1.) response header sent at end results in excessive bandwidth --> as described above.
2.) continuous downloads of corrupt block(s) --> https://trac.transmissionbt.com/ticket/5873
3.) persistence with response codes indicating no access --> as above: only a check for 206 "partial content"
4.) webseeds don't stop downloading --> i.e. https://trac.transmissionbt.com/ticket/4576#comment:13
5.) crash on delete/trash data --> aggravated by 1.) or 2.) combined with 4.) viewtopic.php?f=1&t=14053#p62388

phew...
cfpp2p
Posts: 290
Joined: Sat Aug 08, 2009 3:14 pm

Re: downloading from web seed makes no progress to the torre

Post by cfpp2p »

Here's a patch that I'm using on my development version that solves most of the issues of this post.

Here goes...

Two settings new in settings.json

"webseed-max-connect-fails": 5
"webseeders-maximum": 4

there is a new hardcoded timeout value of ten seconds (instead of five minutes) so now we don't wait around forever with dead connections sucking bandwith for nothing. Default for "webseed-max-connect-fails" is 5. Each failure we'll do progressively longer waits for reconnections, i.e. like this for five tries after first failure wait 10 minutes, fail again 15 more minutes, then 20 more minutes, then 25 and on fifth attempt we drop the connection (will try again in 100 days, essentially dropped).

webseeders-maximum per torrent default is 4

The patch deadens and subdues the Hm:A webseed, downloads the archlinux linux webseed of post viewtopic.php?f=2&t=16737 without issue.

By setting "webseeders-maximum" to zero sets webseeding off completely. Setting "webseed-max-connect-fails" to one locks out webseeders at the first sign of trouble.

Haven't come up with a way I like to stop those pesky corrupt block seeders without simply blocklisting them. And it looks easy to get into trouble with curl by using the w->is_stopping flag to nip in the bud the webseeds that don't stop downloading on pause.

here's the patch: https://github.com/cfpp2p/transmission/ ... 6929d06a61

as patch: https://github.com/cfpp2p/transmission/ ... 6a61.patch

will need a little transformation if you want to in on use trunk version.
a little patch that seems to do alot.
Post Reply