Bug 309346

Summary: Kontakt crashed when synchronizing gmail
Product: [Frameworks and Libraries] Akonadi Reporter: Fábio <fabiocmg>
Component: IMAP resourceAssignee: Kevin Ottens <ervin>
Status: RESOLVED FIXED    
Severity: crash CC: ach, kdepim-bugs, vkrause
Priority: NOR    
Version: 4.10   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 4.10.1
Attachments: New crash information added by DrKonqi

Description Fábio 2012-10-31 21:55:18 UTC
Application: akonadi_imap_resource (4.9)
KDE Platform Version: 4.9.2
Qt Version: 4.8.3
Operating System: Linux 3.5.0-17-generic x86_64
Distribution: Ubuntu 12.10

-- Information about the crash:
- What I was doing when the application crashed:
Trying to synchronize gmail.
- Unusual behavior I noticed:
Kontakt crashed and entered offline mode.
- Custom settings of the application:
Nothing special. Two accounts logged in.

The crash can be reproduced some of the time.

-- Backtrace:
Application: Google Mail do tipo Servidor de e-mails 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 0x7f3260064780 (LWP 3080))]

Thread 2 (Thread 0x7f324cfa0700 (LWP 3083)):
#0  0x00007f325baa7303 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f325a5f3d84 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f325a5f41e2 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f3250feb3b6 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007f325a617645 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f325b111e9a in start_thread (arg=0x7f324cfa0700) at pthread_create.c:308
#6  0x00007f325bab2cbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f3260064780 (LWP 3080)):
[KCrash Handler]
#6  0x00007f325f4796df in QObject::disconnect (sender=0x1681270, signal=0x14a6ec9 "stateChanged(KIMAP::Session::State,KIMAP::Session::State)", receiver=0x1639b10, method=0x1655259 "onSessionStateChanged(KIMAP::Session::State,KIMAP::Session::State)") at kernel/qobject.cpp:2891
#7  0x00000000004539f5 in SessionPool::killSession (this=this@entry=0x1639b10, session=session@entry=0x1681270, termination=termination@entry=SessionPool::LogoutSession) at ../../../resources/imap/sessionpool.cpp:176
#8  0x0000000000454421 in SessionPool::cancelSessionCreation (this=this@entry=0x1639b10, session=0x1681270, errorCode=errorCode@entry=4, errorMessage=...) at ../../../resources/imap/sessionpool.cpp:233
#9  0x00000000004556c5 in SessionPool::onPasswordRequestDone (this=0x1639b10, resultType=<optimized out>, password=...) at ../../../resources/imap/sessionpool.cpp:308
#10 0x0000000000456287 in SessionPool::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at ./sessionpool.moc:94
#11 0x00007f325f476f5f in QMetaObject::activate (sender=0x14f9880, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff87be1730) at kernel/qobject.cpp:3547
#12 0x0000000000441a21 in PasswordRequesterInterface::done (this=<optimized out>, _t1=2, _t2=...) at ./passwordrequesterinterface.moc:118
#13 0x00000000004210a4 in SettingsPasswordRequester::askUserInput (this=0x14f9880, serverError=...) at ../../../resources/imap/settingspasswordrequester.cpp:75
#14 0x00007f325f47643e in QObject::event (this=0x14f9880, e=<optimized out>) at kernel/qobject.cpp:1195
#15 0x00007f325e808e9c in QApplicationPrivate::notify_helper (this=this@entry=0x1269cc0, receiver=receiver@entry=0x14f9880, e=e@entry=0x1540720) at kernel/qapplication.cpp:4562
#16 0x00007f325e80d30a in QApplication::notify (this=0x7fff87be22b0, receiver=0x14f9880, e=0x1540720) at kernel/qapplication.cpp:4423
#17 0x00007f325c97c1d6 in KApplication::notify (this=0x7fff87be22b0, receiver=0x14f9880, event=0x1540720) at ../../kdeui/kernel/kapplication.cpp:311
#18 0x00007f325f46156e in QCoreApplication::notifyInternal (this=0x7fff87be22b0, receiver=receiver@entry=0x14f9880, event=event@entry=0x1540720) at kernel/qcoreapplication.cpp:915
#19 0x00007f325f4653f1 in sendEvent (event=0x1540720, receiver=0x14f9880) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#20 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x123c4d0) at kernel/qcoreapplication.cpp:1539
#21 0x00007f325f48fa63 in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236
#22 postEventSourceDispatch (s=0x126d880) at kernel/qeventdispatcher_glib.cpp:279
#23 0x00007f325a5f3ab5 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007f325a5f3de8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007f325a5f3ea4 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x00007f325f48fbf6 in QEventDispatcherGlib::processEvents (this=0x123dcb0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#27 0x00007f325e8adc1e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#28 0x00007f325f4602bf in QEventLoop::processEvents (this=this@entry=0x7fff87be2230, flags=...) at kernel/qeventloop.cpp:149
#29 0x00007f325f460548 in QEventLoop::exec (this=0x7fff87be2230, flags=...) at kernel/qeventloop.cpp:204
#30 0x00007f325f465708 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#31 0x00007f325fb7f683 in Akonadi::ResourceBase::init(Akonadi::ResourceBase*) () from /usr/lib/libakonadi-kde.so.4
#32 0x000000000041afe3 in Akonadi::ResourceBase::init<ImapResource> (argc=<optimized out>, argv=<optimized out>) at /usr/include/akonadi/resourcebase.h:188
#33 0x00007f325b9e076d in __libc_start_main (main=0x4154f0 <main(int, char**)>, argc=3, ubp_av=0x7fff87be23c8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff87be23b8) at libc-start.c:226
#34 0x00000000004156a5 in _start ()

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

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

