Kmail has become totally unreliable

I am using kmail with oauth2 office 365. It has been working fine until recently.

Now the handler goes offline, crashes and will not send mail.
It has started working doing a aconadictl restart and/or logging in to office 365 again. Now the email just doesn’t want to leave the outbox.

What can I try?
I am on kubuntu, all kdepim versions is 4:23.08.5-0ubuntu5.
I really want to keep on using kmail.

I stopped kontakt. Restarted akonadi again and the mail was sent. But I can’t have such a unreliable mail client. I feel that this is an opportunity to make the software better.

If you had a crash, can you locate it with coredumpctl and extract the backtrace into a bug report on bugs.kde.org?

The crash reporter in kubuntu says that the dump has to little information.

What is your distro?
You should be able to install debug symbols, that will make the trace useful.
We have steps for different distros at Guidelines and HOWTOs/Debugging/How to create useful crash reports - KDE Community Wiki

He mentioned it’s Kubuntu. According to the kdepim version number, it should be Kubuntu 24.04.

Ubuntu should provide debuginfod for automatically loading symbol files. Perhaps it just needs to be enabled with set debuginfod enabled on inside a newly created ~/.gdbinit file?

I really don’t understand how debuginfod works, myabe I don’t. But the examples is starting the application from gdb. In this particular case it is a forked off process that is crashing (I assume since the UI isn’t affected). Can gdb follow forks to create a good crash report?

I think I got it. You find the pid of the crashing program, attach to it.
I just hope I attached to the correct one. Trial and error :slight_smile:

Would this be a good backtrace?

#0  __GI___pthread_sigmask (how=1, newmask=<optimized out>, oldmask=0x0) at ./nptl/pthread_sigmask.c:43
#1  0x000075a63d2454fd in __GI___sigprocmask (how=<optimized out>, set=<optimized out>, oset=<optimized out>) at ../sysdeps/unix/sysv/linux/sigprocmask.c:25
#2  0x000075a63df800d4 in KCrash::setCrashHandler (handler=handler@entry=0x0) at ./src/kcrash.cpp:419
#3  0x000075a63df826b7 in KCrash::defaultCrashHandler (sig=11) at ./src/kcrash.cpp:630
#4  <signal handler called>
#5  std::__atomic_base<int>::operator++ (this=0x18) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qbasicatomic.h:118
#6  QAtomicOps<int>::ref<int> (_q_value=<error reading variable: Cannot access memory at address 0x18>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qatomic_cxx11.h:283
#7  QBasicAtomicInteger<int>::ref (this=0x18) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qbasicatomic.h:118
#8  QSharedPointer<KCalendarCore::Incidence>::ref (this=0x7ffc8de67310) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qsharedpointer_impl.h:509
#9  QSharedPointer<KCalendarCore::Incidence>::QSharedPointer<KCalendarCore::Event, true> (other=..., this=0x7ffc8de67310) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qsharedpointer_impl.h:371
#10 EwsFetchCalendarDetailJob::exceptionItemsFetched (this=<optimized out>, job=<optimized out>) at /usr/src/kdepim-runtime-4:23.08.5-0ubuntu3/resources/ews/calendar/ewsfetchcalendardetailjob.cpp:179
#11 0x000075a63dd12e16 in QtPrivate::QSlotObjectBase::call (a=0x7ffc8de674a0, r=0x5c4cd251aa60, this=0x5c4cd231dc10) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#12 doActivate<false> (sender=0x5c4cd2a56ff0, signal_index=6, argv=0x7ffc8de674a0) at kernel/qobject.cpp:3925
#13 0x000075a63dd0b697 in QMetaObject::activate (sender=sender@entry=0x5c4cd2a56ff0, m=<optimized out>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7ffc8de674a0)
    at kernel/qobject.cpp:3985
#14 0x000075a647782266 in KJob::result (this=this@entry=0x5c4cd2a56ff0, _t1=<optimized out>, _t1@entry=0x5c4cd2a56ff0, _t2=...)
    at /usr/src/kcoreaddons-5.115.0-0ubuntu5/obj-x86_64-linux-gnu/src/lib/KF5CoreAddons_autogen/include/moc_kjob.cpp:633
#15 0x000075a6477880eb in KJob::finishJob (this=0x5c4cd2a56ff0, emitResult=<optimized out>) at /usr/src/kcoreaddons-5.115.0-0ubuntu5/src/lib/jobs/kjob.cpp:98
#16 0x000075a63dd12e16 in QtPrivate::QSlotObjectBase::call (a=0x7ffc8de675d0, r=0x5c4cd2a56ff0, this=0x5c4cd2551df0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#17 doActivate<false> (sender=0x5c4cd271f3e0, signal_index=6, argv=0x7ffc8de675d0) at kernel/qobject.cpp:3925
#18 0x000075a63dd0b697 in QMetaObject::activate (sender=sender@entry=0x5c4cd271f3e0, m=<optimized out>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7ffc8de675d0)
    at kernel/qobject.cpp:3985
#19 0x000075a647782266 in KJob::result (this=this@entry=0x5c4cd271f3e0, _t1=<optimized out>, _t1@entry=0x5c4cd271f3e0, _t2=...)
    at /usr/src/kcoreaddons-5.115.0-0ubuntu5/obj-x86_64-linux-gnu/src/lib/KF5CoreAddons_autogen/include/moc_kjob.cpp:633
