Bug 409515

Summary: sometimes crashes when fetching mail
Product: [Frameworks and Libraries] Akonadi Reporter: Martin Koller <kollix>
Component: POP3 ResourceAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED WORKSFORME    
Severity: crash CC: aacid, stakanov.s
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: crash example
a1 attachment of first resource crashing
a2 attachment of second resource crashing
a3 dmesg output of the wlan crash prior to the pop crash

Description Martin Koller 2019-07-05 05:59:20 UTC
SUMMARY
Not much to say more than the title.
It usually works, but sometimes crashes.

Application: akonadi_pop3_resource (akonadi_pop3_resource), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f877983ed80 (LWP 22271))]

Thread 5 (Thread 0x7f87574a5700 (LWP 22404)):
#0  0x00007f87759540bb in poll () from /lib64/libc.so.6
#1  0x00007f8770550229 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f877055033c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f87764ba51b in QEventDispatcherGlib::processEvents (this=0x7f874c000b10, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007f877645abaa in QEventLoop::exec (this=this@entry=0x7f87574a4cb0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#5  0x00007f8776276dba in QThread::exec (this=<optimized out>) at thread/qthread.cpp:531
#6  0x00007f8776278562 in QThreadPrivate::start (arg=0x55a014a129e0) at thread/qthread_unix.cpp:360
#7  0x00007f8772156569 in start_thread () from /lib64/libpthread.so.0
#8  0x00007f877595e85f in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f8757ca6700 (LWP 22347)):
#0  0x00007f87759540bb in poll () from /lib64/libc.so.6
#1  0x00007f8770550229 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f877055033c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f87764ba51b in QEventDispatcherGlib::processEvents (this=0x7f8748000b10, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007f877645abaa in QEventLoop::exec (this=this@entry=0x7f8757ca5cb0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#5  0x00007f8776276dba in QThread::exec (this=<optimized out>) at thread/qthread.cpp:531
#6  0x00007f8776278562 in QThreadPrivate::start (arg=0x55a014ab99e0) at thread/qthread_unix.cpp:360
#7  0x00007f8772156569 in start_thread () from /lib64/libpthread.so.0
#8  0x00007f877595e85f in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f87586f2700 (LWP 22340)):
#0  0x00007f87764b8c8a in QTimerInfoList::timerWait (this=0x7f8750004ce0, tm=...) at kernel/qtimerinfo_unix.cpp:413
#1  0x00007f87764ba27e in timerSourcePrepareHelper (timeout=0x7f87586f1ab4, src=<optimized out>) at kernel/qeventdispatcher_glib.cpp:133
#2  timerSourcePrepare (source=<optimized out>, timeout=0x7f87586f1ab4) at kernel/qeventdispatcher_glib.cpp:166
#3  0x00007f877054f789 in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#4  0x00007f877055015b in ?? () from /usr/lib64/libglib-2.0.so.0
#5  0x00007f877055033c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#6  0x00007f87764ba51b in QEventDispatcherGlib::processEvents (this=0x7f8750000b10, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#7  0x00007f877645abaa in QEventLoop::exec (this=this@entry=0x7f87586f1c80, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#8  0x00007f8776276dba in QThread::exec (this=<optimized out>) at thread/qthread.cpp:531
#9  0x00007f87777a2e35 in ?? () from /usr/lib64/libQt5DBus.so.5
#10 0x00007f8776278562 in QThreadPrivate::start (arg=0x7f8777a1ad80) at thread/qthread_unix.cpp:360
#11 0x00007f8772156569 in start_thread () from /lib64/libpthread.so.0
#12 0x00007f877595e85f in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f8765487700 (LWP 22301)):
#0  0x00007f87759540bb in poll () from /lib64/libc.so.6
#1  0x00007f876def6387 in ?? () from /usr/lib64/libxcb.so.1
#2  0x00007f876def7fba in xcb_wait_for_event () from /usr/lib64/libxcb.so.1
#3  0x00007f876827b898 in QXcbEventQueue::run (this=0x55a01486ecc0) at qxcbeventqueue.cpp:228
#4  0x00007f8776278562 in QThreadPrivate::start (arg=0x55a01486ecc0) at thread/qthread_unix.cpp:360
#5  0x00007f8772156569 in start_thread () from /lib64/libpthread.so.0
#6  0x00007f877595e85f in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f877983ed80 (LWP 22271)):
[KCrash Handler]
#6  std::__atomic_base<int>::load (__m=std::memory_order_relaxed, this=0x200000003) at /usr/include/c++/7/bits/atomic_base.h:396
#7  QAtomicOps<int>::load<int> (_q_value=...) at /usr/include/qt5/QtCore/qatomic_cxx11.h:227
#8  QBasicAtomicInteger<int>::load (this=0x200000003) at /usr/include/qt5/QtCore/qbasicatomic.h:103
#9  QWeakPointer<QObject>::data (this=0x55a0149e3860) at /usr/include/qt5/QtCore/qsharedpointer_impl.h:569
#10 QPointer<KIO::Slave>::data (this=0x55a0149e3860) at /usr/include/qt5/QtCore/qpointer.h:86
#11 QPointer<KIO::Slave>::operator KIO::Slave* (this=0x55a0149e3860) at /usr/include/qt5/QtCore/qpointer.h:92
#12 POPSession::getSlave (this=0x55a0149e3850) at /usr/src/debug/kdepim-runtime-19.04.2-lp150.174.3.x86_64/resources/pop3/jobs.cpp:171
#13 LoginJob::slaveConnected (this=0x55a0149e39d0, slave=0x55a0149a1d10) at /usr/src/debug/kdepim-runtime-19.04.2-lp150.174.3.x86_64/resources/pop3/jobs.cpp:289
#14 0x00007f877648d2e5 in QMetaObject::activate (sender=0x55a014980af0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=<optimized out>, argv@entry=0x7fffd85cdba0) at kernel/qobject.cpp:3807
#15 0x00007f877648d9a7 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7f8778473be0 <KIO::Scheduler::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffd85cdba0) at kernel/qobject.cpp:3658
#16 0x00007f87781cf62f in KIO::Scheduler::slaveConnected (this=<optimized out>, _t1=<optimized out>) at /usr/src/debug/kio-5.59.0-lp150.256.1.x86_64/build/src/core/KF5KIOCore_autogen/include/moc_scheduler.cpp:214
#17 0x00007f877648d2e5 in QMetaObject::activate (sender=sender@entry=0x55a0149a1d10, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=3, argv=<optimized out>, argv@entry=0x0) at kernel/qobject.cpp:3807
#18 0x00007f877648d9a7 in QMetaObject::activate (sender=sender@entry=0x55a0149a1d10, m=m@entry=0x7f8778472620 <KIO::SlaveInterface::staticMetaObject>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x0) at kernel/qobject.cpp:3658
#19 0x00007f87781953b3 in KIO::SlaveInterface::connected (this=this@entry=0x55a0149a1d10) at /usr/src/debug/kio-5.59.0-lp150.256.1.x86_64/build/src/core/KF5KIOCore_autogen/include/moc_slaveinterface.cpp:436
#20 0x00007f87781994ee in KIO::SlaveInterface::dispatch (this=0x55a0149a1d10, _cmd=<optimized out>, rawdata=...) at /usr/src/debug/kio-5.59.0-lp150.256.1.x86_64/src/core/slaveinterface.cpp:203
#21 0x00007f8778195bd8 in KIO::SlaveInterface::dispatch (this=0x55a0149a1d10) at /usr/src/debug/kio-5.59.0-lp150.256.1.x86_64/src/core/slaveinterface.cpp:89
#22 0x00007f877819bf01 in KIO::Slave::gotInput (this=0x55a0149a1d10) at /usr/src/debug/kio-5.59.0-lp150.256.1.x86_64/src/core/slave.cpp:406
#23 0x00007f877648d3ff in QtPrivate::QSlotObjectBase::call (a=0x7fffd85cdf20, r=0x55a0149a1d10, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394
#24 QMetaObject::activate (sender=0x55a014a00180, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=<optimized out>, argv@entry=0x0) at kernel/qobject.cpp:3787
#25 0x00007f877648d9a7 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7f8778471380 <KIO::Connection::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3658
#26 0x00007f877813ceee in KIO::Connection::readyRead (this=<optimized out>) at /usr/src/debug/kio-5.59.0-lp150.256.1.x86_64/build/src/core/KF5KIOCore_autogen/include/moc_connection_p.cpp:148
#27 KIO::ConnectionPrivate::dequeue (this=0x55a014a3e920) at /usr/src/debug/kio-5.59.0-lp150.256.1.x86_64/src/core/connection.cpp:46
#28 0x00007f877648de42 in QObject::event (this=0x55a014a00180, e=<optimized out>) at kernel/qobject.cpp:1260
#29 0x00007f8776a9001c in QApplicationPrivate::notify_helper (this=this@entry=0x55a01485e0c0, receiver=receiver@entry=0x55a014a00180, e=e@entry=0x55a0148af190) at kernel/qapplication.cpp:3740
#30 0x00007f8776a97590 in QApplication::notify (this=0x7fffd85ce5f0, receiver=0x55a014a00180, e=0x55a0148af190) at kernel/qapplication.cpp:3486
#31 0x00007f877645c988 in QCoreApplication::notifyInternal2 (receiver=0x55a014a00180, event=0x55a0148af190) at kernel/qcoreapplication.cpp:1065
#32 0x00007f877645cb5e in QCoreApplication::sendEvent (receiver=<optimized out>, event=event@entry=0x55a0148af190) at kernel/qcoreapplication.cpp:1460
#33 0x00007f877645f2a7 in QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x55a01484f0f0) at kernel/qcoreapplication.cpp:1810
#34 0x00007f877645f838 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1664
#35 0x00007f87764baee3 in postEventSourceDispatch (s=0x55a0148d8d10) at kernel/qeventdispatcher_glib.cpp:277
#36 0x00007f877054ff07 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#37 0x00007f87705502b0 in ?? () from /usr/lib64/libglib-2.0.so.0
#38 0x00007f877055033c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#39 0x00007f87764ba4ff in QEventDispatcherGlib::processEvents (this=0x55a0148e1d70, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#40 0x00007f877645abaa in QEventLoop::exec (this=this@entry=0x7fffd85ce550, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#41 0x00007f8776463e60 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1373
#42 0x00007f8774ba8b5c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1788
#43 0x00007f8776a8ff75 in QApplication::exec () at kernel/qapplication.cpp:2896
#44 0x00007f8778d5d63d in Akonadi::ResourceBase::init (r=0x55a014a53870) at /usr/src/debug/akonadi-server-19.04.2-lp150.188.3.x86_64/src/agentbase/resourcebase.cpp:608
#45 0x000055a01316a353 in Akonadi::ResourceBase::init<POP3Resource> (argc=<optimized out>, argv=<optimized out>) at /usr/include/KF5/AkonadiAgentBase/resourcebase.h:199
#46 0x00007f8775886f8a in __libc_start_main () from /lib64/libc.so.6
#47 0x000055a01315da9a in _start () at ../sysdeps/x86_64/start.S:120
[Inferior 1 (process 22271) detached]


