Bug 435510 - Akonadi db corrupt, crashes KMail, Kontakt
Summary: Akonadi db corrupt, crashes KMail, Kontakt
Status: REPORTED
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2021-04-08 15:23 UTC by Bart Vaes
Modified: 2021-04-08 15:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bart Vaes 2021-04-08 15:23:23 UTC
Application: kmail (5.14.2 (20.04.2))

Qt Version: 5.12.7
Frameworks Version: 5.71.0
Operating System: Linux 5.3.18-lp152.66-default x86_64
Windowing system: X11
Distribution: openSUSE Leap 15.2

-- Information about the crash:
- What I was doing when the application crashed:
After a botched shutdown, akonadi mysql db seems corrupt: from /var/log/messages:
DATABASE ERROR:
2021-04-05T15:43:43.961455+02:00 localhost akonadiserver[17580]: org.kde.pim.akonadiserver:   Error code: "1062"
2021-04-05T15:43:43.961632+02:00 localhost akonadiserver[17580]: org.kde.pim.akonadiserver:   DB error:  "Duplicate entry '4-trash' for key 'CollectionTable_parentAndNameIndex'"
2021-04-05T15:43:43.961810+02:00 localhost akonadiserver[17580]: org.kde.pim.akonadiserver:   Error text: "Duplicate entry '4-trash' for key 'CollectionTable_parentAndNameIndex' QMYSQL3: Unable to execute statement"
2021-04-05T15:43:43.961979+02:00 localhost akonadiserver[17580]: org.kde.pim.akonadiserver:   Values: QMap((":0", QVariant(QString, ""))(":1", QVariant(QString, ""))(":10", QVariant(int, -1))(":11", QVariant(int, -1))(":12", QVariant(bool, false))(":13", QVariant(QString, ""))(":14", QVariant(bool, false))(":2", QVariant(QString, "trash"))(":3", QVariant(qlonglong, 4))(":4", QVariant(qlonglong, 4))(":5", QVariant(bool, true))(":6", QVariant(int, 2))(":7", QVariant(int, 2))(":8", QVariant(int, 2))(":9", QVariant(bool, true)))
2021-04-05T15:43:43.962163+02:00 localhost akonadiserver[17580]: org.kde.pim.akonadiserver:   Query: "INSERT INTO CollectionTable (remoteId, remoteRevision, name, parentId, resourceId, enabled, syncPref, displayPref, indexPref, cachePolicyInherit, cachePolicyCheckInterval, cachePolicyCacheTimeout, cachePolicySyncOnDemand, cachePolicyLocalParts, isVirtual) VALUES (:0, :1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, :14)"
2021-04-05T15:43:43.962353+02:00 localhost akonadiserver[17580]: org.kde.pim.akonadiserver: Error during insertion into table "CollectionTable" "Duplicate entry '4-trash' for key 'CollectionTable_parentAndNameIndex' QMYSQL3: Unable to execute statement"

Now Kmail crashes at startup with:
The Email program encountered a fatal error and will terminate now.
The error was: Could not create collection trash, resourceId 4

The crash can be reproduced every time.