#20 0x000075a6477880eb in KJob::finishJob (this=0x5c4cd271f3e0, emitResult=<optimized out>) at /usr/src/kcoreaddons-5.115.0-0ubuntu5/src/lib/jobs/kjob.cpp:98
#21 0x000075a63dd12e16 in QtPrivate::QSlotObjectBase::call (a=0x7ffc8de676a0, r=0x5c4cd271f3e0, this=0x5c4cd26a4660) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#22 doActivate<false> (sender=0x5c4cd24df650, signal_index=7, argv=0x7ffc8de676a0) at kernel/qobject.cpp:3925
#23 0x000075a63dd0b697 in QMetaObject::activate (sender=sender@entry=0x5c4cd24df650, m=m@entry=0x75a647a22ba0 <KIO::SlaveInterface::staticMetaObject>, local_signal_index=local_signal_index@entry=4, 
    argv=argv@entry=0x0) at kernel/qobject.cpp:3985
#24 0x000075a647934fe7 in KIO::SlaveInterface::finished (this=this@entry=0x5c4cd24df650) at /usr/src/kio-5.115.0-0ubuntu6/obj-x86_64-linux-gnu/src/core/KF5KIOCore_autogen/include/moc_slaveinterface.cpp:464
#25 0x000075a6479372cb in KIO::SlaveInterface::dispatch (this=0x5c4cd24df650, _cmd=<optimized out>, rawdata=...) at /usr/src/kio-5.115.0-0ubuntu6/src/core/slaveinterface.cpp:149
#26 0x000075a64793586b in KIO::SlaveInterface::dispatch (this=0x5c4cd24df650) at /usr/src/kio-5.115.0-0ubuntu6/src/core/slaveinterface.cpp:78
#27 0x000075a64793ab11 in KIO::Slave::gotInput (this=0x5c4cd24df650) at /usr/src/kio-5.115.0-0ubuntu6/src/core/slave.cpp:354
#28 0x000075a63dd12e16 in QtPrivate::QSlotObjectBase::call (a=0x7ffc8de67930, r=0x5c4cd24df650, this=0x5c4cd2661080) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#29 doActivate<false> (sender=0x5c4cd256b3a0, signal_index=3, argv=0x7ffc8de67930) at kernel/qobject.cpp:3925
#30 0x000075a63dd06343 in QObject::event (this=0x5c4cd256b3a0, e=0x5c4cd25bbb40) at kernel/qobject.cpp:1347
#31 0x000075a63e96bd45 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x5c4cd256b3a0, e=0x5c4cd25bbb40) at kernel/qapplication.cpp:3640
#32 0x000075a63dcd8118 in QCoreApplication::notifyInternal2 (receiver=0x5c4cd256b3a0, event=0x5c4cd25bbb40) at kernel/qcoreapplication.cpp:1064
#33 0x000075a63dcd8332 in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1462
#34 0x000075a63dcdb94b in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x5c4cd1fe7580) at kernel/qcoreapplication.cpp:1821
#35 0x000075a63dcdbebd in QCoreApplication::sendPostedEvents (receiver=<optimized out>, event_type=<optimized out>) at kernel/qcoreapplication.cpp:1680
#36 0x000075a63dd35c0f in postEventSourceDispatch (s=s@entry=0x5c4cd212d7b0) at kernel/qeventdispatcher_glib.cpp:277
#37 0x000075a63b1445b5 in g_main_dispatch (context=0x75a630000ed0) at ../../../glib/gmain.c:3344
#38 0x000075a63b1a3717 in g_main_context_dispatch_unlocked (context=0x75a630000ed0) at ../../../glib/gmain.c:4152
#39 g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x75a630000ed0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:4217
#40 0x000075a63b143a53 in g_main_context_iteration (context=0x75a630000ed0, may_block=1) at ../../../glib/gmain.c:4282
#41 0x000075a63dd35279 in QEventDispatcherGlib::processEvents (this=0x5c4cd21332f0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#42 0x000075a63dcd6a7b in QEventLoop::exec (this=this@entry=0x7ffc8de67d60, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#43 0x000075a63dcdf3e8 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#44 0x000075a63e138ecd in QGuiApplication::exec () at kernel/qguiapplication.cpp:1863
#45 0x000075a63e96bcb9 in QApplication::exec () at kernel/qapplication.cpp:2832
#46 0x000075a64810ed1c in Akonadi::ResourceBase::init (r=...) at /usr/src/akonadi-4:23.08.5-0ubuntu3/src/agentbase/resourcebase.cpp:555
#47 0x00005c4cd13bb87d in Akonadi::ResourceBase::init<EwsResource> (argc=<optimized out>, argv=<optimized out>) at /usr/include/KPim5/AkonadiAgentBase/akonadi/resourcebase.h:184
#48 0x000075a63d22a1ca in __libc_start_call_main (main=main@entry=0x5c4cd13662f0 <main(int, char**)>, argc=argc@entry=3, argv=argv@entry=0x7ffc8de68138) at ../sysdeps/nptl/libc_start_call_main.h:58
#49 0x000075a63d22a28b in __libc_start_main_impl (main=0x5c4cd13662f0 <main(int, char**)>, argc=3, argv=0x7ffc8de68138, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, 
    stack_end=0x7ffc8de68128) at ../csu/libc-start.c:360
#50 0x00005c4cd136c7e5 in _start ()

1 Like

That looks very good, yes!

Please report the bug to https://bugs.kde.org for kmail.
KMail devs might not be reading this.

https:// bugs(dot)kde(dot)org/show_bug.cgi?id491810

1 Like

https://bugs.kde.org/show_bug.cgi?id=491810

It is already fixed.