Page MenuHome GnuPG

Reproducible crashes in KOrganizer
Open, NormalPublic

Description

Event Timeline

dvratil triaged this task as Normal priority.
dvratil created this task.
dvratil added a project: Restricted Project.
dvratil moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.

Hi,

I have another one, a bit hard to report upstream since it is related to the event and that contains personal information. So I will forward you the event in question privately. It is an ics file attached to a mail, I select "open with Korganizer" and when I hit "merge into existing calendar" it crashes with the debug output:

kf.calendarcore: The incidence didn't have any UID! Report a bug  to the application that generated this file.
kf.calendarcore: 
kcalcore library reported a problem while parsing:
kf.calendarcore: "Publish" : "Failed iTIP restrictions for ORGANIZER property. Expected 1 instances of the property and got 0\nFailed iTIP restrictions for UID property. Expected 1 instances of the property and got 0\n"
QString::arg: 2 argument(s) missing in org.kde.korganizer
kf.calendarcore: "/tmp/messageviewer_attachment_VtkPwR/Ihr-Termin Herbsttreffen des Cyber Security Cluster Bonn e.V..ics"  is not a valid iCalendar file
kf.calendarcore: Error parsing vCalendar file: pop on empty Object Stack
 at line 40
double free or corruption (!prev)
*** KMail got signal 6 (Exiting)
*** Dead letters dumped.

This is with 23.08.2

Hi Andre,

I tried importing the event from KMail into KOrganizer 23.08.2 multiple times, but it never crashes for me, even when running in Kontact. It does log the same errors about this being an invalid invite, but ultimately I can see the event in KOrganizer just fine.

If you can reproduce the crash, could you try to get a backtrace with GDB, please?

Sorry took a while to download all the debug info. Maybe we have different libical versions and this is a libical issue.

kf.calendarcore: "/tmp/messageviewer_attachment_TpUByn/Ihr-Termin Herbsttreffen des Cyber Security Cluster Bonn e.V..ics"  is not a valid iCalendar file
free(): corrupted unsorted chunks

Thread 1 "kontact" received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
Downloading source file /usr/src/debug/glibc-2.38/nptl/pthread_kill.c
44            return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;                                                                                                                                                      
Missing separate debuginfos, use: zypper install kontact-debuginfo-23.08.2-1.1.x86_64
(gdb) bt
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007ffff6091e73 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007ffff603f0c6 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007ffff60268d7 in __GI_abort () at abort.c:79
#4  0x00007ffff60277a3 in __libc_message (fmt=fmt@entry=0x7ffff61b056b "%s\n") at ../sysdeps/posix/libc_fatal.c:150
#5  0x00007ffff609c7c7 in malloc_printerr (str=str@entry=0x7ffff61b3308 "free(): corrupted unsorted chunks") at malloc.c:5765
#6  0x00007ffff609d51c in _int_free_create_chunk (av=av@entry=0x7ffff61ebac0 <main_arena>, p=p@entry=0x55555e7e0130, size=<optimized out>, size@entry=2624, nextchunk=nextchunk@entry=0x55555e7e0b70, nextsize=nextsize@entry=48)
    at malloc.c:4728
#7  0x00007ffff609e8d8 in _int_free_merge_chunk (av=av@entry=0x7ffff61ebac0 <main_arena>, p=0x55555e7e0130, size=2624) at malloc.c:4693
#8  0x00007ffff609ec49 in _int_free (av=0x7ffff61ebac0 <main_arena>, p=<optimized out>, have_lock=<optimized out>, have_lock@entry=0) at malloc.c:4639
#9  0x00007ffff60a14f3 in __GI___libc_free (mem=<optimized out>) at malloc.c:3391
#10 0x00007fff9c019a83 in mime_parse () at /usr/src/debug/libical-3.0.16/src/libicalvcal/vcc.c:1510
#11 0x00007fff9c01a586 in Parse_MIMEHelper () at /usr/src/debug/libical-3.0.16/src/libicalvcal/vcc.c:1174
#12 Parse_MIME_FromFile (file=0x55555e8754e0) at /usr/src/debug/libical-3.0.16/src/libicalvcal/vcc.c:1213
#13 0x00007fff9c01a7ab in Parse_MIME_FromFileName (fname=0x55555e89a6e8 "/tmp/messageviewer_attachment_TpUByn/Ihr-Termin Herbsttreffen des Cyber Security Cluster Bonn e.V..ics")
    at /usr/src/debug/libical-3.0.16/src/libicalvcal/vcc.c:1224
#14 0x00007fff9c17af7f in KCalendarCore::VCalFormat::load(QSharedPointer<KCalendarCore::Calendar> const&, QString const&) (this=0x7fffffffc7e0, calendar=<optimized out>, fileName=...)
    at /usr/src/debug/kcalendarcore-5.111.0/src/vcalformat.cpp:99
