This happens occasionally. KMail consumes 100% of one CPU core for many hours, then eventually stops. Restart doesn't help. When attaching gdb and interrupting it, almost always one gets a trace similar to this: (gdb) bt #0 0x00007fc5bca098b3 in QTextEngine::validate() const () from /usr/lib/libQt5Gui.so.5 #1 0x00007fc5bca10792 in QTextEngine::itemize() const () from /usr/lib/libQt5Gui.so.5 #2 0x00007fc5bca1321d in QTextEngine::findItem(int, int) const () from /usr/lib/libQt5Gui.so.5 #3 0x00007fc5bca14e04 in QTextEngine::shapeLine(QScriptLine const&) () from /usr/lib/libQt5Gui.so.5 #4 0x00007fc5bca21c62 in QTextLine::cursorToX(int*, QTextLine::Edge) const () from /usr/lib/libQt5Gui.so.5 #5 0x00007fc5bca6aa64 in QTextCursorPrivate::setX() () from /usr/lib/libQt5Gui.so.5 #6 0x00007fc5bca6f658 in QTextCursor::insertText(QString const&, QTextCharFormat const&) () from /usr/lib/libQt5Gui.so.5 #7 0x00007fc5bca700ba in QTextCursor::insertText(QString const&) () from /usr/lib/libQt5Gui.so.5 #8 0x00007fc5ba2131ba in Sonnet::Highlighter::slotRehighlight() () from /usr/lib/libKF5SonnetUi.so.5 #9 0x00007fc5bc5b3a7c in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5 #10 0x00007fc5bc5bfbe8 in QTimer::timeout(QTimer::QPrivateSignal) () from /usr/lib/libQt5Core.so.5 #11 0x00007fc5bc5b430b in QObject::event(QEvent*) () from /usr/lib/libQt5Core.so.5 #12 0x00007fc5bcf01e14 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5 #13 0x00007fc5bcf096e1 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5 #14 0x00007fc5bc589c39 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5 #15 0x00007fc5bc5dc39a in QTimerInfoList::activateTimers() () from /usr/lib/libQt5Core.so.5 #16 0x00007fc5bc5dcc5a in ?? () from /usr/lib/libQt5Core.so.5 #17 0x00007fc5b89d93cf in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #18 0x00007fc5b89daf89 in ?? () from /usr/lib/libglib-2.0.so.0 #19 0x00007fc5b89dafce in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #20 0x00007fc5bc5dcfc9 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5 #21 0x00007fc5a0463e12 in ?? () from /usr/lib/libQt5XcbQpa.so.5 #22 0x00007fc5bc5888cc in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5 #23 0x00007fc5bc590bc6 in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5 #24 0x000055d46759af60 in ?? () #25 0x00007fc5bbfe9223 in __libc_start_main () from /usr/lib/libc.so.6 #26 0x000055d46759b11e in _start ()
Actually, right after writing the report, I found a correlation: closing the composer window I had open removed the CPU usage. Opening it again (just "new message") reproduces the problem.