Bug 183697 - High cpu usage when connection is not available
Summary: High cpu usage when connection is not available
Status: RESOLVED FIXED
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-08 16:58 UTC by Cláudio F. Gil
Modified: 2009-02-12 16:11 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cláudio F. Gil 2009-02-08 16:58:05 UTC
Version:           3.2beta1 (using 4.2.00 (KDE 4.2.0) "release 82.3", KDE:KDE4:Factory:Desktop / openSUSE_11.1)
Compiler:          gcc
OS:                Linux (i686) release 2.6.27.7-9-default

When network connection is not available ktorrent uses a lot of CPU. As soon as I connect to the Internet the CPU usage returns to normal, that is, the entire system goes under 10% cpu usage with ktorrent in it's 1%-2%.

How to reproduce:
1) Shutdown computer with ktorrent running.
2) Start computer without WAN or LAN connected
2.1) Observe high CPU usage
3) Connect to the Internet
3.1) Observe low CPU usage (assuming nothing else is running at full throttle)
Comment 1 Joris Guisson 2009-02-08 17:39:25 UTC
Can't reproduce, have you tried 3.2rc1 yet ?
Comment 2 Cláudio F. Gil 2009-02-10 00:02:39 UTC
I'll install the rc1 as soon as my Linux and wireless router start talking to each other again.

This was a pretty common problem to me. So a few days using the rc1 should be enough to tell if it's still there or not.

Thanks for the attention.
Comment 3 Joris Guisson 2009-02-10 10:02:11 UTC
OK, I just had a look at the log you sent me in http://bugs.kde.org/show_bug.cgi?id=183699

And I think I know what is causing the high CPU usage.
Comment 4 Joris Guisson 2009-02-10 12:10:31 UTC
Though I cannot seem to reproduce it
Comment 5 Joris Guisson 2009-02-12 16:11:41 UTC
SVN commit 925142 by guisson:

Fix bug causing trackers to be retried continuously when hostname can not be resolved because the network isn't up yet.

BUG: 183697
BUG: 183699



 M  +1 -0      ChangeLog  
 M  +1 -1      libbtcore/torrent/peersourcemanager.cpp  
 M  +3 -0      libbtcore/tracker/udptracker.cpp  


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