Opened 10 years ago

Closed 10 years ago

Last modified 10 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: Sensitive: no


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.


Attachments (1)

i2psnark_1.png (22.4 KB) - added by DISABLED 10 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 10 years ago by zzz

Milestone: 0.8.2
Status: newassigned

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

comment:2 Changed 10 years ago by sponge

some example torrents…

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 10 years ago by DISABLED

Attachment: i2psnark_1.png added

comment:3 in reply to:  1 Changed 10 years ago by DISABLED

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.


comment:4 Changed 10 years ago by sponge

Seems to be happening on torrents with piece size ⇐ 16KB

comment:5 Changed 10 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 10 years ago by sponge

Results from tests show….


16k FAIL
32k FAIL
64k FAIL

128k PASS
256k PASS
512k PASS

1024k PASS

…anything less than 128KB piece size fails.

comment:7 Changed 10 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 10 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 10 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 10 years ago by zzz

Resolution: fixed
Status: assignedclosed

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

comment:11 Changed 10 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 10 years ago by sponge

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

Note: See TracTickets for help on using tickets.