Bug 282624

Summary: KTorrent needs 100% cpu
Product: [Applications] ktorrent Reporter: Christoph Feck <cfeck>
Component: generalAssignee: Joris Guisson <joris.guisson>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:

Description Christoph Feck 2011-09-23 15:32:22 UTC
Since a day or two, KTorrent/libktorrent from master consumes 100% cpu, even when all downloads are stalled.
Comment 1 Joris Guisson 2011-09-24 10:04:51 UTC
Could you run ktorrent under perf ?

perf record /usr/bin/ktorrent --nofork

A file named perf.data will be generated, post that here.
Comment 2 Christoph Feck 2011-09-24 11:45:35 UTC
Letting ktorrent run for 1 minute with five torrents running, all stalled:

http://skulpture.maxiom.de/playground/perf.data.xz
Comment 3 Joris Guisson 2011-09-25 15:12:00 UTC
Could you run perf report -i perf.data ?

I don't have the same versions of libraries as you, so running that on my system gives me rather useless results.
Comment 4 Joris Guisson 2011-10-06 17:33:27 UTC
Git commit e3f22c5a9a9fc0a71ef4be21da4a0b293d95123f by Joris Guisson.
Committed on 06/10/2011 at 19:32.
Pushed by guisson into branch 'master'.

Fix bug causing 100% CPU usage in the packet sending code when there are no upload limits

BUG: 282624

M  +1    -1    src/download/packet.cpp

http://commits.kde.org/libktorrent/e3f22c5a9a9fc0a71ef4be21da4a0b293d95123f