Very slow loop in KMFolderImap #65

Open
opened 4 months ago by luke-jr · 0 comments
luke-jr commented 4 months ago
Collaborator

This has been a problem for years. Often, KMail gets stuck in this very slow loop and can take hours (but sometimes less):

Thread 1 (Thread 0x7f0a2bb73040 (LWP 21322) "kmail"):
#0  __memcmp_avx2_movbe () at ../sysdeps/x86_64/multiarch/memcmp-avx2-movbe.S:250
#1  0x00007f0a30f69bb7 in TQGArray::find(char const*, unsigned int, unsigned int) const () from /usr/lib64/libtqt-mt.so.3
#2  0x00007f0a319d2145 in KMFolderIndex::find(KMMsgBase const*) const () from /usr/trinity/14/lib64/libkmailprivate.so
#3  0x00007f0a31acf2b5 in KMMsgBase::getMsgSerNum() const () from /usr/trinity/14/lib64/libkmailprivate.so
#4  0x00007f0a31abd022 in KMFolderImap::slotListFolderResult(TDEIO::Job*) () from /usr/trinity/14/lib64/libkmailprivate.so
#5  0x00007f0a31ac3315 in KMFolderImap::tqt_invoke(int, TQUObject*) () from /usr/trinity/14/lib64/libkmailprivate.so
#6  0x00007f0a30cd356c in TQObject::activate_signal(TQConnectionList*, TQUObject*) () from /usr/lib64/libtqt-mt.so.3
#7  0x00007f0a2f39cd7c in TDEIO::Job::result(TDEIO::Job*) () from /usr/trinity/14/lib64/libtdeio.so.14
#8  0x00007f0a2f39ce1b in TDEIO::Job::emitResult() () from /usr/trinity/14/lib64/libtdeio.so.14
#9  0x00007f0a2f3aa6e1 in TDEIO::SimpleJob::slotFinished() () from /usr/trinity/14/lib64/libtdeio.so.14
#10 0x00007f0a2f3b1dd3 in TDEIO::ListJob::slotFinished() () from /usr/trinity/14/lib64/libtdeio.so.14
#11 0x00007f0a2f3bbe4b in TDEIO::ListJob::tqt_invoke(int, TQUObject*) () from /usr/trinity/14/lib64/libtdeio.so.14
#12 0x00007f0a30cd356c in TQObject::activate_signal(TQConnectionList*, TQUObject*) () from /usr/lib64/libtqt-mt.so.3
#13 0x00007f0a30cd376d in TQObject::activate_signal(int) () from /usr/lib64/libtqt-mt.so.3
#14 0x00007f0a2f38d51c in TDEIO::SlaveInterface::dispatch(int, TQMemArray<char> const&) () from /usr/trinity/14/lib64/libtdeio.so.14
#15 0x00007f0a2f38a8b8 in TDEIO::SlaveInterface::dispatch() () from /usr/trinity/14/lib64/libtdeio.so.14
#16 0x00007f0a2f387d64 in TDEIO::Slave::gotInput() () from /usr/trinity/14/lib64/libtdeio.so.14
#17 0x00007f0a2f38a727 in TDEIO::Slave::tqt_invoke(int, TQUObject*) () from /usr/trinity/14/lib64/libtdeio.so.14
#18 0x00007f0a30cd356c in TQObject::activate_signal(TQConnectionList*, TQUObject*) () from /usr/lib64/libtqt-mt.so.3
#19 0x00007f0a30cd38b8 in TQObject::activate_signal(int, int) () from /usr/lib64/libtqt-mt.so.3
#20 0x00007f0a30cf5752 in TQSocketNotifier::event(TQEvent*) () from /usr/lib64/libtqt-mt.so.3
#21 0x00007f0a30c754b9 in TQApplication::internalNotify(TQObject*, TQEvent*) () from /usr/lib64/libtqt-mt.so.3
#22 0x00007f0a30c75c2b in TQApplication::notify(TQObject*, TQEvent*) () from /usr/lib64/libtqt-mt.so.3
#23 0x00007f0a313f2539 in TDEApplication::notify(TQObject*, TQEvent*) () from /usr/trinity/14/lib64/libtdecore.so.14
#24 0x00007f0a30c6a934 in TQEventLoop::activateSocketNotifiers() () from /usr/lib64/libtqt-mt.so.3
#25 0x00007f0a30c54a72 in TQEventLoop::processEvents(unsigned int) () from /usr/lib64/libtqt-mt.so.3
#26 0x00007f0a30c8c68f in TQEventLoop::enterLoop() () from /usr/lib64/libtqt-mt.so.3
#27 0x00007f0a30c8c5d2 in TQEventLoop::exec() () from /usr/lib64/libtqt-mt.so.3
#28 0x0000562fd2c252cd in main ()

