Version: kmail 1.7, running on KDE 3.3.0 (using KDE KDE 3.3.0) Installed from: SuSE RPMs OS: Linux When I start kmail, directly or as a part of Kontact, it starts up eating almost all cpu time. I have this since upgrading to KDE 3.3 on a SuSE 9.1 Professional box. It sometimes goes away after a few restarts of kmail, sometimes even a reboot doesn't help. Attached you can find the output of 'strace -s 256 -f' and the output of 'rpm -q -i -f /opt/kde3/bin/kmail'.
Created attachment 7493 [details] strace -s 256 -f kmail > kmail.strace 2>&1 The original size of the trace is 16M, I didn't want to cut, afraid of cutting important stuff. The cpu eating loop can be found more to the end of the trace.
Created attachment 7494 [details] rpm -q -i -f /opt/kde3/bin/kmail > kmail_rpm.txt rpm version output of kdepim3
I get something similar, except it is 'only' about 50%-60% of CPU. It appears to be looping in a call to gettimeofday() as well as select: xx@xxxx $ strace -c -p 17155 % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 53.22 0.379797 1323 287 select 33.47 0.238840 85 2801 gettimeofday 10.06 0.071802 1408 51 write 2.32 0.016587 44 377 ioctl 0.92 0.006544 187 35 read ------ ----------- ----------- --------- --------- ---------------- 100.00 0.713570 3551 total
Since upgrading to KDE 3.3.0, and that's stil valid with KDE 3.3.1, even after recompiling myself, I see that when kmail is stayed open, its CPU usage grow slowly but surely, probably for the reasons given in previous posts. I use a Slackware-current on different systems (usualy AMD-based but with a mixed of Duron, AthlonXP, Athlon64 and Opteron) but experience this on all the systems. I confirm this is a very annoying one.
*** Bug 90811 has been marked as a duplicate of this bug. ***
Till, you asked in the duplicate Bug ID 90811 whether it was the background mail expiry kicking in. I don't think so as the rise in CPU usage continues over a period of hours. I have left KMail open overnight (but have to shut it down in the morning to use my computer) and the CPU will be at about 60%. If you need further info, I'd love to help as its quite frustrating. I've moved over to Thunderbird for now, but I much prefer KMail.
Can any one of you maybe get us a calltree (valgrind) log of KMail running in this "mode"? Then we could see what it is doing. till
OK, I just compile the stuff, understand how it works and I'll try to post something. Thanks for your time, BTW. I've been using Kmail for 3 years now and I'm quite happy with it.
Well, I cannot attach a file bigger than 1000kB. Even in tar.bz2, I have a 1.5MB file. How can I send it to someone? Using the mail would be OK?
On Sunday 24 October 2004 15:39, Richard Van Den Boom wrote: > Well, I cannot attach a file bigger than 1000kB. Even in tar.bz2, I have a > 1.5MB file. How can I send it to someone? Using the mail would be OK? adam@kde.org, please
I have seen this too (recent cvs)... kmail using 80% of the cpu. But I had closed kmail! I killed the process - now I get "kmail: account Roger (Norran) busy, queuing" but it is not using CPU. (I get lots of spam on this account, I can read it using webmail...) Trying to close kmail - it does not go away! Could it be kmail continuing to download messages after close? Or is it waiting for kio_pop3 to exit? (I tried to kill the kio - kmail pops up an message about unexpected exit but respawns it...)
*** This bug has been confirmed by popular vote. ***
What is kmail doing after close button is pressed? No, I do not have "empty local trash folder on exit" enabled.
I get heavy (20% of 2.4 GHz) usage when I select the second message in my inbox (it currently has about 2000 messages in it), and *then* select the first. The first (most recent) is plain text. The second has an image attachment, and both html and plain text bits.
Ok, I have found what causes my particular heavy CPU usage (not sure if it is the same as others' select/gettimeofday ones). If I select a message from someone in whose email address I have associated with an MSN contact, then the CPU usage goes high and never returns. Also, if kmail starts with the selected message being from one of my MSN contacts, then their online presence (Next to the From: line) is not shown. If I select a different message, then select that one again, it is shown, and the CPU usage goes up. It *doesn't* go up if I go into the address manager and look at their online status there.
On Saturday 12 March 2005 17:08, Tim Hutt wrote: > If I select a message from someone in whose email address I have associated > with an MSN contact, then the CPU usage goes high and never returns. Will, is this the IM Proxy deadlock? Fixed, right? Till
The kimproxy+imap resource deadlock doesn't thrash the cpu. Could well be another bug in kimproxy, but the changes I made to KIMProxy for 3.4 to avoid the kimproxy+imap resource deadlock make kimproxy a lot more passive, so changing mails and fetching sender presence shouldn't cause any dcop activity, which is what the select,gettimeofday,read looks like. Tim, what version of KDE do you have? Can anyone with KDE 3.4 make the CPU spin when changing onto a message sent by someone with an IM address associated from Kopete? -- "Also, if kmail starts with the selected message being from one of my MSN contacts, then their online presence (Next to the From: line) is not shown. If I select a different message, then select that one again, it is shown, and the CPU usage goes up." I didn't find a way in KMail to cleanly update the mail view in response to a status change so I took a very passive approach to updates - just on change. this problem sounds like it could be related to that
Sorry for not replying for ages. Should have added myself to the cc's. Anyway, I'm using KDE 3.3.2 with kmail 1.7.2 and kopete 0.9.2 I installed strace and did some tests: top: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 23283 t 25 0 41104 27m 20m R 95.4 3.6 0:44.05 kmail 9071 t 15 0 29472 15m 12m S 2.3 2.1 0:04.35 artsd 9980 t 15 0 29472 15m 12m S 1.3 2.1 2:00.57 artsd 9615 root 15 0 4356 1724 1344 S 0.3 0.2 0:10.48 nmbd .... strace: t@freddy ~ $ strace -c -p 23283 Process 23283 attached - interrupt to quit Process 23283 detached % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 74.93 1.499381 10 147138 gettimeofday 15.79 0.315964 6 49232 select 9.28 0.185620 4 49040 ioctl 0.01 0.000119 119 1 write ------ ----------- ----------- --------- --------- ---------------- 100.00 2.001084 245411 total gdb: t@freddy ~ $ gdb program 23283 GNU gdb 6.2 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu"...program: No such file or directory. Attaching to process 23283 Reading symbols from /usr/kde/3.3/bin/kmail...done. Using host libthread_db library "/lib/libthread_db.so.1". Reading symbols from [lots of places] [Thread debugging using libthread_db enabled] [New Thread 16384 (LWP 23283)] Loaded symbols for [lots of things] 0xb61db9cc in __pthread_alt_lock () from /lib/libpthread.so.0 (gdb) break gettimeofday Breakpoint 1 at 0xb60384f0 (gdb) cont Continuing. [Switching to Thread 16384 (LWP 23283)] Breakpoint 1, 0xb60384f0 in gettimeofday () from /lib/libc.so.6 (gdb) bt #0 0xb60384f0 in gettimeofday () from /lib/libc.so.6 #1 0xb665c144 in QEventLoop::activateSocketNotifiers () from /usr/qt/3/lib/libqt-mt.so.3 #2 0xb665b462 in qStartTimer () from /usr/qt/3/lib/libqt-mt.so.3 #3 0xb66c66aa in QObject::startTimer () from /usr/qt/3/lib/libqt-mt.so.3 #4 0xb66ea3cc in QTimer::start () from /usr/qt/3/lib/libqt-mt.so.3 #5 0xb68014f1 in QTipManager::eventFilter () from /usr/qt/3/lib/libqt-mt.so.3 #6 0xb666c95d in QApplication::internalNotify () from /usr/qt/3/lib/libqt-mt.so.3 #7 0xb666bd24 in QApplication::notify () from /usr/qt/3/lib/libqt-mt.so.3 #8 0xb6ca44cb in KApplication::notify () from /usr/kde/3.3/lib/libkdecore.so.4 #9 0xbffff410 in ?? () #10 0x084b99e8 in ?? () #11 0xb7218a43 in KIO::DataSlave::qt_invoke () from /usr/kde/3.3/lib/libkio.so.4 #12 0xbfffed00 in ?? () #13 0xb66c8cfc in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3 Previous frame inner to this frame (corrupt stack?) (gdb) cont Continuing. Breakpoint 1, 0xb60384f0 in gettimeofday () from /lib/libc.so.6 (gdb) bt #0 0xb60384f0 in gettimeofday () from /lib/libc.so.6 #1 0xb69745d0 in QTime::currentTime () from /usr/qt/3/lib/libqt-mt.so.3 #2 0xb697536d in QDateTime::currentDateTime () from /usr/qt/3/lib/libqt-mt.so.3 #3 0xb69752eb in QDateTime::currentDateTime () from /usr/qt/3/lib/libqt-mt.so.3 #4 0xb79b6b81 in QXmlAttributes::~QXmlAttributes () from /usr/kde/3.3/lib/libkhtml.so.4 (gdb) cont Continuing. Breakpoint 1, 0xb60384f0 in gettimeofday () from /lib/libc.so.6 (gdb) bt #0 0xb60384f0 in gettimeofday () from /lib/libc.so.6 #1 0xb665c144 in QEventLoop::activateSocketNotifiers () from /usr/qt/3/lib/libqt-mt.so.3 #2 0xb665b462 in qStartTimer () from /usr/qt/3/lib/libqt-mt.so.3 #3 0xb66c66aa in QObject::startTimer () from /usr/qt/3/lib/libqt-mt.so.3 #4 0xb66ea3cc in QTimer::start () from /usr/qt/3/lib/libqt-mt.so.3 #5 0xb68014f1 in QTipManager::eventFilter () from /usr/qt/3/lib/libqt-mt.so.3 #6 0xb666c95d in QApplication::internalNotify () from /usr/qt/3/lib/libqt-mt.so.3 #7 0xb666bd24 in QApplication::notify () from /usr/qt/3/lib/libqt-mt.so.3 #8 0xb6ca44cb in KApplication::notify () from /usr/kde/3.3/lib/libkdecore.so.4 #9 0xbffff410 in ?? () #10 0x084b99e8 in ?? () #11 0xb7218a43 in KIO::DataSlave::qt_invoke () from /usr/kde/3.3/lib/libkio.so.4 #12 0xb6b36c50 in QApplication::main_widget () from /usr/qt/3/lib/libqt-mt.so.3 #13 0x00000000 in ?? () #14 0x084b99e8 in ?? () #15 0x00000006 in ?? () #16 0xbfffed00 in ?? () #17 0x016c5b86 in ?? () #18 0x0840d230 in ?? () #19 0xbffff410 in ?? () #20 0x00000000 in ?? () #21 0x084d0498 in ?? () #22 0xb6b38640 in TID_QUType_Null () from /usr/qt/3/lib/libqt-mt.so.3 #23 0xbfffece0 in ?? () #24 0xffffffff in ?? () #25 0xffffffff in ?? () #26 0xb6dbfea8 in ?? () from /usr/kde/3.3/lib/libkdecore.so.4 #27 0x00000000 in ?? () #28 0xb6dcdce4 in kde_malloc_is_used () from /usr/kde/3.3/lib/libkdecore.so.4 ---Type <return> to continue, or q <return> to quit--- #29 0xb6d0ed11 in KAccelEventHandler::x11Event () from /usr/kde/3.3/lib/libkdecore.so.4 #30 0xbfffeef0 in ?? () #31 0xb6ca86b5 in KApplication::x11EventFilter () from /usr/kde/3.3/lib/libkdecore.so.4 #32 0x08082528 in ?? () #33 0xbfffeeec in ?? () #34 0xbfffef68 in ?? () #35 0xb6262e2a in XPutBackEvent () from /usr/lib/libX11.so.6 #36 0xb6b36c20 in QAccelManager::self_ptr () from /usr/qt/3/lib/libqt-mt.so.3 #37 0xbfffef68 in ?? () #38 0xb6601fa0 in QETWidget::translateMouseEvent () from /usr/qt/3/lib/libqt-mt.so.3 Previous frame inner to this frame (corrupt stack?) (gdb) Continuing. Breakpoint 1, 0xb60384f0 in gettimeofday () from /lib/libc.so.6 (gdb) bt #0 0xb60384f0 in gettimeofday () from /lib/libc.so.6 #1 0xb69745d0 in QTime::currentTime () from /usr/qt/3/lib/libqt-mt.so.3 #2 0xb697536d in QDateTime::currentDateTime () from /usr/qt/3/lib/libqt-mt.so.3 #3 0xb69752eb in QDateTime::currentDateTime () from /usr/qt/3/lib/libqt-mt.so.3 #4 0xb79b6b81 in QXmlAttributes::~QXmlAttributes () from /usr/kde/3.3/lib/libkhtml.so.4 (gdb) cont Continuing. Breakpoint 1, 0xb60384f0 in gettimeofday () from /lib/libc.so.6 (gdb) bt #0 0xb60384f0 in gettimeofday () from /lib/libc.so.6 #1 0xb665c144 in QEventLoop::activateSocketNotifiers () from /usr/qt/3/lib/libqt-mt.so.3 #2 0xb665b462 in qStartTimer () from /usr/qt/3/lib/libqt-mt.so.3 #3 0xb66c66aa in QObject::startTimer () from /usr/qt/3/lib/libqt-mt.so.3 #4 0xb66ea3cc in QTimer::start () from /usr/qt/3/lib/libqt-mt.so.3 #5 0xb68014f1 in QTipManager::eventFilter () from /usr/qt/3/lib/libqt-mt.so.3 #6 0xb666c95d in QApplication::internalNotify () from /usr/qt/3/lib/libqt-mt.so.3 #7 0xb666bd24 in QApplication::notify () from /usr/qt/3/lib/libqt-mt.so.3 #8 0xb6ca44cb in KApplication::notify () from /usr/kde/3.3/lib/libkdecore.so.4 #9 0xbffff410 in ?? () #10 0x084b99e8 in ?? () #11 0xb7218a43 in KIO::DataSlave::qt_invoke () from /usr/kde/3.3/lib/libkio.so.4 #12 0xb6b36c50 in QApplication::main_widget () from /usr/qt/3/lib/libqt-mt.so.3 #13 0x00000000 in ?? () #14 0x084b99e8 in ?? () #15 0x00000006 in ?? () #16 0xbfffed00 in ?? () #17 0x016c5b86 in ?? () #18 0x0840d230 in ?? () #19 0xbffff410 in ?? () #20 0x00000000 in ?? () #21 0x084d0498 in ?? () #22 0xb6b38640 in TID_QUType_Null () from /usr/qt/3/lib/libqt-mt.so.3 #23 0xbfffece0 in ?? () #24 0xffffffff in ?? () #25 0xffffffff in ?? () #26 0xb6dbfea8 in ?? () from /usr/kde/3.3/lib/libkdecore.so.4 #27 0x00000000 in ?? () #28 0xb6dcdce4 in kde_malloc_is_used () from /usr/kde/3.3/lib/libkdecore.so.4 ---Type <return> to continue, or q <return> to quit--- #29 0xb6d0ed11 in KAccelEventHandler::x11Event () from /usr/kde/3.3/lib/libkdecore.so.4 #30 0xbfffeef0 in ?? () #31 0xb6ca86b5 in KApplication::x11EventFilter () from /usr/kde/3.3/lib/libkdecore.so.4 #32 0x08082528 in ?? () #33 0xbfffeeec in ?? () #34 0xbfffef68 in ?? () #35 0xb6262e2a in XPutBackEvent () from /usr/lib/libX11.so.6 #36 0xb6b36c20 in QAccelManager::self_ptr () from /usr/qt/3/lib/libqt-mt.so.3 #37 0xbfffef68 in ?? () #38 0xb6601fa0 in QETWidget::translateMouseEvent () from /usr/qt/3/lib/libqt-mt.so.3 Previous frame inner to this frame (corrupt stack?) (gdb) cont Continuing. Breakpoint 1, 0xb60384f0 in gettimeofday () from /lib/libc.so.6 (gdb) bt #0 0xb60384f0 in gettimeofday () from /lib/libc.so.6 #1 0xb69745d0 in QTime::currentTime () from /usr/qt/3/lib/libqt-mt.so.3 #2 0xb697536d in QDateTime::currentDateTime () from /usr/qt/3/lib/libqt-mt.so.3 #3 0xb69752eb in QDateTime::currentDateTime () from /usr/qt/3/lib/libqt-mt.so.3 #4 0xb79b6b81 in QXmlAttributes::~QXmlAttributes () from /usr/kde/3.3/lib/libkhtml.so.4 (gdb) cont Continuing. Breakpoint 1, 0xb60384f0 in gettimeofday () from /lib/libc.so.6 (gdb) bt #0 0xb60384f0 in gettimeofday () from /lib/libc.so.6 #1 0xb665c144 in QEventLoop::activateSocketNotifiers () from /usr/qt/3/lib/libqt-mt.so.3 #2 0xb665b462 in qStartTimer () from /usr/qt/3/lib/libqt-mt.so.3 #3 0xb66ea620 in QSingleShotTimer::start () from /usr/qt/3/lib/libqt-mt.so.3 #4 0xb66ea6eb in QTimer::singleShot () from /usr/qt/3/lib/libqt-mt.so.3 #5 0xb6802151 in QTipManager::hideTip () from /usr/qt/3/lib/libqt-mt.so.3 #6 0xb68015fb in QTipManager::eventFilter () from /usr/qt/3/lib/libqt-mt.so.3 #7 0xb666c95d in QApplication::internalNotify () from /usr/qt/3/lib/libqt-mt.so.3 #8 0xb666bc25 in QApplication::notify () from /usr/qt/3/lib/libqt-mt.so.3 #9 0xb6ca44cb in KApplication::notify () from /usr/kde/3.3/lib/libkdecore.so.4 #10 0xbffff410 in ?? () #11 0x000004d6 in ?? () #12 0x000003c7 in ?? () #13 0x00000000 in ?? () #14 0xb6d84d53 in malloc () from /usr/kde/3.3/lib/libkdecore.so.4 #15 0xb61ad594 in ?? () from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/libstdc++.so.5 #16 0x082632f8 in ?? () #17 0x00000010 in ?? () #18 0xb6dcdd00 in kde_malloc_is_used () from /usr/kde/3.3/lib/libkdecore.so.4 #19 0xb6dbfea8 in ?? () from /usr/kde/3.3/lib/libkdecore.so.4 #20 0x00000000 in ?? () #21 0xb6dcdce4 in kde_malloc_is_used () from /usr/kde/3.3/lib/libkdecore.so.4 #22 0xbfffee98 in ?? () #23 0xb6d84d53 in malloc () from /usr/kde/3.3/lib/libkdecore.so.4 #24 0xb61ad594 in ?? () from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/libstdc++.so.5 #25 0x0829ab98 in ?? () #26 0xbfffef30 in ?? () #27 0xb618b4c3 in operator new () from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/libstdc++.so.5 Previous frame inner to this frame (corrupt stack?) (gdb) cont Continuing. Breakpoint 1, 0xb60384f0 in gettimeofday () from /lib/libc.so.6 (gdb) bt #0 0xb60384f0 in gettimeofday () from /lib/libc.so.6 #1 0xb665c144 in QEventLoop::activateSocketNotifiers () from /usr/qt/3/lib/libqt-mt.so.3 #2 0xb665b462 in qStartTimer () from /usr/qt/3/lib/libqt-mt.so.3 #3 0xb66c66aa in QObject::startTimer () from /usr/qt/3/lib/libqt-mt.so.3 #4 0xb66ea3cc in QTimer::start () from /usr/qt/3/lib/libqt-mt.so.3 #5 0xb68014f1 in QTipManager::eventFilter () from /usr/qt/3/lib/libqt-mt.so.3 #6 0xb666c95d in QApplication::internalNotify () from /usr/qt/3/lib/libqt-mt.so.3 #7 0xb666bd24 in QApplication::notify () from /usr/qt/3/lib/libqt-mt.so.3 #8 0xb6ca44cb in KApplication::notify () from /usr/kde/3.3/lib/libkdecore.so.4 #9 0xbffff410 in ?? () #10 0x084b99e8 in ?? () #11 0xb7218a43 in KIO::DataSlave::qt_invoke () from /usr/kde/3.3/lib/libkio.so.4 #12 0xb6b36c50 in QApplication::main_widget () from /usr/qt/3/lib/libqt-mt.so.3 #13 0x00000000 in ?? () #14 0x084b99e8 in ?? () #15 0x00000006 in ?? () #16 0xbfffed00 in ?? () #17 0x016c5b86 in ?? () #18 0x0840d230 in ?? () #19 0xbffff410 in ?? () #20 0x00000000 in ?? () #21 0x084d0498 in ?? () #22 0xb6b38640 in TID_QUType_Null () from /usr/qt/3/lib/libqt-mt.so.3 #23 0xbfffece0 in ?? () #24 0xffffffff in ?? () #25 0xffffffff in ?? () #26 0xb6dbfea8 in ?? () from /usr/kde/3.3/lib/libkdecore.so.4 #27 0x00000000 in ?? () #28 0xb6dcdce4 in kde_malloc_is_used () from /usr/kde/3.3/lib/libkdecore.so.4 ---Type <return> to continue, or q <return> to quit--- #29 0xb6d0ed11 in KAccelEventHandler::x11Event () from /usr/kde/3.3/lib/libkdecore.so.4 #30 0xbfffeef0 in ?? () #31 0xb6ca86b5 in KApplication::x11EventFilter () from /usr/kde/3.3/lib/libkdecore.so.4 #32 0x08082528 in ?? () #33 0xbfffeeec in ?? () #34 0xbfffef68 in ?? () #35 0xb6262e2a in XPutBackEvent () from /usr/lib/libX11.so.6 #36 0xb6b36c20 in QAccelManager::self_ptr () from /usr/qt/3/lib/libqt-mt.so.3 #37 0xbfffef68 in ?? () #38 0xb6601fa0 in QETWidget::translateMouseEvent () from /usr/qt/3/lib/libqt-mt.so.3 Previous frame inner to this frame (corrupt stack?) Hope this helps.
Sorry, is this still valid?