Bug 309357

Summary: Aconadi imap service crashed after login
Product: [Frameworks and Libraries] Akonadi Reporter: Serjio <sivantsov>
Component: IMAP resourceAssignee: Kevin Ottens <ervin>
Status: RESOLVED FIXED    
Severity: crash CC: giecrilj, kdepim-bugs, vkrause
Priority: NOR    
Version: 4.8   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 4.10.1
Attachments: New crash information added by DrKonqi

Description Serjio 2012-11-01 07:32:34 UTC
Application: akonadi_imap_resource (4.8)
KDE Platform Version: 4.8.5 (4.8.5)
Qt Version: 4.8.1
Operating System: Linux 3.2.0-32-generic x86_64
Distribution: Ubuntu 12.04.1 LTS

-- Information about the crash:
- Unusual behavior I noticed:

Aconadi imap service crashed after login. Immer wieder. wiederholt. Program post (thunderbird) it is not running.

The crash can be reproduced every time.

-- Backtrace:
Application: sivantsov@mail.ru of type Почтовый сервер IMAP (akonadi_imap_resource), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fd691035780 (LWP 2789))]

Thread 2 (Thread 0x7fd67cf66700 (LWP 2837)):
#0  0x00007fd68c9d08bd in read () at ../sysdeps/unix/syscall-template.S:82
#1  0x00007fd68b5578cf in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fd68b51cba4 in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fd68b51cfd6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fd68b51d164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fd690450426 in QEventDispatcherGlib::processEvents (this=0x7fd670002c70, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#6  0x00007fd69041fc82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#7  0x00007fd69041fed7 in QEventLoop::exec (this=0x7fd67cf65dd0, flags=...) at kernel/qeventloop.cpp:204
#8  0x00007fd69031efa7 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#9  0x00007fd6903ff9ff in QInotifyFileSystemWatcherEngine::run (this=0x1603a90) at io/qfilesystemwatcher_inotify.cpp:248
#10 0x00007fd690321fcb in QThreadPrivate::start (arg=0x1603a90) at thread/qthread_unix.cpp:298
#11 0x00007fd68c038e9a in start_thread (arg=0x7fd67cf66700) at pthread_create.c:308
#12 0x00007fd68c9ddcbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#13 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fd691035780 (LWP 2789)):
[KCrash Handler]
#6  0x00007fd690434b02 in QObject::disconnect (sender=0x137aee0, signal=0x1655a89 "stateChanged(KIMAP::Session::State,KIMAP::Session::State)", receiver=0x132e3d0, method=0x1646739 "onSessionStateChanged(KIMAP::Session::State,KIMAP::Session::State)") at kernel/qobject.cpp:2891
#7  0x0000000000454365 in SessionPool::killSession (this=0x132e3d0, session=0x137aee0, termination=SessionPool::LogoutSession) at ../../../resources/imap/sessionpool.cpp:176
#8  0x0000000000454d67 in SessionPool::cancelSessionCreation (this=0x132e3d0, session=0x137aee0, errorCode=4, errorMessage=...) at ../../../resources/imap/sessionpool.cpp:233
#9  0x0000000000455090 in SessionPool::onPasswordRequestDone (this=0x132e3d0, resultType=<optimized out>, password=...) at ../../../resources/imap/sessionpool.cpp:308
#10 0x0000000000456cd7 in SessionPool::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at ./sessionpool.moc:94
#11 0x00007fd690435281 in QMetaObject::activate (sender=0x1325160, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff1a8a3e90) at kernel/qobject.cpp:3547
#12 0x00000000004421c1 in PasswordRequesterInterface::done (this=<optimized out>, _t1=2, _t2=...) at ./passwordrequesterinterface.moc:118
#13 0x00000000004211f2 in SettingsPasswordRequester::onPasswordRequestCompleted (this=0x1325160, password=..., userRejected=true) at ../../../resources/imap/settingspasswordrequester.cpp:85
#14 0x00007fd690435281 in QMetaObject::activate (sender=0x1346110, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff1a8a4030) at kernel/qobject.cpp:3547
#15 0x000000000041faf1 in Settings::passwordRequestCompleted (this=<optimized out>, _t1=..., _t2=true) at ./settings.moc:124
#16 0x0000000000420030 in Settings::onDialogFinished (this=0x1346110, result=<optimized out>) at ../../../resources/imap/settings.cpp:166
#17 0x00000000004202c3 in Settings::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at ./settings.moc:74
#18 0x00007fd690435281 in QMetaObject::activate (sender=0x137dd90, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff1a8a4210) at kernel/qobject.cpp:3547
#19 0x00007fd68fc73f4e in QDialog::finished (this=<optimized out>, _t1=0) at .moc/release-shared/moc_qdialog.cpp:153
#20 0x00007fd68fc73fea in QDialog::done (this=<optimized out>, r=0) at dialogs/qdialog.cpp:597
#21 0x00007fd68d82304c in KDialog::slotButtonClicked (this=0x137dd90, button=32) at ../../kdeui/dialogs/kdialog.cpp:912
#22 0x00007fd68d823554 in qt_static_metacall (_a=<optimized out>, _id=<optimized out>, _o=<optimized out>, _c=<optimized out>) at ./kdialog.moc:167
#23 KDialog::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at ./kdialog.moc:127
#24 0x00007fd690435281 in QMetaObject::activate (sender=0x13eba80, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff1a8a43e0) at kernel/qobject.cpp:3547
#25 0x00007fd69043cb3e in QSignalMapper::mapped (this=<optimized out>, _t1=32) at .moc/release-shared/moc_qsignalmapper.cpp:115
#26 0x00007fd69043d0db in QSignalMapper::map (this=0x13eba80, sender=0x1328aa0) at kernel/qsignalmapper.cpp:266
#27 0x00007fd690435281 in QMetaObject::activate (sender=0x1328aa0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff1a8a4570) at kernel/qobject.cpp:3547
#28 0x00007fd68fe33c72 in QAbstractButton::clicked (this=<optimized out>, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:220
#29 0x00007fd68fb71a4e in QAbstractButtonPrivate::emitClicked (this=<optimized out>) at widgets/qabstractbutton.cpp:548
#30 0x00007fd68fb72d8b in QAbstractButtonPrivate::click (this=0x1383a60) at widgets/qabstractbutton.cpp:541
#31 0x00007fd68fb72e64 in QAbstractButton::timerEvent (this=0x1328aa0, e=<optimized out>) at widgets/qabstractbutton.cpp:1260
#32 0x00007fd69043a179 in QObject::event (this=0x1328aa0, e=<optimized out>) at kernel/qobject.cpp:1157
#33 0x00007fd68f7f3b7b in QWidget::event (this=0x1328aa0, event=0x7fff1a8a4f10) at kernel/qwidget.cpp:8821
#34 0x00007fd68f7a3894 in notify_helper (e=0x7fff1a8a4f10, receiver=0x1328aa0, this=0x118c290) at kernel/qapplication.cpp:4559
#35 QApplicationPrivate::notify_helper (this=0x118c290, receiver=0x1328aa0, e=0x7fff1a8a4f10) at kernel/qapplication.cpp:4531
#36 0x00007fd68f7a8713 in QApplication::notify (this=0x7fff1a8a5200, receiver=0x1328aa0, e=0x7fff1a8a4f10) at kernel/qapplication.cpp:4420
#37 0x00007fd68d8cd3f6 in KApplication::notify (this=0x7fff1a8a5200, receiver=0x1328aa0, event=0x7fff1a8a4f10) at ../../kdeui/kernel/kapplication.cpp:311
#38 0x00007fd690420e9c in QCoreApplication::notifyInternal (this=0x7fff1a8a5200, receiver=0x1328aa0, event=0x7fff1a8a4f10) at kernel/qcoreapplication.cpp:876
#39 0x00007fd6904521f2 in sendEvent (event=0x7fff1a8a4f10, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#40 QTimerInfoList::activateTimers (this=0x1188b60) at kernel/qeventdispatcher_unix.cpp:611
#41 0x00007fd69044fc0d in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:186
#42 timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:180
#43 0x00007fd69044fc31 in idleTimerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:233
#44 0x00007fd68b51cd53 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#45 0x00007fd68b51d0a0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#46 0x00007fd68b51d164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#47 0x00007fd6904503bf in QEventDispatcherGlib::processEvents (this=0x115ccb0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#48 0x00007fd68f84bd5e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#49 0x00007fd69041fc82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#50 0x00007fd69041fed7 in QEventLoop::exec (this=0x7fff1a8a5180, flags=...) at kernel/qeventloop.cpp:204
#51 0x00007fd690424f67 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#52 0x00007fd690b4f326 in Akonadi::ResourceBase::init (r=0x1303e40) at ../../akonadi/resourcebase.cpp:412
#53 0x000000000041a996 in Akonadi::ResourceBase::init<ImapResource> (argc=<optimized out>, argv=<optimized out>) at /usr/include/akonadi/resourcebase.h:188
#54 0x00007fd68c90b76d in __libc_start_main (main=0x4151c0 <main(int, char**)>, argc=3, ubp_av=0x7fff1a8a5318, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff1a8a5308) at libc-start.c:226
#55 0x0000000000415375 in _start ()

