Bug 372712 - Protocol::HelloResponse not correctly parsed, the object is just a Command with type set
Summary: Protocol::HelloResponse not correctly parsed, the object is just a Command wi...
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: libakonadi (show other bugs)
Version: unspecified
Platform: OpenSUSE Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 372170 373242 374743 377230 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-11-20 21:20 UTC by Jure Repinc
Modified: 2018-08-27 22:57 UTC (History)
7 users (show)

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 Jure Repinc 2016-11-20 21:20:04 UTC
I had KMail window open and sitting in background when I got a message that akonadi_imap_resource crashed. This is the backtrace I got

Application: akonadi_imap_resource (akonadi_imap_resource), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fa164fb9940 (LWP 1845))]

Thread 7 (Thread 0x7fa1377fe700 (LWP 2065)):
#0  0x00007fa159238ea9 in g_mutex_lock () from /usr/lib64/libglib-2.0.so.0
#1  0x00007fa1591f2d85 in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fa1591f379b in ?? () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fa1591f398c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#4  0x00007fa15ffd979b in QEventDispatcherGlib::processEvents (this=0x7fa1280008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#5  0x00007fa15ff831ea in QEventLoop::exec (this=this@entry=0x7fa1377fdc80, flags=..., flags@entry=...) at kernel/qeventloop.cpp:210
#6  0x00007fa15fdb18b3 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:507
#7  0x00007fa15fdb6558 in QThreadPrivate::start (arg=0x19fa2c0) at thread/qthread_unix.cpp:344
#8  0x00007fa15c3da454 in start_thread () from /lib64/libpthread.so.0
#9  0x00007fa15f4ac39f in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7fa137fff700 (LWP 1984)):
#0  0x00007fa15f4a368d in poll () from /lib64/libc.so.6
#1  0x00007fa1591f3876 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fa1591f398c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fa15ffd979b in QEventDispatcherGlib::processEvents (this=0x7fa1300008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007fa15ff831ea in QEventLoop::exec (this=this@entry=0x7fa137ffec80, flags=..., flags@entry=...) at kernel/qeventloop.cpp:210
#5  0x00007fa15fdb18b3 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:507
#6  0x00007fa15fdb6558 in QThreadPrivate::start (arg=0x1af2f70) at thread/qthread_unix.cpp:344
#7  0x00007fa15c3da454 in start_thread () from /lib64/libpthread.so.0
#8  0x00007fa15f4ac39f in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7fa145892700 (LWP 1871)):
#0  0x00007fa15fe5b6fe in qt_gettime () at tools/qelapsedtimer_unix.cpp:180
#1  0x00007fa15ffd7419 in QTimerInfoList::updateCurrentTime (this=this@entry=0x7fa13c002ed0) at kernel/qtimerinfo_unix.cpp:91
#2  0x00007fa15ffd79c5 in QTimerInfoList::timerWait (this=0x7fa13c002ed0, tm=...) at kernel/qtimerinfo_unix.cpp:388
#3  0x00007fa15ffd8d6e in timerSourcePrepareHelper (timeout=0x7fa145891ab4, src=<optimized out>) at kernel/qeventdispatcher_glib.cpp:132
#4  timerSourcePrepare (source=<optimized out>, timeout=0x7fa145891ab4) at kernel/qeventdispatcher_glib.cpp:165
#5  0x00007fa1591f2d79 in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#6  0x00007fa1591f379b in ?? () from /usr/lib64/libglib-2.0.so.0
#7  0x00007fa1591f398c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#8  0x00007fa15ffd979b in QEventDispatcherGlib::processEvents (this=0x7fa13c0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#9  0x00007fa15ff831ea in QEventLoop::exec (this=this@entry=0x7fa145891c80, flags=..., flags@entry=...) at kernel/qeventloop.cpp:210
#10 0x00007fa15fdb18b3 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:507
#11 0x00007fa15fdb6558 in QThreadPrivate::start (arg=0x1aaa9e0) at thread/qthread_unix.cpp:344
#12 0x00007fa15c3da454 in start_thread () from /lib64/libpthread.so.0
#13 0x00007fa15f4ac39f in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7fa146aa3700 (LWP 1862)):
#0  0x00007fa1591f2d38 in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#1  0x00007fa1591f379b in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fa1591f398c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fa15ffd979b in QEventDispatcherGlib::processEvents (this=0x7fa1380008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007fa15ff831ea in QEventLoop::exec (this=this@entry=0x7fa146aa2c80, flags=..., flags@entry=...) at kernel/qeventloop.cpp:210
#5  0x00007fa15fdb18b3 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:507
#6  0x00007fa15fdb6558 in QThreadPrivate::start (arg=0x19d4c10) at thread/qthread_unix.cpp:344
#7  0x00007fa15c3da454 in start_thread () from /lib64/libpthread.so.0
#8  0x00007fa15f4ac39f in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7fa1472a4700 (LWP 1861)):
#0  0x00007fa15f4a368d in poll () from /lib64/libc.so.6
#1  0x00007fa1591f3876 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fa1591f398c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fa15ffd979b in QEventDispatcherGlib::processEvents (this=0x7fa1400008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007fa15ff831ea in QEventLoop::exec (this=this@entry=0x7fa1472a3c50, flags=..., flags@entry=...) at kernel/qeventloop.cpp:210
#5  0x00007fa15fdb18b3 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:507
#6  0x00007fa1615e73e5 in ?? () from /usr/lib64/libQt5DBus.so.5
#7  0x00007fa15fdb6558 in QThreadPrivate::start (arg=0x7fa161858d20) at thread/qthread_unix.cpp:344
#8  0x00007fa15c3da454 in start_thread () from /lib64/libpthread.so.0
#9  0x00007fa15f4ac39f in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7fa14d070700 (LWP 1860)):
#0  0x00007fa15f4a368d in poll () from /lib64/libc.so.6
#1  0x00007fa15aca13e0 in ?? () from /usr/lib64/libxcb.so.1
#2  0x00007fa15aca3179 in xcb_wait_for_event () from /usr/lib64/libxcb.so.1
#3  0x00007fa14efb05f9 in QXcbEventReader::run (this=0x19f0380) at qxcbconnection.cpp:1337
#4  0x00007fa15fdb6558 in QThreadPrivate::start (arg=0x19f0380) at thread/qthread_unix.cpp:344
#5  0x00007fa15c3da454 in start_thread () from /lib64/libpthread.so.0
#6  0x00007fa15f4ac39f in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7fa164fb9940 (LWP 1845)):
[KCrash Handler]
#6  std::__atomic_base<int>::load (__m=std::memory_order_relaxed, this=0x20) at /usr/include/c++/6/bits/atomic_base.h:396
#7  QAtomicOps<int>::load<int> (_q_value=...) at /usr/include/qt5/QtCore/qatomic_cxx11.h:103
#8  QBasicAtomicInteger<int>::load (this=0x20) at /usr/include/qt5/QtCore/qbasicatomic.h:99
#9  QtPrivate::RefCount::ref (this=0x20) at /usr/include/qt5/QtCore/qrefcount.h:55
#10 0x00007fa15db62903 in QString::QString (other=..., this=0x7ffe4a7cfa20) at /usr/include/qt5/QtCore/qstring.h:899
#11 Akonadi::Protocol::Response::errorMessage (this=this@entry=0x7ffe4a7cfa00) at /usr/src/debug/akonadi-16.08.3/src/private/protocol.cpp:472
#12 0x00007fa162bc8961 in Akonadi::SessionPrivate::handleCommand (this=0x1a4e0a0, tag=<optimized out>, cmd=...) at /usr/src/debug/akonadi-16.08.3/src/core/session.cpp:108
#13 0x00007fa162bca418 in Akonadi::Session::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=0x7fa138005a70) at /usr/src/debug/akonadi-16.08.3/build/src/core/moc_session.cpp:117
#14 0x00007fa15ffb1d59 in QObject::event (this=0x1a52c40, e=<optimized out>) at kernel/qobject.cpp:1263
#15 0x00007fa160c7a92c in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x1a52c40, e=0x7fa138007700) at kernel/qapplication.cpp:3799
#16 0x00007fa160c820e1 in QApplication::notify (this=0x7ffe4a7d0100, receiver=0x1a52c40, e=0x7fa138007700) at kernel/qapplication.cpp:3556
#17 0x00007fa15ff85200 in QCoreApplication::notifyInternal2 (receiver=0x1a52c40, event=event@entry=0x7fa138007700) at kernel/qcoreapplication.cpp:988
#18 0x00007fa15ff8798d in QCoreApplication::sendEvent (event=0x7fa138007700, receiver=<optimized out>) at kernel/qcoreapplication.h:231
#19 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x19d1c60) at kernel/qcoreapplication.cpp:1649
#20 0x00007fa15ff87df8 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1503
#21 0x00007fa15ffd9373 in postEventSourceDispatch (s=0x1a10980) at kernel/qeventdispatcher_glib.cpp:276
#22 0x00007fa1591f3677 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#23 0x00007fa1591f38e0 in ?? () from /usr/lib64/libglib-2.0.so.0
#24 0x00007fa1591f398c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#25 0x00007fa15ffd977f in QEventDispatcherGlib::processEvents (this=0x1a19230, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#26 0x00007fa15ff831ea in QEventLoop::exec (this=this@entry=0x7ffe4a7d0060, flags=..., flags@entry=...) at kernel/qeventloop.cpp:210
#27 0x00007fa15ff8b95c in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1261
#28 0x00007fa1604d1f4c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1639
#29 0x00007fa160c7a885 in QApplication::exec () at kernel/qapplication.cpp:2975
#30 0x00007fa162f1534e in Akonadi::ResourceBase::init (r=r@entry=0x1a35290) at /usr/src/debug/akonadi-16.08.3/src/agentbase/resourcebase.cpp:605
#31 0x0000000000421b55 in Akonadi::ResourceBase::init<ImapResource> (argc=<optimized out>, argv=<optimized out>) at /usr/include/KF5/AkonadiAgentBase/resourcebase.h:196
#32 0x00007fa15f3e3291 in __libc_start_main () from /lib64/libc.so.6
#33 0x00000000004219fa in _start () at ../sysdeps/x86_64/start.S:120
Comment 1 Jure Repinc 2016-11-20 21:24:49 UTC
Oh and Akonadi version (as reported by akonadictl) is 5.3.3 which is not on the version list
Comment 2 Matt Whitlock 2016-12-25 17:13:05 UTC
I got the same crash on KMail 16.12.0 with Akonadi 16.12.0. Also occurred while KMail was in the background; I was not interacting with it.

