Bug 462692 - Random Akonadi segmentation fault
Summary: Random Akonadi segmentation fault
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: server (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2022-12-06 09:15 UTC by Razvan
Modified: 2023-04-24 23:30 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 23.04.1


Attachments
System log of the crash (800.57 KB, text/x-log)
2022-12-06 09:25 UTC, Razvan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Razvan 2022-12-06 09:15:10 UTC
Application: akonadiserver (5.21.3 (22.08.3))

Qt Version: 5.15.7
Frameworks Version: 5.100.0
Operating System: Linux 6.0.11-200.fc36.x86_64 x86_64
Windowing System: Wayland
Distribution: Fedora Linux 36 (KDE Plasma)
DrKonqi: 5.26.4 [KCrashBackend]

-- Information about the crash:
Moved a "chromium (freeworld)" window in KDE after updating to plasma-desktop-5.26.4  to a secondary screen and clicked the "Application Launcher".
The only apps I had running in the background are a qemu instance launched by Fedora 36's Virtual Machine manager (8GBytes of RAM and 4 CPUs) and Slack.

The reporter is unsure if this crash is reproducible.

-- Backtrace:
Application: Akonadi Server (akonadiserver), signal: Segmentation fault

[KCrash Handler]
#4  0x0000564f0ec1f29b in Akonadi::Server::AkonadiServer::connectionDisconnected() ()
#5  0x00007f39beed2ec4 in QObject::event (this=0x7ffc6c7248d0, e=0x7f3940005fa0) at kernel/qobject.cpp:1347
#6  0x00007f39beea825b in doNotify (event=0x7f3940005fa0, receiver=0x7ffc6c7248d0) at kernel/qcoreapplication.cpp:1154
#7  QCoreApplication::notify (event=<optimized out>, receiver=<optimized out>, this=<optimized out>) at kernel/qcoreapplication.cpp:1140
#8  QCoreApplication::notifyInternal2 (receiver=0x7ffc6c7248d0, event=0x7f3940005fa0) at kernel/qcoreapplication.cpp:1064
#9  0x00007f39beeab5e4 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x564f10628000) at kernel/qcoreapplication.cpp:1821
#10 0x00007f39beef9897 in postEventSourceDispatch (s=0x564f10647ee0) at kernel/qeventdispatcher_glib.cpp:277
#11 0x00007f39bcf26faf in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#12 0x00007f39bcf7c2c8 in g_main_context_iterate.constprop () from /lib64/libglib-2.0.so.0
#13 0x00007f39bcf24940 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#14 0x00007f39beef938a in QEventDispatcherGlib::processEvents (this=0x564f10645350, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#15 0x00007f39beea6cca in QEventLoop::exec (this=this@entry=0x7ffc6c724740, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#16 0x00007f39beeaed92 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#17 0x0000564f0ec15058 in main ()
[Inferior 1 (process 8934) detached]

The reporter indicates this bug may be a duplicate of or related to bug 461312.

Reported using DrKonqi
Comment 1 Razvan 2022-12-06 09:25:36 UTC
Created attachment 154352 [details]
System log of the crash
Comment 2 postix 2023-04-10 16:06:19 UTC

*** This bug has been marked as a duplicate of bug 450217 ***
Comment 3 Daniel Vrátil 2023-04-22 13:18:07 UTC
Git commit 1d9d64ec3cf78dfdddc2239df0d33b08dc442104 by Daniel Vrátil.
Committed on 22/04/2023 at 10:34.
Pushed by carlschwan into branch 'release/23.04'.

Fix crash on server shutdown

When AkonadiServer::quit() is called it clears the vector of existing
connections and destroys them. This can race with a resource disconnecting
or crashing on its own, which then enqueues a singal emission from the
Connection to remove itself from the connections vector as well.

Previously the code assumed the Connection must always exist in the vector
which caused a crash when it did not...surprise surprise.
FIXED-IN: 23.04.0

M  +4    -2    src/server/akonadi.cpp

https://invent.kde.org/pim/akonadi/commit/1d9d64ec3cf78dfdddc2239df0d33b08dc442104
Comment 4 postix 2023-04-22 13:42:15 UTC
Wouldn't it have made more sense to reference bug #450217, where I have collected all the dups?
Comment 5 Sandro Knauß 2023-04-24 23:30:49 UTC
(In reply to postix from comment #4)
> Wouldn't it have made more sense to reference bug #450217, where I have collected all the dups?

Jepp it makes more sense. and #450217 is now updated too.