There should probably be some way to avoid the find, but I've looked at the code previously and didn't see an obvious/easy solution. :(

This has been a problem for years. Often, KMail gets stuck in this very slow loop and can take hours (but sometimes less): ``` Thread 1 (Thread 0x7f0a2bb73040 (LWP 21322) "kmail"): #0 __memcmp_avx2_movbe () at ../sysdeps/x86_64/multiarch/memcmp-avx2-movbe.S:250 #1 0x00007f0a30f69bb7 in TQGArray::find(char const*, unsigned int, unsigned int) const () from /usr/lib64/libtqt-mt.so.3 #2 0x00007f0a319d2145 in KMFolderIndex::find(KMMsgBase const*) const () from /usr/trinity/14/lib64/libkmailprivate.so #3 0x00007f0a31acf2b5 in KMMsgBase::getMsgSerNum() const () from /usr/trinity/14/lib64/libkmailprivate.so #4 0x00007f0a31abd022 in KMFolderImap::slotListFolderResult(TDEIO::Job*) () from /usr/trinity/14/lib64/libkmailprivate.so #5 0x00007f0a31ac3315 in KMFolderImap::tqt_invoke(int, TQUObject*) () from /usr/trinity/14/lib64/libkmailprivate.so #6 0x00007f0a30cd356c in TQObject::activate_signal(TQConnectionList*, TQUObject*) () from /usr/lib64/libtqt-mt.so.3 #7 0x00007f0a2f39cd7c in TDEIO::Job::result(TDEIO::Job*) () from /usr/trinity/14/lib64/libtdeio.so.14 #8 0x00007f0a2f39ce1b in TDEIO::Job::emitResult() () from /usr/trinity/14/lib64/libtdeio.so.14 #9 0x00007f0a2f3aa6e1 in TDEIO::SimpleJob::slotFinished() () from /usr/trinity/14/lib64/libtdeio.so.14 #10 0x00007f0a2f3b1dd3 in TDEIO::ListJob::slotFinished() () from /usr/trinity/14/lib64/libtdeio.so.14 #11 0x00007f0a2f3bbe4b in TDEIO::ListJob::tqt_invoke(int, TQUObject*) () from /usr/trinity/14/lib64/libtdeio.so.14 #12 0x00007f0a30cd356c in TQObject::activate_signal(TQConnectionList*, TQUObject*) () from /usr/lib64/libtqt-mt.so.3 #13 0x00007f0a30cd376d in TQObject::activate_signal(int) () from /usr/lib64/libtqt-mt.so.3 #14 0x00007f0a2f38d51c in TDEIO::SlaveInterface::dispatch(int, TQMemArray<char> const&) () from /usr/trinity/14/lib64/libtdeio.so.14 #15 0x00007f0a2f38a8b8 in TDEIO::SlaveInterface::dispatch() () from /usr/trinity/14/lib64/libtdeio.so.14 #16 0x00007f0a2f387d64 in TDEIO::Slave::gotInput() () from /usr/trinity/14/lib64/libtdeio.so.14 #17 0x00007f0a2f38a727 in TDEIO::Slave::tqt_invoke(int, TQUObject*) () from /usr/trinity/14/lib64/libtdeio.so.14 #18 0x00007f0a30cd356c in TQObject::activate_signal(TQConnectionList*, TQUObject*) () from /usr/lib64/libtqt-mt.so.3 #19 0x00007f0a30cd38b8 in TQObject::activate_signal(int, int) () from /usr/lib64/libtqt-mt.so.3 #20 0x00007f0a30cf5752 in TQSocketNotifier::event(TQEvent*) () from /usr/lib64/libtqt-mt.so.3 #21 0x00007f0a30c754b9 in TQApplication::internalNotify(TQObject*, TQEvent*) () from /usr/lib64/libtqt-mt.so.3 #22 0x00007f0a30c75c2b in TQApplication::notify(TQObject*, TQEvent*) () from /usr/lib64/libtqt-mt.so.3 #23 0x00007f0a313f2539 in TDEApplication::notify(TQObject*, TQEvent*) () from /usr/trinity/14/lib64/libtdecore.so.14 #24 0x00007f0a30c6a934 in TQEventLoop::activateSocketNotifiers() () from /usr/lib64/libtqt-mt.so.3 #25 0x00007f0a30c54a72 in TQEventLoop::processEvents(unsigned int) () from /usr/lib64/libtqt-mt.so.3 #26 0x00007f0a30c8c68f in TQEventLoop::enterLoop() () from /usr/lib64/libtqt-mt.so.3 #27 0x00007f0a30c8c5d2 in TQEventLoop::exec() () from /usr/lib64/libtqt-mt.so.3 #28 0x0000562fd2c252cd in main () ``` There should probably be some way to avoid the `find`, but I've looked at the code previously and didn't see an obvious/easy solution. :(
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.