Official eMule-Board: Possible Bug In Slotfocus Code? - Official eMule-Board

Jump to content


Page 1 of 1

Possible Bug In Slotfocus Code? results in banning legit clients in rare cases

#1 User is offline   edadd01 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 6
  • Joined: 23-February 08

Posted 16 June 2008 - 05:24 PM

I recently posted a 36682"]report in the Morph forums about a possible bug, but since then I found out that the problem might be in the zz slotfocus code (which the morph mod inherits if I understand correctly), so I thought I'd mention it here too.

To sum up the first report, when a client finishes downloading a full chunk from a slotfocus mod (eg ZZULL), the mod puts the client back in the waiting queue and marks the time as the time the client last made a connection (this doesn't happen in the official). This has some unexpected results. If less than 10 min have passed since the start of downloading of this chunk (and the initial client connection), this is marked as a bad request from the mod. If the client connects before 10 min have passed since the end of downloading the previous chunk, it is marked as a bad request (the client thinks the last time it connected is at the initial connection time, not at the end of downloading a chunk, and some clients (the xtreme-based as far as I can tell) connect to the uploading client as soon as possible after the end of a chunk download). If the next chunk the client downloads finishes before 10 min have passed since the end of the download of the previous chunk, it is marked as a bad request from the mod. If this happens 4 consecutive times, the client is banned.

This bug appears kinda rarely, when there are few clients in queue for a file, and the upload speed of the mod user is high enough, so that the time between the end of chunk transfers (and placement back in the waiting queue) of a client is less than 10 min. In such cases, the client gets banned after downloading at most 4 chunks. Btw, I think that's what's happening in the case of 71565"]this user.

I managed to reproduce the bug running a ZZUL sharing a file with ~78kb/s upload limit and 4 official clients downloading it. The first client to complete 4 chunks gets banned for aggressive behavior.

As I explain in my initial report, I believe the problem lies (for the ZZULL 20080512-0047 code) in line UploadQueue.cpp:828
				AddClientToQueue(cur_client,keepWaitingTime,keepWaitingTime);

which should probably be changed to
				AddClientToQueue(cur_client,true,keepWaitingTime);	// ???

so that the ban time limit is not checked when the client is put back in queue, like in the official.

Thank for reading this!
0

#2 User is offline   zz 

  • -
  • PipPipPipPipPipPipPip
  • Group: Debugger
  • Posts: 2014
  • Joined: 30-November 02

Posted 17 June 2008 - 11:48 PM

Mmmm, I did a cursory check, and it seems to make sense. Thanks for the detailed report.

I've changed this locally, and if I don't see problems with it later, it will be in there whenever the next release gets out.

/zz B)
ZZUL - get control of your uploads: ZZUL Forum
0

#3 User is offline   edadd01 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 6
  • Joined: 23-February 08

Posted 18 June 2008 - 05:16 PM

Thanks!
0

  • Member Options

Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users