aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Bug on the Kad thread?  (Read 2945 times)

x_x_kamikaze_x_x

  • Jr. Member
  • **
  • Karma: 18
  • Offline Offline
  • Posts: 83
Bug on the Kad thread?
« on: October 22, 2011, 02:20:37 AM »

Hi again aMule Team!   :)

I found a little bug when someone ask for my shared files list.

-> Using:
aMule SVN 10650

-> Problem:
When someone ask for your shared files list, the nodes stats
goes down doing a steep step and then wait until I send all
the list to continue working correctly.  :P

-> How to reproduce the problem:
PC1: Client.
PC2: Server (Client sharing the file list)

PC1: Ask for the PC2 shared file list.
PC2: Makes a Nodes stats steep step on KAD and send the files list.
PC2: Finish the communication and the Nodes stats becomes normal
(but not instantly)

I hope you understand the problem with my rubbish example!  ::)

See you soon my net friends!   ;D

Kami =^.^=
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Bug on the Kad thread?
« Reply #1 on: October 22, 2011, 11:24:59 PM »

You are sharing quite a lot of files, right?
aMule works event based. Most actions (except upload) are processed in a single foreground thread. If a timer fires, a network packet arrives or you click on something it generates an event. These are processed one after another.
For this to work aMule should make sure all these events can be processed quickly. Otherwise timing critical things have to wait too long. You click somewhere, nothing happens. Someone sends a packet, gets no reply, drops the connection. Statistics get wrong results because timer events don't get processed.
Example for something that takes too long is when a file gets completed and has to be hashed. Such things do get processed on a background thread to avoid such problems. But this takes some complicated setting up, messaging, signaling when it's done and so on.
Bottom line of what I'm trying to explain: sending the shared file list with many files may very well be an operation that should better be processed in background. (The actual sending IS done in background, but the compilation of the list isn't.) It isn't because nobody bothered, because it only rarely happens, and most people have totally disabled it anyway. And if the only bad thing happening is a temporary glitch in the Kad statistics, I'm seeing no reason to change the behavior.  :)
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

x_x_kamikaze_x_x

  • Jr. Member
  • **
  • Karma: 18
  • Offline Offline
  • Posts: 83
Re: Bug on the Kad thread?
« Reply #2 on: October 24, 2011, 09:48:24 PM »

Wonderful explanation of the problem and the reasons why it has not been implemented.

I just a beta tester so...  if I see something "strange" I just report it!  ;D

See you soon my nets friends!

Kami =^.^=
Logged