ktorrent uses high cpu and all of memory

Bug #285807 reported by Tim Skinner on 2008-10-19
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Fix Released
ktorrent (Ubuntu)
Harald Sitter

Bug Description

Binary package hint: ktorrent

Version 3.1.2 using ubuntu 8.10 beta

ktorrent on startup uses about 60% cpu, which seems very high compared to the usage of the kde3 version on hardy. But the real problem is, left for long enough, ktorrent consumes 100% of memory which effectively causes the system to crash. Leaving ktorrent open for a couple hours seems to be a reasonable period of usage, but I have to restart ktorrent after an hour or so, to stop my system crashing.

Related branches

Kieran Hogg (xerosis) wrote :

Confirming, I see this too. I see the high CPU and memory but I've not had it crash the system yet, perhaps I've not had it open long enough, it typically makes the whole system sluggish however.

Changed in ktorrent:
status: New → Confirmed
Harald Sitter (apachelogger) wrote :

This report needs to be forwarded to http://bugs.kde.org

Changed in ktorrent:
importance: Undecided → Medium
Kieran Hogg (xerosis) on 2008-10-19
Changed in ktorrent:
importance: Undecided → Unknown
status: New → Unknown
Changed in ktorrent:
status: Unknown → Fix Released
Kieran Hogg (xerosis) wrote :

Oops, wrong bug.

Changed in ktorrent:
status: Fix Released → Unknown
Changed in ktorrent:
status: Unknown → New
Tim Skinner (timskinner1) wrote :

yes, it usually needs me to leave it on overnight to get to the point where the system freezes.

According to this: http://ktorrent.org/forum/viewtopic.php?t=2655

The bug is to be fixed in 3.1.4, which is supposed to be out this weekend.

Posted: Tue Oct 14, 2008 5:40 pm Post subject: Reply with quote
  It is fixed now, it was an infinite loop of failed DNS lookups in the UDP tracker code.

 Fix will be part of 3.1.4 which is going to be out this weekend.

Tim Skinner (timskinner1) wrote :

will it be updated in the ubuntu repos?

Changed in ktorrent:
status: New → Fix Released
Harald Sitter (apachelogger) wrote :

Not the whole version, but we can certainly get this particular fix in.

Changed in ktorrent:
assignee: nobody → apachelogger
milestone: none → ubuntu-8.10
status: Confirmed → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ktorrent - 3.1.2+dfsg.1-0ubuntu2

ktorrent (3.1.2+dfsg.1-0ubuntu2) intrepid; urgency=low

  * Add kubuntu_01_fix_infinite_dns_lookups_in_upd.diff from upstream SVN
    (LP: #285807)

 -- Harald Sitter <email address hidden> Mon, 20 Oct 2008 16:37:42 +0200

Changed in ktorrent:
status: In Progress → Fix Released
Roger Hills (roger-hills) wrote :

I am still getting high cpu usage and Ktorrent is crashing my machine

Here it is uncrashed but consuming most of the cpu:

6177 xxxxxxx 20 0 503m 325m 23m R 97 16.1 125:06.07 ktorrent

Cpu is at 97%

That is with loads of torrents queued but only a few actually downloading.

I have this version ktorrent (3.1.2+dfsg.1-0ubuntu2) using intrepid.

this may be a different issue. The high memory usage before was due to an
infinite loop of DNS lookups. If you aren't getting any high memory usage
then it is probably a different cause.

Roger Hills (roger-hills) wrote :

Thanks for the quick response. I have installed 3.1.4 as there seems to be a fix in that for high cpu usage as well.

Ktorrent website:
3.1.4 released
admin - Mon, 10/20/2008 - 18:47

Another bugfix release for the 3.1 series is out. This fixes several bugs :

    * A crash caused by a SIGBUS, when diskspace preallocation is disabled
    * High CPU usage when DNS lookups fail in the UDP tracker code
    * Several security issues in the webinterface plugin

Gobnuts (gobnuts) wrote :

I wonder if there's going to be an updated package, on my Kubuntu Intrepid machine KTorrent is still Version 3.1.2 and the insane CPU usage makes using it almost impossible.
Is it going to be updated to 3.1.4 in the repos?

Roger Hills (roger-hills) wrote :

Gobnuts - I installed 3.1.4 from a deb package and it works fine.


Hope that helps.

I have other probs with freezing but Ktorrent is fine now.

Chris (cwjenks) wrote :

Installing the deb package went fine - thanks. I was having the same problem as above with the memory leak, with about 60% of CPU and 60% of memory allocated after about 16 hours of downloading, using version 3.1.2+dfsg.1-0ubuntu2 on intrepid. The only default I remember changing was to allow encryption. I haven't run long enough to know if 3.1.4 works right, but I will post back if not.

Gobnuts (gobnuts) wrote :

Thank you Roger!
The .deb installed just fine and the CPU-usage is back in a normal range now. So, again, thank you.
I still hope that 3.1.4 will be provided through the repositories though since this problem persists with the older version.

hey my god :
I bought 5 products Apple iPhone 4G HD 16GB Black
website: dhsellso.com ,to my surprise! it's genuine. much cheaper.You
can check it! Hope all is going well for you.

Changed in ktorrent:
importance: Unknown → High
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.