Bug 147944

Summary: KNode constantly fires timer even when totally idle
Product: knode Reporter: Rolf Eike Beer <kde>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: cedric.brun, harshad.rj, rdieter
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Stop KNProtocolClient polling for termination
Correct Alan's patch

Description Rolf Eike Beer 2007-07-17 09:33:48 UTC
Version:           0.10.5 (using KDE 3.5.7 "release 56.1" , openSUSE )
Compiler:          Target: i586-suse-linux
OS:                Linux (i686) release 2.6.22-git

Another thing found by powertop :)

My setup is as follows:
Server 1: remote server, network currently unreachable
Server 2: remote server, reachable
Server 3: local leafnode

There is no network transfer running but KNode causes timer interrupts at 200-250 times per second (!). It's independent of if I view an article and which one.
Comment 1 Rolf Eike Beer 2007-09-13 18:19:55 UTC
*** Bug 149796 has been marked as a duplicate of this bug. ***
Comment 2 Alan Jenkins 2007-09-15 15:57:45 UTC
Created attachment 21631 [details]
Stop KNProtocolClient polling for termination

Try this.  Works for me.   Disclaimer: I'm not a KDE dev; it might have broken
something I don't use or rely on.
Comment 3 Rolf Eike Beer 2008-02-12 21:34:10 UTC
*** Bug 153140 has been marked as a duplicate of this bug. ***
Comment 4 Alan Jenkins 2008-02-12 21:39:59 UTC
That's... me, Rolf, two duplicates: four reporters of this bug.  And a patch.  Can someone please at least move this bug out of "UNCONFIRMED" status?  It seems pretty confirmed to me :-).
Comment 5 Felipe Sateler 2008-03-21 23:48:48 UTC
The patch by Alan does not compile (it misses deleting a }). Attached is a fixed patch.
Comment 6 Felipe Sateler 2008-03-21 23:53:58 UTC
Created attachment 23996 [details]
Correct Alan's patch

Now attaching the patch
Comment 7 Helge Deller 2008-03-22 22:02:18 UTC
I noticed the same bug.
Please, some KNode developer, consider to apply this patch (haven't tested myself, but it's easy to reproduce the problem with powertop).
THX, Helge
Comment 8 Vitus Jensen 2008-05-06 08:54:47 UTC
I can confirm this bug.
On my system (2.6.24-gentoo-r4, kde 3.5.8, knode 0.10.5) knode causes ~55 extra wakeups every second.  This is with a perfect internet connection to two news server (gmane, individual).  For long reading sessions it's better to use konqueror to read usenet via google :-(

I haven't tested the patch so far.
Comment 9 Frans Pop 2008-07-08 04:46:31 UTC
I've just tried the proposed patch in Debian unstable (KDE 3.5.9; knode 0.10.9) and it seems to work fine. With knode running inside kontact wakeups on my desktop as reported by powertop are down from ~500 to ~150 (knode no longer listed).

My impression is even that knode is a lot more responsive, but that may also be due to server activity.

Interval news checking works correctly. I've watched connections in netstat and the "Hold connection for" setting for my news server is respected too.

Tested with a single news server (different system on local network).
Comment 10 Volker Krause 2008-07-20 14:46:44 UTC
SVN commit 835314 by vkrause:

Patch by Alan Jenkins to fix excessive timer wakeups.

The problem does not occur in trunk.

BUG: 147944


 M  +1 -0      knnetaccess.cpp  
 M  +13 -19    knprotocolclient.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=835314