Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#331 closed defect (fixed)

I2PSnark not finishing last 5 pieces

Reported by: sponge Owned by: zzz
Priority: major Milestone: 0.8.2
Component: apps/i2psnark Version: 0.8.1
Keywords: Cc:
Parent Tickets:

Description

I2PSnark fails to fetch the last 5 pieces of a download, and constantly re-requests them. This is specific to 0.8.1-0 only.

Subtickets

Attachments (1)

i2psnark_1.png (22.4 KB) - added by guest 9 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 follow-up: Changed 9 years ago by zzz

  • Milestone set to 0.8.2
  • Status changed from new to assigned

what torrent? link please?
how many seeds and how many other leeches on the torrent?

comment:2 Changed 9 years ago by sponge

some example torrents...
http://sponge.i2p/files/robert-Stable.tar.gz.torrent
http://sponge.i2p/files/robert-beta.tar.gz.torrent
http://sponge.i2p/files/Robert-Stable-win.torrent
http://sponge.i2p/files/Robert-beta-win.torrent

Others may or may not be affected, but I have seen it happen on other torrents in the wild.

Swarm size does not seem to matter.
Leech or Seed count does not seem to matter.

This was noticed by "Oct" on IRC.

Changed 9 years ago by guest

comment:3 in reply to: ↑ 1 Changed 9 years ago by guest

Downloads with I2PSnark stalls by unknown reason at high percentage (sponge already notes that 5 last pieces of the file are affected), although the incoming I2PSnark traffic still presents. With the same torrent/file at 0.8.0 version everything was OK. The screenshot attached may be helpful.

oct

comment:4 Changed 9 years ago by sponge

Seems to be happening on torrents with piece size <= 16KB

comment:5 Changed 9 years ago by sponge

Testing torrents from http://sponge.i2p/files/

they are 4k, 8k... up to 1024k piece sizes. Will post the results of that soon.

comment:6 Changed 9 years ago by sponge

Results from tests show....

4k FAIL
8k FAIL

16k FAIL
32k FAIL
64k FAIL

128k PASS
256k PASS
512k PASS

1024k PASS

...anything less than 128KB piece size fails.

comment:7 Changed 9 years ago by sponge

Seems to also be affecting slowly seeded swarms. Robert's autoban for same piece request is getting hit, and that's for 5 requests of the same piece. so something is definitely wrong.

comment:8 Changed 9 years ago by zzz

Thanks sponge and Oct, this is awesome detective work.

It looks like the very small piece size is getting the end-game logic confused.

Since the i2psnark torrent creation code uses a minimum piece size of 256 KB, this wasn't caught before. It may or may not have been introduced with the end-game changes in 0.8.1, but based on your info it sounds like it is a recent regression.

Since most torrents on postman are either created by i2psnark or are big enough to use 128 KB or larger pieces, this should be relatively rare... except for your Robert torrents.

I've recreated it here. Since they are small torrents and it looks to be 100% repeatable, I should be able to figure it out pretty quickly. I have a snark debug log now and will look at it soon.

Based on your test data, the workaround is to use 128KB or larger pieces for now.

comment:9 Changed 8 years ago by zzz

ok I think I got it. Testing further to be sure.

I think I ran across this before but couldn't find the cause. So I don't think it's exclusive to torrents with small pieces. But at piece sizes <= the 16KB snark request size, it's a lot more likely.

comment:10 Changed 8 years ago by zzz

  • Resolution set to fixed
  • Status changed from assigned to closed

Hopefully fixed in 0.8.1-6, works for me, please test.

comment:11 Changed 8 years ago by sponge

0.8.1-5 still fails, was the patch put in mtn?

If so, it's not working yet. It still requests the same piece over and over, tripping my auto banning code in Robert, which bans after 5 identical requets, and it still gets hit at the 5 piece mark.

comment:12 Changed 8 years ago by sponge

-6 works, but we got new bugs, will post new ticket. :-)

Note: See TracTickets for help on using tickets.