-- Backtrace:
Application: KMail (kmail), signal: Aborted
[KCrash Handler]
#4  0x00007f75bdd31420 in raise () from /lib64/libc.so.6
#5  0x00007f75bdd32a01 in abort () from /lib64/libc.so.6
#6  0x00007f75be15a016 in ?? () from /usr/lib64/libstdc++.so.6
#7  0x00007f75be16588c in ?? () from /usr/lib64/libstdc++.so.6
#8  0x00007f75be1658f7 in std::terminate() () from /usr/lib64/libstdc++.so.6
#9  0x00007f75be165ba9 in __cxa_throw () from /usr/lib64/libstdc++.so.6
#10 0x00007f75be541f92 in qBadAlloc () at global/qglobal.cpp:3192
#11 0x00007f75be5c4de4 in QListData::detach_grow (this=this@entry=0x55c86bf90b38, idx=idx@entry=0x7ffd63f47ccc, num=num@entry=1) at tools/qlist.cpp:80
#12 0x00007f75bf5d779c in QList<QWidget*>::detach_helper_grow (this=0x55c86bf90b38, i=<optimized out>, i@entry=2147483647, c=c@entry=1) at ../../include/QtCore/../../src/corelib/tools/qlist.h:759
#13 0x00007f75bf5d788d in QList<QWidget*>::append (this=<optimized out>, t=@0x7ffd63f47d20: 0x55c86bf5f0f0) at ../../include/QtCore/../../src/corelib/tools/qlist.h:585
#14 0x00007f75bf6037e8 in QWidget::insertAction (this=this@entry=0x55c86bf5f0f0, before=<optimized out>, before@entry=0x0, action=0x55c86bf90b50) at kernel/qwidget.cpp:3314
#15 0x00007f75bd8453e2 in KXMLGUI::ActionList::plug (this=this@entry=0x55c86c126840, container=0x55c86bf5f0f0, index=<optimized out>) at /usr/src/debug/kxmlgui-5.71.0-lp152.1.1.x86_64/src/kxmlguifactory_p.cpp:45
#16 0x00007f75bd848d02 in KXMLGUI::ContainerNode::plugActionList (this=this@entry=0x55c86befb370, state=..., mergingIdxIt=...) at /usr/src/debug/kxmlgui-5.71.0-lp152.1.1.x86_64/src/kxmlguifactory_p.cpp:234
#17 0x00007f75bd848ec6 in KXMLGUI::ContainerNode::plugActionList (this=0x55c86befb370, state=...) at /usr/src/debug/kxmlgui-5.71.0-lp152.1.1.x86_64/src/kxmlguifactory_p.cpp:204
#18 0x00007f75bd848f03 in KXMLGUI::ContainerNode::plugActionList (this=<optimized out>, state=...) at /usr/src/debug/kxmlgui-5.71.0-lp152.1.1.x86_64/src/kxmlguifactory_p.cpp:208
#19 0x00007f75bd848f03 in KXMLGUI::ContainerNode::plugActionList (this=<optimized out>, state=...) at /usr/src/debug/kxmlgui-5.71.0-lp152.1.1.x86_64/src/kxmlguifactory_p.cpp:208
#20 0x00007f75bd8427fb in KXMLGUIFactory::plugActionList (this=0x55c86c77e460, client=client@entry=0x7f753c030060, name=..., actionList=...) at /usr/src/debug/kxmlgui-5.71.0-lp152.1.1.x86_64/src/kxmlguifactory.cpp:574
#21 0x00007f75bd839cc9 in KXMLGUIClient::plugActionList (this=this@entry=0x7f753c030060, name=..., actionList=...) at /usr/src/debug/kxmlgui-5.71.0-lp152.1.1.x86_64/src/kxmlguiclient.cpp:709
#22 0x00007f75b90edb1d in PimCommon::PluginInterface::initializePluginActions (this=<optimized out>, prefix=..., guiClient=0x7f753c030060) at /usr/src/debug/pimcommon-20.04.2-lp152.1.1.x86_64/src/pimcommonakonadi/genericplugins/plugininterface.cpp:168
#23 0x00007f75c07933ce in KMMainWidget::initializePluginActions (this=this@entry=0x55c86bdd1090) at /usr/src/debug/kmail-20.04.2-lp152.2.3.1.x86_64/src/kmmainwidget.cpp:4217
#24 0x00007f75c079ac53 in KMMainWidget::slotShowStartupFolder (this=0x55c86bdd1090) at /usr/src/debug/kmail-20.04.2-lp152.2.3.1.x86_64/src/kmmainwidget.cpp:4121
#25 0x00007f75be77de04 in QtPrivate::QSlotObjectBase::call (a=0x7ffd63f48150, r=<optimized out>, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394
#26 QSingleShotTimer::timerEvent (this=0x55c86bfa2210) at kernel/qtimer.cpp:318
#27 0x00007f75be77199b in QObject::event (this=0x55c86bfa2210, e=<optimized out>) at kernel/qobject.cpp:1283
#28 0x00007f75bf5cbf2c in QApplicationPrivate::notify_helper (this=this@entry=0x55c86b8776a0, receiver=receiver@entry=0x55c86bfa2210, e=e@entry=0x7ffd63f48490) at kernel/qapplication.cpp:3701
#29 0x00007f75bf5d3540 in QApplication::notify (this=0x7ffd63f48c00, receiver=0x55c86bfa2210, e=0x7ffd63f48490) at kernel/qapplication.cpp:3447
#30 0x00007f75be741328 in QCoreApplication::notifyInternal2 (receiver=0x55c86bfa2210, event=0x7ffd63f48490) at kernel/qcoreapplication.cpp:1088
#31 0x00007f75be79d819 in QTimerInfoList::activateTimers (this=0x55c86b93b250) at kernel/qtimerinfo_unix.cpp:643
#32 0x00007f75be79dfe1 in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:182
#33 0x00007f75b1162624 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#34 0x00007f75b11629c0 in ?? () from /usr/lib64/libglib-2.0.so.0
#35 0x00007f75b1162a4c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#36 0x00007f75be79e3af in QEventDispatcherGlib::processEvents (this=0x55c86b95ad30, flags=...) at kernel/qeventdispatcher_glib.cpp:422
#37 0x00007f75be73f57a in QEventLoop::exec (this=this@entry=0x7ffd63f486e0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#38 0x00007f75be748780 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1389
#39 0x000055c86a077a2b in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kmail-20.04.2-lp152.2.3.1.x86_64/src/main.cpp:163
[Inferior 1 (process 31372) detached]

Possible duplicates by query: bug 426463, bug 423904, bug 422151, bug 421432, bug 418784.

Reported using DrKonqi