Bug 501740

Summary: Nextcloud calendar crash when adding new events to other calendar
Product: [Frameworks and Libraries] Akonadi Reporter: Robby Engelmann <robby.engelmann>
Component: DAV ResourceAssignee: kdepim bugs <pim-bugs-null>
Status: REOPENED ---    
Severity: crash CC: carl, winter
Priority: NOR Keywords: drkonqi
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report: https://crash-reports.kde.org/organizations/kde/issues/150379/events/124ad38e96e94590a7e3d0df0773ef72/

Description Robby Engelmann 2025-03-19 12:33:49 UTC
Application: akonadi_davgroupware_resource (6.4.42 (25.07.40))

ApplicationNotResponding [ANR]: false
Qt Version: 6.8.2
Frameworks Version: 6.13.0
Operating System: Linux 6.13.6-1-default x86_64
Windowing System: Wayland
Distribution: "openSUSE Tumbleweed"
DrKonqi: 6.3.80 [CoredumpBackend]

-- Information about the crash:
Nextcloud calendar crash when adding new events to other calendar

The crash can be reproduced sometimes.

-- Backtrace:
Application: MyTuxedo (akonadi_davgroupware_resource), signal: Segmentation fault
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = <optimized out>}

warning: core file may not match specified executable file.
[New LWP 649488]
[New LWP 649491]
[New LWP 649490]

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.opensuse.org/>
Enable debuginfod for this session? (y or [n]) [answered N; input not from terminal]
Debuginfod has been disabled.
To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.

warning: the debug information found in "/usr/lib/debug//usr/lib64/libstdc++.so.6.0.34.debug" does not match "/lib64/libstdc++.so.6" (CRC mismatch).
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/bin/akonadi_davgroupware_resource --identifier akonadi_davgroupware_resour'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=11, no_tid=no_tid@entry=0) at pthread_kill.c:44
44	      return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
[Current thread is 1 (Thread 0x7ff28077ab00 (LWP 649488))]
Function(s) ^std::(move|forward|as_const|(__)?addressof) will be skipped when stepping.
Function(s) ^std::(shared|unique)_ptr<.*>::(get|operator) will be skipped when stepping.
Function(s) ^std::(basic_string|vector|array|deque|(forward_)?list|(unordered_|flat_)?(multi)?(map|set)|span)<.*>::(c?r?(begin|end)|front|back|data|size|empty) will be skipped when stepping.
Function(s) ^std::(basic_string|vector|array|deque|span)<.*>::operator.] will be skipped when stepping.

