[Kde-pim] kmail + 100% CPU
Martin Koller
kollix at aon.at
Fri Jun 11 15:18:37 BST 2010
Hi,
since KDE 4.5 beta1 (before I used 4.4.3) I see that kmail frequently (every few minutes) starts to use 100% CPU
for a minute or so.
I attached with gdb and got the following bt:
#0 0xb3b551eb in clock_gettime () from /lib/librt.so.1
#1 0xb5c75ffc in qt_gettime () at kernel/qcore_unix.cpp:111
#2 0xb5c7b446 in QTimerInfoList::updateCurrentTime (this=0x809c83c) at kernel/qeventdispatcher_unix.cpp:340
#3 0xb5c7d085 in QTimerInfoList::registerTimer (this=0x809c83c, timerId=16777237, interval=0, object=0x95bf6e8)
at kernel/qeventdispatcher_unix.cpp:476
#4 0xb5c78f9c in QEventDispatcherGlib::registerTimer (this=0x82c7480, timerId=16777237, interval=0, object=0x95bf6e8)
at kernel/qeventdispatcher_glib.cpp:513
#5 0xb5c3d761 in QAbstractEventDispatcher::registerTimer (this=0x82c7480, interval=0, object=0x95bf6e8)
at kernel/qabstracteventdispatcher.cpp:312
#6 0xb5c5c98c in QObject::startTimer (this=0xbf8ecb68, interval=-1279942668) at kernel/qobject.cpp:1630
#7 0xb5c683ce in QTimer::start (this=0x95bf6e8) at kernel/qtimer.cpp:215
#8 0xb5250714 in KIO::ConnectedSlaveQueue::startRunnableJobs (this=0x95bf6d8)
at /usr/src/debug/kdelibs-4.4.85/kio/kio/scheduler.cpp:331
#9 0xb5250af6 in KIO::ConnectedSlaveQueue::qt_metacall (this=0x95bf6d8, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=
0xbf8ecdec) at /usr/src/debug/kdelibs-4.4.85/build/kio/scheduler_p.moc:131
#10 0xb5c5199d in QMetaObject::metacall (object=0x95bf6d8, cl=3213806440, idx=4, argv=0xbf8ecdec)
at kernel/qmetaobject.cpp:237
#11 0xb5c60bb0 in QMetaObject::activate (sender=0x95bf6e8, m=0xb5d645a4, local_signal_index=0, argv=0x0)
at kernel/qobject.cpp:3287
#12 0xb5cb4cc5 in QTimer::timeout (this=0x95bf6e8) at .moc/release-shared/moc_qtimer.cpp:134
Checking with strace, I see that during normal operation the poll() call has a large timeout value (last arg), e.g.
poll([{fd=3, events=POLLIN}, {fd=9, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=5, events=POLLIN}, {fd=12, events=POLLIN}, {fd=18, events=POLLIN}], 7, 5283) = 0 (Timeout)
But when kmail goes wild, the timeout value of poll() is 0 leading to a busy loop:
poll([{fd=3, events=POLLIN}, {fd=9, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=5, events=POLLIN}, {fd=12, events=POLLIN}, {fd=18, events=POLLIN}, {fd=11, events=POLLIN}], 8, 0) = 0 (Timeout)
read(8, 0x80a2ae8, 4096) = -1 EAGAIN (Resource temporarily unavailable)
clock_gettime(CLOCK_MONOTONIC, {2964649, 636195762}) = 0
clock_gettime(CLOCK_MONOTONIC, {2964649, 636222721}) = 0
Immediately before that, I see in strace something like the start of a job which checks for mail, e.g.
socket(PF_FILE, SOCK_STREAM, 0) = 11
bind(11, {sa_family=AF_FILE, path="/tmp/ksocket-koller/kmailv28750.slave-socket"}, 47) = 0
listen(11, 5) = 0
...
writev(5, [{"l\1\0\1\26\0\0\0'\6\0\0\207\0\0\0\1\1o\0\25\0\0\0/org/fre"..., 152}, {"\21\0\0\0org.kde.klauncher\0", 22}], 2) = 174
So now the question is: where does that poll() come from and where to fix that timeout ?
Any ideas ?
As I do not see any kmail code in the bt, I assume it's some KDE global problem or kmail using a KDE functionality
in the wrong way.
--
Best regards/Schöne Grüße
Martin
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
Geschenkideen, Accessoires, Seifen, Kulinarisches: www.bibibest.at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20100611/30cd5aff/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list