Bug 483141 - KMail doesn't exit/froze/hung
Summary: KMail doesn't exit/froze/hung
Status: REPORTED
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: 6.0.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-03-10 17:50 UTC by Dāvis
Modified: 2024-03-10 18:33 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
backtrace of stuck KMail (74.54 KB, text/plain)
2024-03-10 17:50 UTC, Dāvis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dāvis 2024-03-10 17:50:50 UTC
Created attachment 166893 [details]
backtrace of stuck KMail

SUMMARY

I have close to 300k emails (shows up like ~500k+) from GMail I'm trying to filter/move to local mailbox.
In KMail I select "Apply All Filters" and then it slowly processes those - it's taking forever.
Anyway issue is that KMail was using a lot of RAM (~6 GiB) and I was running low on free RAM so I did `pkill kmail`.
While that did remove KMail from Plasma task panel the process still stayed stuck (using all that RAM) and didn't exit.

STEPS TO REPRODUCE

No idea

OBSERVED RESULT

KMail process stuck after issuing SIGTERM

EXPECTED RESULT

KMail to exit

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION

I attached backtrace of this stuck running KMail.
Here's the main thread:

Thread 1 (Thread 0x7b18d0238100 (LWP 48119) "kmail"):
#0  0x00007b18e9d190bf in __GI___poll (fds=0x5b85fef1ade0, nfds=3, timeout=475) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007b18e5d932f6 in g_main_context_poll_unlocked (priority=2147483647, n_fds=3, fds=0x5b85fef1ade0, timeout=<optimized out>, context=0x7b18c8000ef0) at ../glib/glib/gmain.c:4653
#2  g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x7b18c8000ef0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4344
#3  0x00007b18e5d33162 in g_main_context_iteration (context=0x7b18c8000ef0, may_block=1) at ../glib/glib/gmain.c:4414
#4  0x00007b18e91739c4 in QEventDispatcherGlib::processEvents (this=0x5b85fe9255d0, flags=...) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventdispatcher_glib.cpp:393
#5  0x00007b18e8f43d6e in QEventLoop::processEvents (flags=..., this=0x7fff90a5ead0) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventloop.cpp:100
#6  QEventLoop::exec (this=0x7fff90a5ead0, flags=...) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventloop.cpp:182
#7  0x00007b18e8f3c2b8 in QCoreApplication::exec () at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/global/qflags.h:74
#8  0x00007b18e9ef0f0a in QApplication::exec () at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/widgets/kernel/qapplication.cpp:2574
#9  0x00005b85fd0acc78 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kmail/kmail-24.02.0/src/main.cpp:174


It looks like it's stuck in event loop and haven't realized it should exit.
this does nothing:
> $ pkill -e --signal SIGTERM kmail
> kmail killed (pid 48119)
> $ cat /proc/48119/cmdline
> /usr/bin/kmail-qwindowtitleKMail

SIGKILL of course works.