Bug 485102 - bittorrent may consume nearly 100% of the CPU
bittorrent may consume nearly 100% of the CPU
Product: Fedora
Classification: Fedora
Component: bittorrent (Show other bugs)
All Linux
low Severity high
: ---
: ---
Assigned To: Paul Howarth
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-02-11 11:16 EST by Steve Tyler
Modified: 2009-12-18 02:53 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-12-18 02:53:39 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
gdb backtrace for all three threads in core file (7.02 KB, text/plain)
2009-02-11 14:54 EST, Steve Tyler
no flags Details

  None (edit)
Description Steve Tyler 2009-02-11 11:16:33 EST
Description of problem:
While running bittorrent, gkrellm showed CPU utilization near 100%. This lastest for more than a few seconds. The rate declined a few times. The UI was responsive.

Top showed:
 5576 stephent  20   0  102m  47m  11m S 79.2  6.3  97:46.70 bittorrent

Attaching with strace showed it was repeatedly and rapidly calling gettimeofday:
strace -f -p 5576
[pid  5584] gettimeofday({1234365115, 996243}, NULL) = 0
[pid  5584] gettimeofday({1234365115, 996526}, NULL) = 0
[pid  5584] gettimeofday({1234365116, 773}, NULL) = 0
[pid  5584] gettimeofday({1234365116, 1033}, NULL) = 0
[pid  5584] gettimeofday({1234365116, 71732}, NULL) = 0

Version-Release number of selected component (if applicable):

How reproducible:
First time I have seen this.
Was uploading one torrent (F10 DVD) at the slowest rate (4) and doing no downloads. It had been running overnight at a higher rate (max set to 20), which I reduced to 4 in the morning. Firewalls are configured to block all incoming connections.

Additional info:
Forced a core dump with kill -3 5576.

gdb /usr/bin/python core.5576
(gdb) bt
#0  0x00bda416 in __kernel_vsyscall ()
#1  0x006a6495 in sem_wait@@GLIBC_2.1 () from /lib/libpthread.so.0
#2  0x03454f1b in PyThread_acquire_lock () from /usr/lib/libpython2.5.so.1.0
#3  0x0345955c in ?? () from /usr/lib/libpython2.5.so.1.0
#4  0x033ddb3d in PyCFunction_Call () from /usr/lib/libpython2.5.so.1.0
#5  0x0342dcf0 in PyEval_EvalFrameEx () from /usr/lib/libpython2.5.so.1.0
#6  0x0342f965 in PyEval_EvalCodeEx () from /usr/lib/libpython2.5.so.1.0
#7  0x0342e256 in PyEval_EvalFrameEx () from /usr/lib/libpython2.5.so.1.0
#8  0x0342f965 in PyEval_EvalCodeEx () from /usr/lib/libpython2.5.so.1.0
#9  0x0342e256 in PyEval_EvalFrameEx () from /usr/lib/libpython2.5.so.1.0
#10 0x0342f965 in PyEval_EvalCodeEx () from /usr/lib/libpython2.5.so.1.0
#11 0x033c9376 in ?? () from /usr/lib/libpython2.5.so.1.0
#12 0x033a9397 in PyObject_Call () from /usr/lib/libpython2.5.so.1.0
#13 0x033b0878 in ?? () from /usr/lib/libpython2.5.so.1.0
#14 0x033a9397 in PyObject_Call () from /usr/lib/libpython2.5.so.1.0
#15 0x033a9f13 in ?? () from /usr/lib/libpython2.5.so.1.0
#16 0x033aa192 in PyObject_CallMethod () from /usr/lib/libpython2.5.so.1.0
#17 0x03456cf7 in Py_Main () from /usr/lib/libpython2.5.so.1.0
#18 0x080485d2 in main ()
Comment 1 Steve Tyler 2009-02-11 14:54:52 EST
Created attachment 331615 [details]
gdb backtrace for all three threads in core file

gdb -batch -x cmd1.txt /usr/bin/python core.5576 > x1.log

Not sure why gdb doesn't display the batch commands.

$ cat cmd1.txt 
info threads
thread apply all bt
Comment 2 Pekka Savola 2009-04-18 17:55:26 EDT
FWIW, I have hit this as well.  strace shows lots and lots of gettimeofday's.  When I saw this I actually had two instances of 'bittorrent-curses' running; one was exhibiting this problem, one wasn't. I wasn't able to get a core dump to verify whether this was the same thing.  In this case, download was very slot (in the order of 1-3 KB/s), not sure if that's relevant.

$ rpm -q python bittorrent
Comment 3 Bug Zapper 2009-11-18 04:50:25 EST
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 4 Paul Howarth 2009-11-18 05:27:38 EST
Can anybody reproduce this on F-11 or later?
Comment 5 Bug Zapper 2009-12-18 02:53:39 EST
Fedora 10 changed to end-of-life (EOL) status on 2009-12-17. Fedora 10 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.