#15 0x00007fff9c139cc0 in KCalendarCore::FileStorage::load() (this=this@entry=0x7fffffffc8e0) at /usr/src/debug/kcalendarcore-5.111.0/src/filestorage.cpp:117
#16 0x00007fff9c2c486f in Akonadi::ICalImporter::importIntoExistingResource(QUrl const&, Akonadi::Collection) (this=this@entry=0x55555dca6b70, url=..., collection=...) at /usr/src/debug/akonadi-calendar-23.08.2/src/icalimporter.cpp:184
#17 0x00007fff26ca0bb5 in ActionManager::importURL(QUrl const&, bool) (this=0x7fff8046b750, url=..., merge=<optimized out>) at /usr/src/debug/korganizer-23.08.2/src/actionmanager.cpp:962
#18 0x00007fff26ca56f8 in ActionManager::importCalendar(QUrl const&) (this=0x7fff8046b750, url=...) at /usr/src/debug/korganizer-23.08.2/src/actionmanager.cpp:1659
#19 0x00007fff26ca1813 in ActionManager::handleCommandLine(QStringList const&) (this=<optimized out>, args=...) at /usr/src/debug/korganizer-23.08.2/src/actionmanager.cpp:1224
#20 0x00007fff26cf61a1 in KorganizerAdaptor::handleCommandLine(QStringList const&) (args=<optimized out>, this=0x55555de788f0) at /usr/src/debug/korganizer-23.08.2/build/src/korganizeradaptor.cpp:69
#21 KorganizerAdaptor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=_o@entry=0x55555de788f0, _id=_id@entry=5, _a=_a@entry=0x7fffffffccf0, _c=<optimized out>)
    at /usr/src/debug/korganizer-23.08.2/build/src/korganizeradaptor.moc:159
#22 0x00007fff26cf62e1 in KorganizerAdaptor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_a=0x7fffffffccf0, _id=5, _c=QMetaObject::InvokeMetaMethod, _o=0x55555de788f0)
    at /usr/src/debug/korganizer-23.08.2/build/src/korganizeradaptor.moc:145
#23 KorganizerAdaptor::qt_metacall(QMetaObject::Call, int, void**) (this=0x55555de788f0, _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0x7fffffffccf0) at /usr/src/debug/korganizer-23.08.2/build/src/korganizeradaptor.moc:208
#24 0x00007ffff759446b in QDBusConnectionPrivate::deliverCall(QObject*, int, QDBusMessage const&, QVector<int> const&, int)
    (this=this@entry=0x7fffdc001600, object=object@entry=0x55555de788f0, msg=..., metaTypes=..., slotIdx=<optimized out>) at qdbusintegrator.cpp:1001
#25 0x00007ffff7598040 in QDBusConnectionPrivate::activateCall(QObject*, int, QDBusMessage const&) (this=this@entry=0x7fffdc001600, object=0x55555de788f0, flags=flags@entry=273, msg=...) at qdbusintegrator.cpp:904
#26 0x00007ffff75989d2 in QDBusConnectionPrivate::activateCall(QObject*, int, QDBusMessage const&) (msg=..., flags=273, object=<optimized out>, this=0x7fffdc001600) at qdbusintegrator.cpp:853
#27 QDBusConnectionPrivate::activateObject(QDBusConnectionPrivate::ObjectTreeNode&, QDBusMessage const&, int) (this=0x7fffdc001600, node=..., msg=..., pathStartPos=<optimized out>) at qdbusintegrator.cpp:1503
#28 0x00007ffff759ac98 in QDBusActivateObjectEvent::placeMetaCall(QObject*) (this=0x55555d298d30) at qdbusintegrator.cpp:1623
#29 0x00007ffff6b18f50 in QObject::event(QEvent*) (this=0x55555de78870, e=0x55555d298d30) at kernel/qobject.cpp:1347
#30 0x00007ffff77a519e in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x55555de78870, e=0x55555d298d30) at kernel/qapplication.cpp:3640
#31 0x00007ffff6aed198 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55555de78870, event=0x55555d298d30) at kernel/qcoreapplication.cpp:1064
#32 0x00007ffff6aed35e in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1462
#33 0x00007ffff6af0791 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x55555559d9d0) at kernel/qcoreapplication.cpp:1821
#34 0x00007ffff6af0cd8 in QCoreApplication::sendPostedEvents(QObject*, int) (receiver=<optimized out>, event_type=<optimized out>) at kernel/qcoreapplication.cpp:1680
#35 0x00007ffff6b468c3 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x5555555ecd20) at kernel/qeventdispatcher_glib.cpp:277
#36 0x00007fffed513ef0 in g_main_dispatch (context=0x7fffdc000ec0) at ../glib/gmain.c:3476
#37 g_main_context_dispatch_unlocked (context=context@entry=0x7fffdc000ec0) at ../glib/gmain.c:4284
#38 0x00007fffed515b18 in g_main_context_iterate_unlocked (context=context@entry=0x7fffdc000ec0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4349
#39 0x00007fffed5161cc in g_main_context_iteration (context=0x7fffdc000ec0, may_block=1) at ../glib/gmain.c:4414
#40 0x00007ffff6b460d6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x55555558b2e0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#41 0x00007ffff6aebc2b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffffffd2b0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#42 0x00007ffff6af40c0 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#43 0x00007ffff6f7057c in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1870
#44 0x00007ffff77a5115 in QApplication::exec() () at kernel/qapplication.cpp:2832
#45 0x0000555555558fd3 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kontact-23.08.2/src/main.cpp:216

You are right this looks like a bug in libical. I tried to downgrade to 3.0.16 but still can't reproduce the crash. But I also noticed that the line numbers from your backtrace do not align with upstream code. IIRC you are on Tumbleweed, right? They have some downstream patches in the parsing code (vcc.c) that probably cause the crash: https://build.opensuse.org/package/show/openSUSE:Factory/libical

If you want I can pull their patches and debug it further, so we can give them a fix. Or I can at least try to reduce the invite you sent me to a minimum reproducer without the PII so you have something to give to OpenSuse folks so they can fix their downstream patches.

Nah, forget it in that case. I might report a bug to SUSE in that case but we should not invest in fixing such things. I was planning to either use a self compiled PIM stack or Flatpack anyway.