This bug may be a duplicate of or related to bug 288268.

Possible duplicates by query: bug 309346, bug 308888, bug 308207, bug 307780, bug 307658.

Reported using DrKonqi
Comment 1 Christopher Yeleighton 2012-11-02 20:18:19 UTC
Created attachment 74943 [details]
New crash information added by DrKonqi

akonadi_imap_resource (4.8) on KDE Platform 4.8.5 (4.8.5) "release 2" using Qt 4.8.1

- What I was doing when the application crashed:

I was trying to set up a GMail IMAP account.

-- Backtrace (Reduced):
#5  0x00007f51aaaac88f in QObject::disconnect (sender=0x2786800, signal=0x2476889 "stateChanged(KIMAP::Session::State,KIMAP::Session::State)", receiver=0x25f5090, method=0x248fb89 "onSessionStateChanged(KIMAP::Session::State,KIMAP::Session::State)") at kernel/qobject.cpp:2900
#6  0x0000000000453ca5 in SessionPool::killSession (this=this@entry=0x25f5090, session=session@entry=0x2786800, termination=termination@entry=SessionPool::LogoutSession) at /usr/src/debug/kdepim-runtime-4.8.5/resources/imap/sessionpool.cpp:176
#7  0x00000000004546d1 in SessionPool::cancelSessionCreation (this=this@entry=0x25f5090, session=0x2786800, errorCode=errorCode@entry=4, errorMessage=...) at /usr/src/debug/kdepim-runtime-4.8.5/resources/imap/sessionpool.cpp:233
#8  0x0000000000455a15 in SessionPool::onPasswordRequestDone (this=0x25f5090, resultType=<optimized out>, password=...) at /usr/src/debug/kdepim-runtime-4.8.5/resources/imap/sessionpool.cpp:308
#9  0x00000000004565d7 in SessionPool::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /usr/src/debug/kdepim-runtime-4.8.5/build/resources/imap/sessionpool.moc:94
Comment 2 David Faure 2013-02-17 21:02:35 UTC
Git commit d82e4917f7286984bce16c2fa36ea4e9f6a24453 by David Faure.
Committed on 17/02/2013 at 21:54.
Pushed by dfaure into branch 'KDE/4.10'.

Fix crash due to dangling session pointer in m_pendingInitialSession.

This happens after disconnect() kills all sessions (e.g. due to losing
internet connection while the password dialog is up, or explicit toggling
of offline/online status, or due to the "SSL not supported").
Related: bug 312480, bug 310072, bug 308888, bug 288268, bug 312057, bug 308207, bug 312535, bug 311014, bug 309346, bug 307780
FIXED-IN: 4.10.1

M  +1    -0    resources/imap/sessionpool.cpp

http://commits.kde.org/kdepim-runtime/d82e4917f7286984bce16c2fa36ea4e9f6a24453