SOFTWARE/OS VERSIONS
KMail Version 5.11.2
openSuse Leap 15.0
KDE Frameworks 5.59.0
Qt 5.13.0 (built against 5.13.0)
The xcb windowing system
Comment 1 Albert Astals Cid 2019-07-30 21:36:26 UTC
*** Bug 410389 has been marked as a duplicate of this bug. ***
Comment 2 Albert Astals Cid 2019-07-30 21:37:48 UTC
I haven't seen it crash for me in a long time.

Do you have any of the advanced options POP3 checked out?
Comment 3 Martin Koller 2019-07-31 04:35:58 UTC
Just SSL/TLS, nothing else
Comment 4 stakanov.s 2019-07-31 21:04:01 UTC
So, my advanced settings are:
pipelining
ssl/tls 995
and that the mail of every account goes each to its special folder, not into inbox.
Comment 5 stakanov.s 2019-10-18 14:36:11 UTC
Created attachment 123319 [details]
crash example

as you might need other cases, in attachment pop-resource segfaults. Behavior is random, not very often but often enough to raise attention.
Comment 6 Albert Astals Cid 2019-10-21 20:59:57 UTC
Do you get any UI notification like "login failed" or similar?
Comment 7 stakanov.s 2019-10-22 07:46:28 UTC
(In reply to Albert Astals Cid from comment #6)
> Do you get any UI notification like "login failed" or similar?

Well, it is a bit unclear. Sometimes I get the message that TLS connection to freenet provider did not succeed. Sometimes it "just segfaults" with the named "akonadi_pop3_resource segfaulted". 
What is often the case if the following setup:
a) it happens when the machine has been idle for long time. 
b) it happens even more when it has been idle with more than one user open. Let us say you have user A, B, C open with B being a Kontakt user session. When you idle in C and then, with Ctrl+Alt+Fn you switch to B, you will more often be faced with this crash. I appears that Kontact does not fetch male when the user session is in background for another user on the same system? 