Reported using DrKonqi
Comment 1 Achim Bohnet 2013-01-11 13:28:23 UTC
Created attachment 76386 [details]
New crash information added by DrKonqi

akonadi_imap_resource (4.9) on KDE Platform 4.9.97 using Qt 4.8.3

- What I was doing when the application crashed:

After resume from RAM, I noticed ~ 20 minutes later that a dialog was shown that google mail refused the login data. As I had no time I didn't choose 'retry' or 'account data' but I clicked on cancel.  Some seconds later the crash report assistant was shown.

- Unusual behavior I noticed:

Since 4.10 beta: whenever I login, the automatic login to my e-mail 4 imap accounts  stopped working (gmail, t-online.de,  dovecot (at work) and a 4th imap at gwdg).   I've always to enter the password in a dialog for each of the imap accounts (the same passwords as stored in the wallet :-(  )

-- Backtrace (Reduced):
#6  0x00007fb6adc826df in QObject::disconnect (sender=0x23beb60, signal=0x26b59e9 "stateChanged(KIMAP::Session::State,KIMAP::Session::State)", receiver=0x23bee30, method=0x23e0399 "onSessionStateChanged(KIMAP::Session::State,KIMAP::Session::State)") at kernel/qobject.cpp:2891
#7  0x0000000000454a95 in SessionPool::killSession (this=this@entry=0x23bee30, session=session@entry=0x23beb60, termination=termination@entry=SessionPool::LogoutSession) at ../../../resources/imap/sessionpool.cpp:176
#8  0x00000000004554c1 in SessionPool::cancelSessionCreation (this=this@entry=0x23bee30, session=0x23beb60, errorCode=errorCode@entry=4, errorMessage=...) at ../../../resources/imap/sessionpool.cpp:233
#9  0x0000000000456765 in SessionPool::onPasswordRequestDone (this=0x23bee30, resultType=<optimized out>, password=...) at ../../../resources/imap/sessionpool.cpp:308
#10 0x0000000000457327 in SessionPool::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at ./sessionpool.moc:94
Comment 2 Achim Bohnet 2013-01-11 13:36:03 UTC
When I closed the bug report wizard the same dialog pop up again.

The server for account "Google (alleehol)" refused the supplied username and password. Do you want to go to the settings, have another attempt at logging in, or do nothing?

Login failed, server replied: A000002 NO Application-specific password required: http://support.google.com/accounts/bin/answer.py?answer=185833 ( Failure ) [ ALERT  ]


I did 'cancel' again and this time no crash but the expected in notification:

Resource Google (alleehol) is broken. This resource is now offline

So a new created imap akonadi resource worked as expected.
Comment 3 Achim Bohnet 2013-01-11 13:43:50 UTC
I use 4.10 rc2 (4.9.97).   So I changed version to 4.10.   I did not confirm the bug, because for me
it happened when I canceled the login and not as the original reported wrote during sync and kontact was not crashing.
Comment 4 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 309357, bug 308207, bug 312535, bug 311014, bug 307780
FIXED-IN: 4.10.1

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

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