Bug 290682

Summary: Kontact crashes in Akonadi code after Akonadi was stopped and started
Product: [Frameworks and Libraries] Akonadi Reporter: Matthias Kretz <kretz>
Component: libakonadiAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: crash    
Priority: NOR    
Version: 4.8   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Matthias Kretz 2012-01-05 11:14:45 UTC
Application: kontact (4.8 rc1)
KDE Platform Version: 4.7.95 (4.8 RC1 (4.7.95)
Qt Version: 4.7.4
Operating System: Linux 3.0.0-14-generic x86_64
Distribution: Ubuntu 11.10

-- Information about the crash:
- What I was doing when the application crashed:

Every 5 minutes (the check interval of the IMAP account) I got a lot (> 20) of warning messages "<account name>: There is currently no session to the IMAP server available.". To get rid of the problem (which reliably made knotify4 hang after a few occurrences) I wanted to try to stop and start the Akonadi server. When the notification "The Akonadi server has been started and can be used now." appeared Kontact crashed immediately.

-- Backtrace:
Application: Kontact (kontact), signal: Aborted
[Current thread is 1 (Thread 0x7f09c37ab7a0 (LWP 29070))]

Thread 4 (Thread 0x7f09a9725700 (LWP 29071)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f09c0011c2c in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#2  0x00007f09c0011d59 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#3  0x00007f09bb7f5efc in start_thread (arg=0x7f09a9725700) at pthread_create.c:304
#4  0x00007f09c0d1f89d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f09a8e24700 (LWP 29072)):
#0  0x00007f09c0d13773 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f09bb323f68 in g_main_context_poll (n_fds=1, fds=0x10f2510, timeout=8855, context=0x10f2620, priority=<optimized out>) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3402
#2  g_main_context_iterate (context=0x10f2620, block=<optimized out>, dispatch=1, self=<optimized out>) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3084
#3  0x00007f09bb324429 in g_main_context_iteration (context=0x10f2620, may_block=1) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3152
#4  0x00007f09c147bf3e in QEventDispatcherGlib::processEvents (this=0x10f22f0, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#5  0x00007f09c144fcf2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007f09c144fef7 in QEventLoop::exec (this=0x7f09a8e23de0, flags=...) at kernel/qeventloop.cpp:201
#7  0x00007f09c136727f in QThread::exec (this=<optimized out>) at thread/qthread.cpp:498
#8  0x00007f09c1369d05 in QThreadPrivate::start (arg=0x10f14e0) at thread/qthread_unix.cpp:331
#9  0x00007f09bb7f5efc in start_thread (arg=0x7f09a8e24700) at pthread_create.c:304
#10 0x00007f09c0d1f89d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f095b9e5700 (LWP 30895)):
#0  __lll_lock_wait_private () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:97
#1  0x00007f09c0cbc9df in _L_lock_10501 () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007f09c0cbad71 in __GI___libc_free (mem=0x7f09c0fd81c0) at malloc.c:3736
#3  0x00007f09bb31f4e1 in g_source_unref_internal (source=0x7a32810, context=0x20e8580, have_lock=0) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:1702
#4  0x00007f09c147bc37 in QEventDispatcherGlib::~QEventDispatcherGlib (this=0x19169d0, __in_chrg=<optimized out>) at kernel/qeventdispatcher_glib.cpp:373
#5  0x00007f09c147be49 in QEventDispatcherGlib::~QEventDispatcherGlib (this=0x19169d0, __in_chrg=<optimized out>) at kernel/qeventdispatcher_glib.cpp:401
#6  0x00007f09c1368e34 in QThreadPrivate::finish (arg=0x7f09c1784580) at thread/qthread_unix.cpp:367
#7  0x00007f09c1369d0d in ~__pthread_cleanup_class (this=<synthetic pointer>, __in_chrg=<optimized out>) at /usr/include/pthread.h:545
#8  ~__pthread_cleanup_class (this=<synthetic pointer>, __in_chrg=<optimized out>) at thread/qthread_unix.cpp:824
#9  QThreadPrivate::start (arg=0x7f09c1784580) at thread/qthread_unix.cpp:290
#10 0x00007f09bb7f5efc in start_thread (arg=0x7f095b9e5700) at pthread_create.c:304
#11 0x00007f09c0d1f89d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f09c37ab7a0 (LWP 29070)):
[KCrash Handler]
#6  0x00007f09c0c743a5 in __GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#7  0x00007f09c0c77b0b in __GI_abort () at abort.c:92
#8  0x00007f09c0cac113 in __libc_message (do_abort=2, fmt=0x7f09c0d9d0d8 "*** glibc detected *** %s: %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:189
#9  0x00007f09c0cb6a96 in malloc_printerr (action=3, str=0x7f09c0d9a0d2 "corrupted double-linked list", ptr=<optimized out>) at malloc.c:6283
#10 0x00007f09c0cb6e68 in malloc_consolidate (av=0x7f09c0fd81c0) at malloc.c:5161
#11 0x00007f09c0cb7659 in malloc_consolidate (av=0x7f09c0fd81c0) at malloc.c:5115
#12 _int_free (av=0x7f09c0fd81c0, p=<optimized out>) at malloc.c:5034
#13 0x00007f09c0cbad7c in __GI___libc_free (mem=<optimized out>) at malloc.c:3738
#14 0x00007f09c13854da in QHashData::free_helper (this=0x1c20c40, node_delete=0x7f09bdae05b0 <QHash<long long, QList<Node*> >::deleteNode2(QHashData::Node*)>) at tools/qhash.cpp:271
#15 0x00007f09bdaec12b in freeData (x=<optimized out>, this=<optimized out>) at /usr/include/qt4/QtCore/qhash.h:568
#16 operator= (other=..., this=0x17db518) at /usr/include/qt4/QtCore/qhash.h:595
#17 clear (this=0x17db518) at /usr/include/qt4/QtCore/qhash.h:574
#18 Akonadi::EntityTreeModelPrivate::endResetModel (this=0x17db500) at ../../akonadi/entitytreemodel_p.cpp:1706
#19 0x00007f09bdad93e0 in Akonadi::EntityTreeModel::qt_metacall (this=0x16ab410, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fffc5493300) at ./entitytreemodel.moc:144
#20 0x00007f09c1463eba in QMetaObject::activate (sender=0x16bd820, m=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3278
#21 0x00007f09bdb5c5b8 in Akonadi::ServerManagerPrivate::setState (this=0x17c07e0, state=Akonadi::ServerManager::Running) at ../../akonadi/servermanager.cpp:88
#22 0x00007f09bdb59e25 in checkStatusChanged (this=0x17c07e0) at ../../akonadi/servermanager.cpp:78
#23 serviceOwnerChanged (this=0x17c07e0) at ../../akonadi/servermanager.cpp:73
#24 Akonadi::ServerManager::qt_metacall (this=0x16bd820, _c=<optimized out>, _id=3, _a=0x7fffc54935d0) at ./servermanager.moc:86
#25 0x00007f09c1463eba in QMetaObject::activate (sender=0x1716e80, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fffc54935d0) at kernel/qobject.cpp:3278
#26 0x00007f09bde96fbf in QDBusServiceWatcher::serviceOwnerChanged (this=<optimized out>, _t1=<optimized out>, _t2=<optimized out>, _t3=<optimized out>) at .moc/release-shared/moc_qdbusservicewatcher.cpp:146
#27 0x00007f09bde96ffd in QDBusServiceWatcherPrivate::_q_serviceOwnerChanged (this=<optimized out>, service=..., oldOwner=..., newOwner=...) at qdbusservicewatcher.cpp:82
#28 0x00007f09bde97a14 in QDBusServiceWatcher::qt_metacall (this=0x1716e80, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7fffc54937e0) at .moc/release-shared/moc_qdbusservicewatcher.cpp:91
#29 0x00007f09bde5d0e9 in QDBusConnectionPrivate::deliverCall (this=0x10d5fb0, object=0x1716e80, msg=..., metaTypes=..., slotIdx=7) at qdbusintegrator.cpp:942
#30 0x00007f09bde6638f in QDBusCallDeliveryEvent::placeMetaCall (this=<optimized out>, object=<optimized out>) at qdbusintegrator_p.h:103
#31 0x00007f09c1467a5e in QObject::event (this=0x1716e80, e=<optimized out>) at kernel/qobject.cpp:1217
#32 0x00007f09c1e51424 in notify_helper (e=0xb37c100, receiver=0x1716e80, this=0x10e2d70) at kernel/qapplication.cpp:4486
#33 QApplicationPrivate::notify_helper (this=0x10e2d70, receiver=0x1716e80, e=0xb37c100) at kernel/qapplication.cpp:4458
#34 0x00007f09c1e56291 in QApplication::notify (this=0x7fffc5494070, receiver=0x1716e80, e=0xb37c100) at kernel/qapplication.cpp:4365
#35 0x00007f09c2b65a46 in KApplication::notify (this=0x7fffc5494070, receiver=0x1716e80, event=0xb37c100) at ../../kdeui/kernel/kapplication.cpp:311
#36 0x00007f09c1450afc in QCoreApplication::notifyInternal (this=0x7fffc5494070, receiver=0x1716e80, event=0xb37c100) at kernel/qcoreapplication.cpp:787
#37 0x00007f09c145451f in sendEvent (event=0xb37c100, receiver=0x1716e80) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#38 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x10b56b0) at kernel/qcoreapplication.cpp:1428
#39 0x00007f09c147ba73 in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#40 postEventSourceDispatch (s=<optimized out>) at kernel/qeventdispatcher_glib.cpp:277
#41 0x00007f09bb323a5d in g_main_dispatch (context=0x10f70f0) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:2441
#42 g_main_context_dispatch (context=0x10f70f0) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3011
#43 0x00007f09bb324258 in g_main_context_iterate (context=0x10f70f0, block=<optimized out>, dispatch=1, self=<optimized out>) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3089
#44 0x00007f09bb324429 in g_main_context_iteration (context=0x10f70f0, may_block=1) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3152
#45 0x00007f09c147bed6 in QEventDispatcherGlib::processEvents (this=0x10b7170, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#46 0x00007f09c1ef907e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#47 0x00007f09c144fcf2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#48 0x00007f09c144fef7 in QEventLoop::exec (this=0x7fffc5494000, flags=...) at kernel/qeventloop.cpp:201
#49 0x00007f09c1454789 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1064
#50 0x0000000000403629 in main (argc=1, argv=0x7fffc5494698) at ../../../kontact/src/main.cpp:218

Possible duplicates by query: bug 290537, bug 290162, bug 290083, bug 290055, bug 289855.

Reported using DrKonqi
Comment 1 Denis Kurz 2016-09-24 20:41:11 UTC
This bug has only been reported for versions older than KDEPIM 4.14 (at most akonadi-1.3). Can anyone tell if this bug still present?

If noone confirms this bug for a recent version of akonadi (part of KDE Applications 15.08 or later), it gets closed in about three months.
Comment 2 Denis Kurz 2017-01-07 22:45:42 UTC
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.0 aka 15.08), please open a new one unless it already exists. Thank you for all your input.