[KCrash Handler]
#6  std::__atomic_base<int>::load (__m=std::memory_order_relaxed, this=0x18) at /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/bits/atomic_base.h:396
#7  QAtomicOps<int>::load<int> (_q_value=...) at /usr/include/qt5/QtCore/qatomic_cxx11.h:227
#8  QBasicAtomicInteger<int>::load (this=0x18) at /usr/include/qt5/QtCore/qbasicatomic.h:99
#9  QtPrivate::RefCount::ref (this=0x18) at /usr/include/qt5/QtCore/qrefcount.h:55
#10 0x00007fee950bc2d3 in Akonadi::Protocol::Response::errorMessage() const () at ../../../akonadi-16.12.0/src/private/protocol.cpp:488
#11 0x00007fee9f9f3831 in Akonadi::SessionPrivate::handleCommand (this=0x1fcd930, tag=<optimized out>, cmd=...) at ../../../akonadi-16.12.0/src/core/session.cpp:107
#12 0x00007fee9f9f4538 in Akonadi::Session::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=0x7fee740050b0) at ./moc_session.cpp:117
#13 0x00007feea19b39a9 in QObject::event (this=0x1f63b80, e=<optimized out>) at kernel/qobject.cpp:1263
#14 0x00007feea2268cfc in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x1f63b80, e=0x7fee741ad1c0) at kernel/qapplication.cpp:3799
#15 0x00007feea2270040 in QApplication::notify (this=0x7ffc229d3340, receiver=0x1f63b80, e=0x7fee741ad1c0) at kernel/qapplication.cpp:3556
#16 0x00007feea1987ce8 in QCoreApplication::notifyInternal2 (receiver=0x1f63b80, event=event@entry=0x7fee741ad1c0) at kernel/qcoreapplication.cpp:988
#17 0x00007feea198a3ab in QCoreApplication::sendEvent (event=0x7fee741ad1c0, receiver=<optimized out>) at kernel/qcoreapplication.h:231
#18 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x1c1e7a0) at kernel/qcoreapplication.cpp:1649
#19 0x00007feea198a818 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1503
#20 0x00007feea19db0d3 in postEventSourceDispatch (s=0x1c79b20) at kernel/qeventdispatcher_glib.cpp:276
#21 0x00007fee9de59507 in g_main_dispatch (context=0x7fee880016f0) at ../../glib-2.50.2/glib/gmain.c:3203
#22 g_main_context_dispatch (context=context@entry=0x7fee880016f0) at ../../glib-2.50.2/glib/gmain.c:3856
#23 0x00007fee9de59790 in g_main_context_iterate (context=context@entry=0x7fee880016f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../glib-2.50.2/glib/gmain.c:3929
#24 0x00007fee9de5983c in g_main_context_iteration (context=0x7fee880016f0, may_block=may_block@entry=1) at ../../glib-2.50.2/glib/gmain.c:3990
#25 0x00007feea19db4df in QEventDispatcherGlib::processEvents (this=0x1cbf510, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#26 0x00007feea1985cda in QEventLoop::exec (this=this@entry=0x7ffc229d2c60, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#27 0x00007feea198e2ec in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1261
#28 0x00007feea1cc0d4c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1633
#29 0x00007feea2268c55 in QApplication::exec () at kernel/qapplication.cpp:2975
#30 0x0000000000403ccb in main (argc=1, argv=0x7ffc229d3578) at ../../kmail-16.12.0/src/main.cpp:161
Comment 3 Daniel Vrátil 2017-01-06 22:17:50 UTC
Moving to libakonadi, this is a generic problem in Protocol (?), looks like the the command is not actually a HelloResponse, despite having the type set to Hello. Possibly the Response bit is not set when sent from the server?
Comment 4 Daniel Vrátil 2017-01-06 22:18:13 UTC
*** Bug 373242 has been marked as a duplicate of this bug. ***
Comment 5 Christoph Feck 2017-03-18 17:57:47 UTC
*** Bug 372170 has been marked as a duplicate of this bug. ***
Comment 6 Christoph Feck 2017-03-18 17:58:17 UTC
*** Bug 374743 has been marked as a duplicate of this bug. ***
Comment 7 Christoph Feck 2017-03-18 17:58:41 UTC
*** Bug 377230 has been marked as a duplicate of this bug. ***
Comment 8 Daniel Vrátil 2018-08-27 22:57:03 UTC
Should be fixed now that the protocol implementation is autogenerated