What is also possible is, that there is a filter activity problem, that is, if a mail arrived and a filter was running on it. But I have unfortunately no possibility to log it, nor did I get a precise error message. However the "TLS connection failed" I had it several times.
Comment 8 stakanov.s 2019-10-30 10:44:31 UTC
O.K. today I got a "mass crash" of all pop3 resources. Two konqi reports I managed to save and join as attachment a1 and a2. 
What happened: I noticed that my wlan crashed. As it is owned by another user personality I needed to reactivate it. When I returned to the mail user all resources did crash. 
I looked at dmesg and it seems that the network did deauthenticate, a lot of martians and then I had to re login. 
That is attachment a3.
Comment 9 stakanov.s 2019-10-30 10:45:40 UTC
Created attachment 123587 [details]
a1 attachment of first resource crashing
Comment 10 stakanov.s 2019-10-30 10:46:40 UTC
Created attachment 123588 [details]
a2 attachment of second resource crashing

went all down in one moment it seams.
Comment 11 stakanov.s 2019-10-30 10:49:12 UTC
Created attachment 123589 [details]
a3 dmesg output of the wlan crash prior to the pop crash

So it seams when wlan goes down, then pop resources crashes?
Comment 12 Justin Zobel 2022-09-27 08:23:41 UTC
Thank you for reporting this crash in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the crash with a recent software version?

If you can reproduce the issue, please change the status to "CONFIRMED" when replying. Thank you!
Comment 13 Martin Koller 2022-09-27 08:43:21 UTC
haven't seen it crash under normal usage since a long time. closing