Cannot QML trace cores :(
Python Exception <class 'AttributeError'>: 'NoneType' object has no attribute 'pointer'
Python Exception <class 'AttributeError'>: 'NoneType' object has no attribute 'pointer'
Python Exception <class 'AttributeError'>: 'NoneType' object has no attribute 'pointer'
Python Exception <class 'AttributeError'>: 'NoneType' object has no attribute 'pointer'
[Current thread is 1 (Thread 0x7ff28077ab00 (LWP 649488))]

Thread 3 (Thread 0x7ff2803ff6c0 (LWP 649490)):
#0  __syscall_cancel_arch () at ../sysdeps/unix/sysv/linux/x86_64/syscall_cancel.S:56
#1  0x00007ff28429581c in __internal_syscall_cancel (a1=<optimized out>, a2=<optimized out>, a3=<optimized out>, a4=<optimized out>, a5=a5@entry=8, a6=a6@entry=0, nr=271) at cancellation.c:49
#2  0x00007ff284295871 in __syscall_cancel (a1=<optimized out>, a2=<optimized out>, a3=<optimized out>, a4=<optimized out>, a5=a5@entry=8, a6=a6@entry=0, nr=271) at cancellation.c:75
#3  0x00007ff28430fd82 in __GI_ppoll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>, sigmask=<optimized out>) at ../sysdeps/unix/sysv/linux/ppoll.c:42
#4  0x00007ff28450b48f in ??? () at /lib64/libglib-2.0.so.0
#5  0x00007ff28450bbac in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#6  0x00007ff284e05133 in QEventDispatcherGlib::processEvents (this=0x7ff278000b70, flags=...) at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/kernel/qeventdispatcher_glib.cpp:399
#7  0x00007ff284bb599b in QEventLoop::exec (this=0x7ff2803fea60, flags=...) at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/global/qflags.h:34
#8  0x00007ff284ca4f9c in QThread::exec (this=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/global/qflags.h:74
#9  0x00007ff284d1f717 in operator() (__closure=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/thread/qthread_unix.cpp:375
#10 (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > (t=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/thread/qthread_unix.cpp:311
#11 QThreadPrivate::start (arg=0x55b1f0068320) at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/thread/qthread_unix.cpp:339
#12 0x00007ff284299546 in start_thread (arg=<optimized out>) at pthread_create.c:448
#13 0x00007ff28431d94c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

Thread 2 (Thread 0x7ff27fbfe6c0 (LWP 649491)):
#0  __syscall_cancel_arch () at ../sysdeps/unix/sysv/linux/x86_64/syscall_cancel.S:56
#1  0x00007ff28429581c in __internal_syscall_cancel (a1=<optimized out>, a2=<optimized out>, a3=<optimized out>, a4=<optimized out>, a5=a5@entry=8, a6=a6@entry=0, nr=271) at cancellation.c:49
#2  0x00007ff284295871 in __syscall_cancel (a1=<optimized out>, a2=<optimized out>, a3=<optimized out>, a4=<optimized out>, a5=a5@entry=8, a6=a6@entry=0, nr=271) at cancellation.c:75
#3  0x00007ff28430fd82 in __GI_ppoll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>, sigmask=<optimized out>) at ../sysdeps/unix/sysv/linux/ppoll.c:42
#4  0x00007ff28450b48f in ??? () at /lib64/libglib-2.0.so.0
#5  0x00007ff28450bbac in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#6  0x00007ff284e05133 in QEventDispatcherGlib::processEvents (this=0x7ff270000b70, flags=...) at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/kernel/qeventdispatcher_glib.cpp:399
#7  0x00007ff284bb599b in QEventLoop::exec (this=0x7ff27fbfda10, flags=...) at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/global/qflags.h:34
#8  0x00007ff284ca4f9c in QThread::exec (this=this@entry=0x7ff2851feb20 <QGlobalStatic<QtGlobalStatic::Holder<(anonymous namespace)::Q_QGS__q_manager> >::instance()::holder>) at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/global/qflags.h:74
#9  0x00007ff285175a3e in QDBusConnectionManager::run (this=0x7ff2851feb20 <QGlobalStatic<QtGlobalStatic::Holder<(anonymous namespace)::Q_QGS__q_manager> >::instance()::holder>) at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/dbus/qdbusconnectionmanager.cpp:144
#10 0x00007ff284d1f717 in operator() (__closure=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/thread/qthread_unix.cpp:375
#11 (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > (t=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/thread/qthread_unix.cpp:311
#12 QThreadPrivate::start (arg=0x7ff2851feb20 <QGlobalStatic<QtGlobalStatic::Holder<(anonymous namespace)::Q_QGS__q_manager> >::instance()::holder>) at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/thread/qthread_unix.cpp:339
#13 0x00007ff284299546 in start_thread (arg=<optimized out>) at pthread_create.c:448
#14 0x00007ff28431d94c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

Thread 1 (Thread 0x7ff28077ab00 (LWP 649488)):
[KCrash Handler]
#5  Settings::configuredDavUrls (this=0x7ff2842a997a <_int_malloc+2972>) at /usr/include/c++/14/bits/stl_tree.h:1025
#6  0x000055b1c5d80e75 in DavFreeBusyHandler::canHandleFreeBusy (this=0x7ff27000fca0, email=...) at /usr/src/debug/kdepim-runtime-25.03.70git.20250318T014035~8bb81252/resources/dav/resource/davfreebusyhandler.cpp:42
#7  0x00007ff2862d6cc3 in Akonadi__FreeBusyProviderAdaptor::qt_metacall (this=0x55b1f0074cf0, _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0x7fffcfcfe818) at /usr/src/debug/akonadi-calendar-25.03.70git.20250317T064721~4f5a554/build/src/core/moc_freebusyprovideradaptor.cpp:208
#8  0x00007ff2851837ae in QDBusConnectionPrivate::deliverCall (this=this@entry=0x7ff270001430, object=object@entry=0x55b1f0074cf0, msg=..., metaTypes=..., slotIdx=6) at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/dbus/qdbusintegrator.cpp:1008
#9  0x00007ff2851844c7 in QDBusConnectionPrivate::activateCall (this=0x7ff270001430, object=0x55b1f0074cf0, flags=..., msg=...) at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/dbus/qdbusintegrator.cpp:910
#10 0x00007ff28518c9ac in QDBusConnectionPrivate::activateObject (this=<optimized out>, node=..., msg=..., pathStartPos=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/dbus/qdbusintegrator.cpp:1485
#11 0x00007ff28518ca02 in QDBusActivateObjectEvent::placeMetaCall (this=0x7ff270019790) at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/dbus/qdbusintegrator.cpp:1605
#12 0x00007ff284bf5187 in QObject::event (this=0x55b1f0082bd0, e=0x7ff270019790) at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/kernel/qobject.cpp:1418
#13 0x00007ff284badacb in doNotify (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/kernel/qcoreapplication.cpp:1273
#14 QCoreApplication::notify (this=<optimized out>, receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/kernel/qcoreapplication.cpp:1256
#15 QCoreApplication::notifyInternal2 (receiver=0x55b1f0082bd0, event=0x7ff270019790) at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/kernel/qcoreapplication.cpp:1172
#16 0x00007ff284bb3ae0 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x55b1f005adc0) at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/kernel/qcoreapplication.cpp:1946
#17 0x00007ff284e07ca7 in postEventSourceDispatch (s=0x55b1f0064410) at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/kernel/qeventdispatcher_glib.cpp:246
#18 0x00007ff284509638 in ??? () at /lib64/libglib-2.0.so.0
#19 0x00007ff28450b398 in ??? () at /lib64/libglib-2.0.so.0
#20 0x00007ff28450bbac in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#21 0x00007ff284e05133 in QEventDispatcherGlib::processEvents (this=0x55b1f0064160, flags=...) at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/kernel/qeventdispatcher_glib.cpp:399
#22 0x00007ff284bb599b in QEventLoop::exec (this=this@entry=0x7fffcfcff030, flags=..., flags@entry=...) at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/global/qflags.h:34
#23 0x00007ff284bb765a in QCoreApplication::exec () at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/global/qflags.h:74
#24 0x000055b1c5d74e84 in Akonadi::AgentBase::initCore<DavGroupwareResource> (argc=<optimized out>, argv=<optimized out>) at /usr/include/KPim6/AkonadiAgentBase/akonadi/agentbase.h:449
#25 main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kdepim-runtime-25.03.70git.20250318T014035~8bb81252/resources/dav/resource/davgroupwareresource.cpp:1470

Reported using DrKonqi
Comment 1 Bug Janitor Service 2025-03-19 14:12:53 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/kdepim-runtime/-/merge_requests/211
Comment 2 Allen Winter 2025-03-19 14:59:10 UTC
Git commit c515a40ea02322ca73ad98bfb3f7e6fe3c03be9b by Allen Winter.
Committed on 19/03/2025 at 14:29.
Pushed by winterz into branch 'master'.

davfreebusyhandler.cpp - canHandleFreeBusy() guard against empty settings

M  +3    -0    resources/dav/resource/davfreebusyhandler.cpp

https://invent.kde.org/pim/kdepim-runtime/-/commit/c515a40ea02322ca73ad98bfb3f7e6fe3c03be9b
Comment 3 Allen Winter 2025-03-19 15:16:17 UTC
I debugged the wrong branch (I was looking in master, not in release/25.04)
reopen