Bug 332643 - KDE Contacts List never opens when Akonadi fails to start
Summary: KDE Contacts List never opens when Akonadi fails to start
Status: RESOLVED FIXED
Alias: None
Product: telepathy
Classification: Frameworks and Libraries
Component: contactlist (show other bugs)
Version: 0.8.0
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: Future
Assignee: Telepathy Bugs
URL:
Keywords: drkonqi
: 332585 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-03-26 17:22 UTC by Smittie
Modified: 2014-05-23 08:21 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 0.9.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Smittie 2014-03-26 17:22:29 UTC
Application: ktp-contactlist (0.8.0)
KDE Platform Version: 4.12.3
Qt Version: 4.8.5
Operating System: Linux 3.13.6-200.fc20.x86_64 x86_64
Distribution: "Fedora release 20 (Heisenbug)"

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

KDE Contacts List the window opens but the list of contacts never populates. When a message is received a notification icon appears in the system tray and a conversation window opens but the text of the message never populates. If I create a new user on the system the problem does not reproduce indicating that something has gotten munged in the config or settings somewhere.

The crash can be reproduced every time.

-- Backtrace:
Application: KDE Telepathy Contact List (ktp-contactlist), signal: Aborted
Using host libthread_db library "/lib64/libthread_db.so.1".
81	T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
[KCrash Handler]
#5  0x000000328f235c39 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#6  0x000000328f237348 in __GI_abort () at abort.c:89
#7  0x0000003eeb271a44 in qt_message_output (msgType=msgType@entry=QtFatalMsg, buf=<optimized out>) at global/qglobal.cpp:2323
#8  0x0000003eeb271be9 in qt_message(enum QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=msgType@entry=QtFatalMsg, msg=msg@entry=0x3eed664f00 "QPixmap: Must construct a QApplication before a QPaintDevice", ap=ap@entry=0x7fffb2af1460) at global/qglobal.cpp:2369
#9  0x0000003eeb2724f1 in qFatal (msg=msg@entry=0x3eed664f00 "QPixmap: Must construct a QApplication before a QPaintDevice") at global/qglobal.cpp:2552
#10 0x0000003eed09c388 in qt_pixmap_thread_test () at image/qpixmap.cpp:102
#11 0x0000003eed09d2a9 in QPixmap::QPixmap (this=0x16d2db8) at image/qpixmap.cpp:174
#12 0x00007fd7f166a325 in Oxygen::Helper::Helper(QByteArray const&) () from /lib64/liboxygenstyle.so.4
#13 0x00007fd7f1921097 in Oxygen::StyleHelper::StyleHelper(QByteArray const&) () from /usr/lib64/kde4/plugins/styles/oxygen.so
#14 0x00007fd7f190b13c in Oxygen::Style::Style() () from /usr/lib64/kde4/plugins/styles/oxygen.so
#15 0x00007fd7f191751a in Oxygen::StylePlugin::create(QString const&) () from /usr/lib64/kde4/plugins/styles/oxygen.so
#16 0x0000003eed2cd9be in QStyleFactory::create (key=...) at styles/qstylefactory.cpp:193
#17 0x0000003eecfce871 in QApplication::style () at kernel/qapplication.cpp:1465
#18 0x0000003eed00c5f8 in QWidget::isActiveWindow (this=this@entry=0x1542530) at kernel/qwidget.cpp:6697
#19 0x0000003eed2ce235 in QStyleOption::init (this=this@entry=0x7fffb2af1830, widget=0x156a1d0, widget@entry=0x7fffb2af1830) at styles/qstyleoption.cpp:206
#20 0x0000003eed423d6d in initFrom (w=0x7fffb2af1830, this=0x7fffb2af1830) at ../../src/gui/styles/qstyleoption.h:99
#21 QScrollBar::initStyleOption (this=this@entry=0x156a1d0, option=option@entry=0x7fffb2af1830) at widgets/qscrollbar.cpp:311
#22 0x0000003eed42414e in QScrollBar::sizeHint (this=0x156a1d0) at widgets/qscrollbar.cpp:491
#23 0x0000003eed456258 in QAbstractScrollAreaPrivate::layoutChildren (this=0x157f140) at widgets/qabstractscrollarea.cpp:355
#24 0x0000003eed457392 in QAbstractScrollArea::setViewportMargins (this=this@entry=0x156a2d0, left=left@entry=0, top=top@entry=0, right=right@entry=0, bottom=bottom@entry=0) at widgets/qabstractscrollarea.cpp:876
#25 0x0000003eed532b92 in QTreeView::updateGeometries (this=0x156a2d0) at itemviews/qtreeview.cpp:2691
#26 0x0000003eed5243d2 in QTreeView::columnCountChanged (this=0x156a2d0, oldCount=<optimized out>, newCount=<optimized out>) at itemviews/qtreeview.cpp:2535
#27 0x0000003eeb398cf8 in QMetaObject::activate (sender=sender@entry=0x151c640, m=m@entry=0x3eedabd3c0 <QHeaderView::staticMetaObject>, local_signal_index=local_signal_index@entry=6, argv=argv@entry=0x7fffb2af1be0) at kernel/qobject.cpp:3547
#28 0x0000003eed4f47df in QHeaderView::sectionCountChanged (this=this@entry=0x151c640, _t1=_t1@entry=0, _t2=1) at .moc/release-shared/moc_qheaderview.cpp:267
#29 0x0000003eed4f5ff0 in QHeaderView::sectionsInserted (this=0x151c640, parent=..., logicalFirst=<optimized out>, logicalLast=0) at itemviews/qheaderview.cpp:1732
#30 0x0000003eeb398cf8 in QMetaObject::activate (sender=sender@entry=0x15a5440, m=m@entry=0x3eeb6e85c0 <QAbstractItemModel::staticMetaObject>, local_signal_index=local_signal_index@entry=9, argv=argv@entry=0x7fffb2af1dd0) at kernel/qobject.cpp:3547
#31 0x0000003eeb3e5874 in QAbstractItemModel::columnsInserted (this=this@entry=0x15a5440, _t1=..., _t2=0, _t3=0) at .moc/release-shared/moc_qabstractitemmodel.cpp:224
#32 0x0000003eeb37c6ae in QAbstractItemModel::endInsertColumns (this=this@entry=0x15a5440) at kernel/qabstractitemmodel.cpp:2741
#33 0x0000003eed56c9cf in QSortFilterProxyModelPrivate::insert_source_items (this=this@entry=0x159e750, source_to_proxy=..., proxy_to_source=..., source_items=..., source_parent=..., orient=orient@entry=Qt::Horizontal, emit_signal=emit_signal@entry=true) at itemviews/qsortfilterproxymodel.cpp:697
#34 0x0000003eed57038a in QSortFilterProxyModelPrivate::source_items_inserted (this=this@entry=0x159e750, source_parent=..., start=start@entry=0, end=end@entry=0, orient=orient@entry=Qt::Horizontal) at itemviews/qsortfilterproxymodel.cpp:806
#35 0x0000003eed570627 in QSortFilterProxyModelPrivate::_q_sourceColumnsInserted (this=0x159e750, source_parent=..., start=0, end=0) at itemviews/qsortfilterproxymodel.cpp:1332
#36 0x0000003eeb398cf8 in QMetaObject::activate (sender=sender@entry=0x19225e0, m=m@entry=0x3eeb6e85c0 <QAbstractItemModel::staticMetaObject>, local_signal_index=local_signal_index@entry=9, argv=argv@entry=0x7fffb2af2190) at kernel/qobject.cpp:3547
#37 0x0000003eeb3e5874 in QAbstractItemModel::columnsInserted (this=this@entry=0x19225e0, _t1=..., _t2=0, _t3=0) at .moc/release-shared/moc_qabstractitemmodel.cpp:224
#38 0x0000003eeb37c6ae in QAbstractItemModel::endInsertColumns (this=0x19225e0) at kernel/qabstractitemmodel.cpp:2741
#39 0x0000003eed57a44b in QStandardItemModelPrivate::columnsInserted (this=<optimized out>, parent=parent@entry=0x1922700, column=column@entry=0, count=count@entry=1) at itemviews/qstandarditemmodel.cpp:570
#40 0x0000003eed57b233 in QStandardItemPrivate::insertColumns (this=this@entry=0x1922720, column=column@entry=0, count=count@entry=1, items=...) at itemviews/qstandarditemmodel.cpp:478
#41 0x0000003eed57b2c3 in QStandardItem::insertColumns (this=this@entry=0x1922700, column=0, count=1) at itemviews/qstandarditemmodel.cpp:1516
#42 0x0000003eed57c2cf in QStandardItem::setColumnCount (this=this@entry=0x1922700, columns=<optimized out>) at itemviews/qstandarditemmodel.cpp:1428
#43 0x0000003eed57c6e8 in QStandardItem::insertRow (this=0x1922700, row=0, items=...) at itemviews/qstandarditemmodel.cpp:1456
#44 0x0000003fa1616f05 in KTp::AbstractGroupingProxyModel::itemForGroup(QString const&) () from /lib64/libktpmodelsprivate.so.7
#45 0x0000003fa1617a03 in KTp::AbstractGroupingProxyModel::onRowsInserted(QModelIndex const&, int, int) () from /lib64/libktpmodelsprivate.so.7
#46 0x0000003eeb398cf8 in QMetaObject::activate (sender=sender@entry=0x1920d60, m=m@entry=0x3eeb6e85c0 <QAbstractItemModel::staticMetaObject>, local_signal_index=local_signal_index@entry=5, argv=argv@entry=0x7fffb2af2540) at kernel/qobject.cpp:3547
#47 0x0000003eeb3e56b4 in QAbstractItemModel::rowsInserted (this=this@entry=0x1920d60, _t1=..., _t2=0, _t3=0) at .moc/release-shared/moc_qabstractitemmodel.cpp:196
#48 0x0000003eeb37cfde in QAbstractItemModel::endInsertRows (this=0x1920d60) at kernel/qabstractitemmodel.cpp:2433
#49 0x0000003eeb398cf8 in QMetaObject::activate (sender=sender@entry=0x16449c0, m=m@entry=0x3eeb6e85c0 <QAbstractItemModel::staticMetaObject>, local_signal_index=local_signal_index@entry=5, argv=argv@entry=0x7fffb2af2700) at kernel/qobject.cpp:3547
#50 0x0000003eeb3e56b4 in QAbstractItemModel::rowsInserted (this=this@entry=0x16449c0, _t1=..., _t2=0, _t3=0) at .moc/release-shared/moc_qabstractitemmodel.cpp:196
#51 0x0000003eeb37cfde in QAbstractItemModel::endInsertRows (this=0x16449c0) at kernel/qabstractitemmodel.cpp:2433
#52 0x0000003eed56cb09 in QSortFilterProxyModelPrivate::insert_source_items (this=this@entry=0x16427e0, source_to_proxy=..., proxy_to_source=..., source_items=..., source_parent=..., orient=orient@entry=Qt::Vertical, emit_signal=emit_signal@entry=true) at itemviews/qsortfilterproxymodel.cpp:695
#53 0x0000003eed57038a in QSortFilterProxyModelPrivate::source_items_inserted (this=this@entry=0x16427e0, source_parent=..., start=<optimized out>, end=<optimized out>, orient=orient@entry=Qt::Vertical) at itemviews/qsortfilterproxymodel.cpp:806
#54 0x0000003eed5705bf in QSortFilterProxyModelPrivate::_q_sourceRowsInserted (this=0x16427e0, source_parent=..., start=<optimized out>, end=<optimized out>) at itemviews/qsortfilterproxymodel.cpp:1297
#55 0x0000003eeb398cf8 in QMetaObject::activate (sender=sender@entry=0x1597280, m=m@entry=0x3eeb6e85c0 <QAbstractItemModel::staticMetaObject>, local_signal_index=local_signal_index@entry=5, argv=argv@entry=0x7fffb2af2a60) at kernel/qobject.cpp:3547
#56 0x0000003eeb3e56b4 in QAbstractItemModel::rowsInserted (this=this@entry=0x1597280, _t1=..., _t2=0, _t3=0) at .moc/release-shared/moc_qabstractitemmodel.cpp:196
#57 0x0000003eeb37cfde in QAbstractItemModel::endInsertRows (this=this@entry=0x1597280) at kernel/qabstractitemmodel.cpp:2433
#58 0x0000003fa0e1015f in KPeople::PersonsModel::addPerson (this=this@entry=0x1597280, mc=...) at /usr/src/debug/libkpeople-0.2.1/src/personsmodel.cpp:342
#59 0x0000003fa0e10957 in KPeople::PersonsModel::onContactsFetched (this=0x1597280) at /usr/src/debug/libkpeople-0.2.1/src/personsmodel.cpp:205
#60 0x0000003fa0e10e4d in KPeople::PersonsModel::onMonitorInitialFetchComplete (this=0x1597280) at /usr/src/debug/libkpeople-0.2.1/src/personsmodel.cpp:170
#61 0x0000003eeb398cf8 in QMetaObject::activate (sender=sender@entry=0x1592c80, m=m@entry=0x3fa101ea40 <KPeople::AllContactsMonitor::staticMetaObject>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x0) at kernel/qobject.cpp:3547
#62 0x0000003fa0e19523 in KPeople::AllContactsMonitor::initialFetchComplete (this=this@entry=0x1592c80) at /usr/src/debug/libkpeople-0.2.1/x86_64-redhat-linux-gnu/src/allcontactsmonitor.moc:133
#63 0x0000003fa0e1953c in KPeople::AllContactsMonitor::emitInitialFetchComplete (this=this@entry=0x1592c80) at /usr/src/debug/libkpeople-0.2.1/src/allcontactsmonitor.cpp:64
#64 0x00007fd7ee4cfa58 in AkonadiAllContacts::onCollectionsFetched (this=0x1592c80, job=<optimized out>) at /usr/src/debug/libkpeople-0.2.1/src/plugins/akonadi/akonadidatasource.cpp:157
#65 0x0000003eeb398cf8 in QMetaObject::activate (sender=0x15daac0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fffb2af3040) at kernel/qobject.cpp:3547
#66 0x0000003eec53987f in KJob::finished(KJob*) () from /lib64/libkdecore.so.5
#67 0x0000003eec539b15 in KJob::emitResult() () from /lib64/libkdecore.so.5
#68 0x0000003eec539bbd in KJob::kill(KJob::KillVerbosity) () from /lib64/libkdecore.so.5
#69 0x0000003ef578448c in Akonadi::Session::clear (this=this@entry=0x1589830) at /usr/src/debug/kdepimlibs-4.12.3/akonadi/session.cpp:454
#70 0x0000003ef57845fc in Akonadi::Session::~Session (this=0x1589830, __in_chrg=<optimized out>) at /usr/src/debug/kdepimlibs-4.12.3/akonadi/session.cpp:418
#71 0x0000003ef5784639 in Akonadi::Session::~Session (this=0x1589830, __in_chrg=<optimized out>) at /usr/src/debug/kdepimlibs-4.12.3/akonadi/session.cpp:420
#72 0x0000003eeb27a41a in QThreadStorageData::finish (p=0x1366648) at thread/qthreadstorage.cpp:203
#73 0x0000003eeb387071 in QCoreApplicationPrivate::~QCoreApplicationPrivate (this=0x13c95d0, __in_chrg=<optimized out>) at kernel/qcoreapplication.cpp:473
#74 0x0000003eecfca159 in QApplicationPrivate::~QApplicationPrivate (this=0x13c95d0, __in_chrg=<optimized out>) at kernel/qapplication.cpp:226
#75 0x0000003eeb39dda5 in cleanup (pointer=<optimized out>) at ../../src/corelib/tools/qscopedpointer.h:62
#76 ~QScopedPointer (this=0x7fffb2af3378, __in_chrg=<optimized out>) at ../../src/corelib/tools/qscopedpointer.h:100
#77 QObject::~QObject (this=0x7fffb2af3370, __in_chrg=<optimized out>) at kernel/qobject.cpp:816
#78 0x0000003eecfcbfb9 in QApplication::~QApplication (this=0x7fffb2af3370, __in_chrg=<optimized out>) at kernel/qapplication.cpp:1098
#79 0x000000000041d925 in ~ContactListApplication (this=0x7fffb2af3370, __in_chrg=<optimized out>) at /usr/src/debug/ktp-contact-list-0.8.0/contact-list-application.h:26
#80 main (argc=1, argv=0x7fffb2af34b8) at /usr/src/debug/ktp-contact-list-0.8.0/main.cpp:53

Reported using DrKonqi
Comment 1 David Edmundson 2014-03-26 17:28:05 UTC
#79 0x000000000041d925 in ~ContactListApplication (this=0x7fffb2af3370, __in_chrg=<optimized out>) at /usr/src/debug/ktp-contact-list-0.8.0/contact-list-application.h:26


This appears to be a crash on closing the application, is that correct?
Comment 2 Smittie 2014-03-26 17:36:26 UTC
The crash occurs on system shutdown, so yes on closing the application. However, some related condition exists for the entire time the system is running. KDE IM Contacts never works.
Comment 3 Smittie 2014-03-26 17:40:25 UTC
If I close the KDE IM Contacts window using the (x) button, the window will never re-open. I see the spinning arrows in the system bar but it eventually quits without opening.
Comment 4 David Edmundson 2014-03-26 21:56:50 UTC
Looking at the backtrace:
 - Akonadi's job to load contacts never finishes
 - we don't show contacts because we're waiting 
 - when you kill the app, that kills the akonadi job
 - we then think "oh, I have all the contacts now, I'll process everything" 
 - the crash is a byproduce of that, we don't expect to be processing things like that during shutdown.
Comment 5 David Edmundson 2014-03-26 21:57:04 UTC
Looking at the backtrace:
 - Akonadi's job to load contacts never finishes
 - we don't show contacts because we're waiting 
 - when you kill the app, that kills the akonadi job
 - we then think "oh, I have all the contacts now, I'll process everything" 
 - the crash is a byproduct of that, we don't expect to be processing things like that during shutdown.
Comment 6 Daniel Vrátil 2014-03-26 22:08:07 UTC
Smittie, do you have Google Contacts or Facebook resource added in Akonadi?

Please start Akonadi Console, enable Job Tracker and Debugger tabs, start the Contact List and then provide output from both tabs (paste output from the "All" tab in Browser and make a screenshot of the Job Tracker tab, we don't have any other way to export the data in 4.12 unfortunately).
Comment 7 Smittie 2014-03-26 22:21:42 UTC
Well then, maybe this is the problem:

Akonadi Server Self-Test Report
===============================

Test 1:  SUCCESS
--------

Database driver found.
Details: The QtSQL driver 'QMYSQL' is required by your current Akonadi server configuration and was found on your system.

File content of '/home/smittie/.config/akonadi/akonadiserverrc':
[%General]
Driver=QMYSQL

[QMYSQL]
Name=akonadi
Host=
Options="UNIX_SOCKET=/tmp/akonadi-smittie.GszaRn/mysql.socket"
ServerPath=/usr/libexec/mysqld
StartServer=false

[Debug]
Tracer=null


Test 2:  SUCCESS
--------

Akonadi is not running as root
Details: Akonadi is not running as a root/administrator user, which is the recommended setup for a secure system.

Test 3:  SKIP
--------

MySQL server executable not tested.
Details: The current configuration does not require an internal MySQL server.

Test 4:  SKIP
--------

MySQL server error log not tested.
Details: The current configuration does not require an internal MySQL server.

Test 5:  SKIP
--------

MySQL server configuration not tested.
Details: The current configuration does not require an internal MySQL server.

Test 6:  SUCCESS
--------

akonadictl found and usable
Details: The program '/usr/bin/akonadictl' to control the Akonadi server was found and could be executed successfully.
Result:
Akonadi 1.11.0


Test 7:  ERROR
--------

Akonadi control process not registered at D-Bus.
Details: The Akonadi control process is not registered at D-Bus which typically means it was not started or encountered a fatal error during startup.

Test 8:  ERROR
--------

Akonadi server process not registered at D-Bus.
Details: The Akonadi server process is not registered at D-Bus which typically means it was not started or encountered a fatal error during startup.

Test 9:  SUCCESS
--------

Nepomuk search service registered at D-Bus.
Details: The Nepomuk search service is registered at D-Bus which typically indicates it is operational.

Test 10:  SUCCESS
--------

Nepomuk search service uses an appropriate backend. 
Details: The Nepomuk search service uses one of the recommended backends.

Test 11:  SKIP
--------

Protocol version check not possible.
Details: Without a connection to the server it is not possible to check if the protocol version meets the requirements.

Test 12:  ERROR
--------

No resource agents found.
Details: No resource agents have been found, Akonadi is not usable without at least one. This usually means that no resource agents are installed or that there is a setup problem. The following paths have been searched: '/usr/share/akonadi/agents'. The XDG_DATA_DIRS environment variable is set to '/usr/share:/usr/share/kde-settings/kde-profile/default/share:/usr/local/share:/usr/share'; make sure this includes all paths where Akonadi agents are installed.

Directory listing of '/usr/share/akonadi/agents':
akonadinepomukfeederagent.desktop
akonotesresource.desktop
archivemailagent.desktop
birthdaysresource.desktop
contactsresource.desktop
davgroupwareresource.desktop
facebookresource.desktop
folderarchiveagent.desktop
googlecalendarresource.desktop
googlecontactsresource.desktop
icaldirresource.desktop
icalresource.desktop
imapresource.desktop
invitationsagent.desktop
kabcresource.desktop
kalarmdirresource.desktop
kalarmresource.desktop
kcalresource.desktop
kdeaccountsresource.desktop
kolabproxyresource.desktop
localbookmarksresource.desktop
maildirresource.desktop
maildispatcheragent.desktop
mailfilteragent.desktop
mboxresource.desktop
microblog.desktop
migrationagent.desktop
mixedmaildirresource.desktop
mtdummyresource.desktop
nepomuktagresource.desktop
newmailnotifieragent.desktop
nntpresource.desktop
notesresource.desktop
openxchangeresource.desktop
pop3resource.desktop
sendlateragent.desktop
vcarddirresource.desktop
vcardresource.desktop

Environment variable XDG_DATA_DIRS is set to '/usr/share:/usr/share/kde-settings/kde-profile/default/share:/usr/local/share:/usr/share'

Test 13:  ERROR
--------

Current Akonadi server error log found.
Details: The Akonadi server reported errors during its current startup. The log can be found in <a href='/home/smittie/.local/share/akonadi/akonadiserver.error'>/home/smittie/.local/share/akonadi/akonadiserver.error</a>.

File content of '/home/smittie/.local/share/akonadi/akonadiserver.error':
Database error: Cannot open database. 
  Last driver error: "QMYSQL: Unable to connect" 
  Last database error: "Can't connect to local MySQL server through socket '/tmp/akonadi-smittie.GszaRn/mysql.socket' (2)" 
Unable to open database "Can't connect to local MySQL server through socket '/tmp/akonadi-smittie.GszaRn/mysql.socket' (2) QMYSQL: Unable to connect" 
"[
0: akonadiserver(_Z11akBacktracev+0x4a) [0x454a2a]
1: akonadiserver() [0x454ca2]
2: /lib64/libc.so.6() [0x328f235cb0]
3: /lib64/libc.so.6(gsignal+0x39) [0x328f235c39]
4: /lib64/libc.so.6(abort+0x148) [0x328f237348]
5: /lib64/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x84) [0x3eeb271a44]
6: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0xad) [0x45697d]
7: /lib64/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0xb0) [0x3eeb310c60]
8: /lib64/libQtCore.so.4() [0x3eeb31e5f5]
9: /lib64/libQtCore.so.4(_ZN11QTextStreamD1Ev+0x31) [0x3eeb3277c1]
10: akonadiserver(_ZN7Akonadi13AkonadiServer4initEv+0x508) [0x459648]
11: /lib64/libQtCore.so.4(_ZN7QObject5eventEP6QEvent+0x26e) [0x3eeb39d27e]
12: /lib64/libQtCore.so.4(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x8d) [0x3eeb38439d]
13: /lib64/libQtCore.so.4(_ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData+0x205) [0x3eeb387485]
14: /lib64/libQtCore.so.4() [0x3eeb3b3623]
15: /lib64/libglib-2.0.so.0(g_main_context_dispatch+0x166) [0x3291a492a6]
16: /lib64/libglib-2.0.so.0() [0x3291a49628]
17: /lib64/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x3291a496dc]
18: /lib64/libQtCore.so.4(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x65) [0x3eeb3b2ea5]
19: /lib64/libQtCore.so.4(_ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE+0x3f) [0x3eeb382edf]
20: /lib64/libQtCore.so.4(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0x19d) [0x3eeb38322d]
21: /lib64/libQtCore.so.4(_ZN16QCoreApplication4execEv+0x99) [0x3eeb388749]
22: akonadiserver(main+0x263) [0x44f033]
23: /lib64/libc.so.6(__libc_start_main+0xf5) [0x328f221d65]
24: akonadiserver() [0x44f859]
]
" 


Test 14:  ERROR
--------

Previous Akonadi server error log found.
Details: The Akonadi server reported errors during its previous startup. The log can be found in <a href='/home/smittie/.local/share/akonadi/akonadiserver.error.old'>/home/smittie/.local/share/akonadi/akonadiserver.error.old</a>.

File content of '/home/smittie/.local/share/akonadi/akonadiserver.error.old':
Database error: Cannot open database. 
  Last driver error: "QMYSQL: Unable to connect" 
  Last database error: "Can't connect to local MySQL server through socket '/tmp/akonadi-smittie.GszaRn/mysql.socket' (2)" 
Unable to open database "Can't connect to local MySQL server through socket '/tmp/akonadi-smittie.GszaRn/mysql.socket' (2) QMYSQL: Unable to connect" 
"[
0: akonadiserver(_Z11akBacktracev+0x4a) [0x454a2a]
1: akonadiserver() [0x454ca2]
2: /lib64/libc.so.6() [0x328f235cb0]
3: /lib64/libc.so.6(gsignal+0x39) [0x328f235c39]
4: /lib64/libc.so.6(abort+0x148) [0x328f237348]
5: /lib64/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x84) [0x3eeb271a44]
6: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0xad) [0x45697d]
7: /lib64/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0xb0) [0x3eeb310c60]
8: /lib64/libQtCore.so.4() [0x3eeb31e5f5]
9: /lib64/libQtCore.so.4(_ZN11QTextStreamD1Ev+0x31) [0x3eeb3277c1]
10: akonadiserver(_ZN7Akonadi13AkonadiServer4initEv+0x508) [0x459648]
11: /lib64/libQtCore.so.4(_ZN7QObject5eventEP6QEvent+0x26e) [0x3eeb39d27e]
12: /lib64/libQtCore.so.4(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x8d) [0x3eeb38439d]
13: /lib64/libQtCore.so.4(_ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData+0x205) [0x3eeb387485]
14: /lib64/libQtCore.so.4() [0x3eeb3b3623]
15: /lib64/libglib-2.0.so.0(g_main_context_dispatch+0x166) [0x3291a492a6]
16: /lib64/libglib-2.0.so.0() [0x3291a49628]
17: /lib64/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x3291a496dc]
18: /lib64/libQtCore.so.4(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x65) [0x3eeb3b2ea5]
19: /lib64/libQtCore.so.4(_ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE+0x3f) [0x3eeb382edf]
20: /lib64/libQtCore.so.4(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0x19d) [0x3eeb38322d]
21: /lib64/libQtCore.so.4(_ZN16QCoreApplication4execEv+0x99) [0x3eeb388749]
22: akonadiserver(main+0x263) [0x44f033]
23: /lib64/libc.so.6(__libc_start_main+0xf5) [0x328f221d65]
24: akonadiserver() [0x44f859]
]
" 


Test 15:  SUCCESS
--------

No current Akonadi control error log found.
Details: The Akonadi control process did not report any errors during its current startup.

Test 16:  SUCCESS
--------

No previous Akonadi control error log found.
Details: The Akonadi control process did not report any errors during its previous startup.
Comment 8 Smittie 2014-03-26 22:24:39 UTC
Akonadi is not able to start. My may have done something to cause that but not intentionally and I really have no idea what. Moreover, I think that there could be some better error handling to inform the user that there is a problem and maybe even donate a clue as to what to do next.
Comment 9 Smittie 2014-03-26 22:35:01 UTC
Reset Akonadi to defaults in System Settings and restarted Akonadi server. Second attempt got it started. KDE IM Contacts list now appears to work normally.

In answer to an earlier question, I do have Facebook entries in KDE IM Contacts. They appear to be working correctly now.

I still think there could be better messaging about there being a problem rather than waiting forever and crashing on shutdown. Just my opinion.
Comment 10 David Edmundson 2014-03-26 22:53:54 UTC
> I still think there could be better messaging about there being a problem rather than waiting forever and crashing on shutdown. Just my opinion.

Ideally we need to detect this and update the AkonadiAllContactsMonitor to emit "initialised()" immediately. 

Worst case I can have a timer in the ContactsModel that goes off if one of the datasources is being slow, but I don't really like that approach.
Comment 11 Smittie 2014-03-26 22:59:59 UTC
In my case, Akonadi Server was not running at all. Seems like AkonadiAllContactsMonitor should detect that. But, maybe I don't understand enough about how Akonadi works. The Akonadi self-test told me there was a problem straight away. Once I understood that the server wasn't running, it was fairly academic to resolve the issue. Entirely through the GUI.
Comment 12 Daniel Vrátil 2014-03-26 23:34:58 UTC
There's ServerManager class in kdepimlibs that can monitor and report server state. We could connect to ServerManager::stateChanged() before starting any Akonadi jobs and in case the state changes to ServerManager::Broken after the initial fetch is started, we can abort it and call initialised() manually.

However it would be much better to handle this generically in Akonadi: if a Job fails to start Akonadi server or Akonadi is in Broken state, the Job should quit immediately with an error message. This would also fix the way David reproduced behaviour described in this bug.
Comment 13 David Edmundson 2014-03-26 23:47:23 UTC
For reference, my chat log with Dan.

I have a way to reproduce it
in my kf5 env, I have a differnet KDE home

so when I run ktp-contactlist I get
ktp-contactlist(12806)/libakonadi Akonadi::SessionPrivate::socketError: Socket error occurred: "QLocalSocket::connectToServer: Invalid name" 


and then the behaviour is like reported
Comment 14 Martin Klapetek 2014-03-27 09:38:42 UTC
@Smittie
> Seems like AkonadiAllContactsMonitor should detect that

Absolutely. We however had no idea this situation can even happen, otherwise we would have handled it already :)

@Dan
> if a Job fails to start Akonadi server or Akonadi is in Broken state, the Job should quit immediately with an error message. 

+1 on that
Comment 15 David Edmundson 2014-03-27 09:50:24 UTC
Do we really need the error message? As long as we don't block waiting we don't /need/ the akonadi stuff. 

The user will just not see any akonadi merged contacts.
Comment 16 Martin Klapetek 2014-03-27 10:05:28 UTC
...and we can warn about that. That seems fine imo. And we should definitely not block.
Comment 17 Daniel Vrátil 2014-03-27 21:57:58 UTC
*** Bug 332585 has been marked as a duplicate of this bug. ***
Comment 18 Daniel Vrátil 2014-03-28 23:03:37 UTC
Git commit 6b81500cb3c7134eb06a7a93b3fbe9ff9c9fc463 by Dan Vrátil.
Committed on 28/03/2014 at 23:02.
Pushed by dvratil into branch 'master'.

Handle Akonadi::Job errors in AllContactsMonitor

This patch will check for errors from Akonadi jobs and adds bool argument to
emitInitialFetchComplete() method to say whether the initial fetch was
successful, or a Job failed.

REVIEW: 117141

M  +2    -2    src/allcontactsmonitor.cpp
M  +6    -2    src/allcontactsmonitor.h
M  +4    -4    src/personsmodel.cpp
M  +2    -2    src/personsmodel.h
M  +32   -20   src/plugins/akonadi/akonadidatasource.cpp

http://commits.kde.org/libkpeople/6b81500cb3c7134eb06a7a93b3fbe9ff9c9fc463
Comment 19 Daniel Vrátil 2014-03-29 08:54:02 UTC
The blocking problem has been fixed in Akonadi and will be available in KDE 4.13.
http://commits.kde.org/kdepimlibs/c94b74eaf747150e5f5c1a6f53f5a995569102da

Warning message about possibly incomplete contact list has been added to ktp-contact-list master and will be available in KTp 0.9.
http://commits.kde.org/telepathy-contact-list/ea3fbd1e816a62b9b31c87e90763087e6229dda8

David will push a temporary solution for the blocking problem into KTp 0.8.1.
Comment 20 whatifgodwasoneofus 2014-04-25 17:34:29 UTC
Still happening with KDE 4.13, akonadi 1.12.1 and ktp 0.8, with google contacts (no FB at all).

Thanks! :)

(manjaro linux/KDE, x86_64)
Comment 21 whatifgodwasoneofus 2014-04-27 15:36:21 UTC
I upgraded yesterday to ktp 0.8.1 and the problem is still there.
However, it's sufficient to restart the googlecontacts agent from the akonadiconsole.

> Still happening with KDE 4.13, akonadi 1.12.1 and ktp 0.8, with google
> contacts (no FB at all).
> 
> Thanks! :)
> 
> (manjaro linux/KDE, x86_64)
Comment 22 Christoph Feck 2014-05-04 16:55:34 UTC
It is supposed to be fixed with the upcoming KTP 0.9.0 release. If you still see an issue with that version, please file a new ticket.
Comment 23 David Edmundson 2014-05-04 17:01:57 UTC
It should have been fixed with libkpeople 0.2.2

mostly the libkpeople change. Can you confirm you have 0.2.2?
Comment 24 Szef 2014-05-22 10:39:09 UTC
I got libkpeople 0.2.2, ktp 0.8.1 - problem is still there
Comment 25 David Edmundson 2014-05-22 10:42:17 UTC
Do you also have KDE 4.13?
Comment 26 Szef 2014-05-22 12:07:26 UTC
Nope. KDE 4.12.5
Comment 27 David Edmundson 2014-05-22 15:42:39 UTC
Actually that still wouldn't make much sense, unless Akonadi breaks so much it blocks.

Can you paste the output from the contact list when you start it from the command line.
Please open kdebugdialog first and enable everything.
Comment 28 Szef 2014-05-23 08:20:22 UTC
0: akonadiserver(_Z11akBacktracev+0x34) [0x45de14]
1: akonadiserver() [0x45e231]
2: /lib64/libc.so.6(+0x360f0) [0x7ff2449d60f0]
3: /lib64/libc.so.6(gsignal+0x35) [0x7ff2449d6075]
4: /lib64/libc.so.6(abort+0x186) [0x7ff2449d74f6]
5: /usr/lib64/qt4/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x74) [0x7ff2464c96f4]
6: /usr/lib64/qt4/libQtCore.so.4(+0x7788d) [0x7ff2464c988d]
7: /usr/lib64/qt4/libQtCore.so.4(_Z6qFatalPKcz+0x99) [0x7ff2464c9a29]
8: akonadiserver(_ZN7Akonadi13AkonadiServer14createDatabaseEv+0x94) [0x461104]
9: akonadiserver(_ZN7Akonadi13AkonadiServer4initEv+0xd75) [0x463905]
10: /usr/lib64/qt4/libQtCore.so.4(_ZN7QObject5eventEP6QEvent+0x376) [0x7ff2465ebfb6]
11: /usr/lib64/qt4/libQtCore.so.4(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x8c) [0x7ff2465d72ec]
12: /usr/lib64/qt4/libQtCore.so.4(_ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData+0x320) [0x7ff2465da8e0]
13: /usr/lib64/qt4/libQtCore.so.4(+0x1b4783) [0x7ff246606783]
14: /usr/lib64/libglib-2.0.so.0(g_main_context_dispatch+0x135) [0x7ff2444a5615]
15: /usr/lib64/libglib-2.0.so.0(+0x4a958) [0x7ff2444a5958]
16: /usr/lib64/libglib-2.0.so.0(g_main_context_iteration+0x34) [0x7ff2444a5a14]
17: /usr/lib64/qt4/libQtCore.so.4(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x6f) [0x7ff24660691f]
18: /usr/lib64/qt4/libQtCore.so.4(_ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE+0x32) [0x7ff2465d5fa2]
19: /usr/lib64/qt4/libQtCore.so.4(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0x14d) [0x7ff2465d625d]
20: /usr/lib64/qt4/libQtCore.so.4(_ZN16QCoreApplication4execEv+0xbb) [0x7ff2465dad7b]
21: akonadiserver(main+0x1b3) [0x458ba3]
22: /lib64/libc.so.6(__libc_start_main+0xfd) [0x7ff2449c295d]
23: akonadiserver() [0x459221]
]
"
ProcessControl: Application 'akonadiserver' returned with exit code 255 (Unknown error)
QSqlDatabase: QSQLITE3 driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL3 QMYSQL
ASSERT: "database.driver()->hasFeature( QSqlDriver::LastInsertId )" in file /var/tmp/portage/app-office/akonadi-server-1.11.0/work/akonadi-1.11.0/server/src/storage/dbconfigsqlite.cpp, line 122
"[
0: akonadiserver(_Z11akBacktracev+0x34) [0x45de14]
1: akonadiserver() [0x45e231]
2: /lib64/libc.so.6(+0x360f0) [0x7f844c9830f0]
3: /lib64/libc.so.6(gsignal+0x35) [0x7f844c983075]
4: /lib64/libc.so.6(abort+0x186) [0x7f844c9844f6]
5: /usr/lib64/qt4/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x74) [0x7f844e4766f4]
6: /usr/lib64/qt4/libQtCore.so.4(+0x7788d) [0x7f844e47688d]
7: /usr/lib64/qt4/libQtCore.so.4(_Z6qFatalPKcz+0x99) [0x7f844e476a29]
8: akonadiserver(_ZN7Akonadi13AkonadiServer14createDatabaseEv+0x94) [0x461104]
9: akonadiserver(_ZN7Akonadi13AkonadiServer4initEv+0xd75) [0x463905]
10: /usr/lib64/qt4/libQtCore.so.4(_ZN7QObject5eventEP6QEvent+0x376) [0x7f844e598fb6]
11: /usr/lib64/qt4/libQtCore.so.4(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x8c) [0x7f844e5842ec]
12: /usr/lib64/qt4/libQtCore.so.4(_ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData+0x320) [0x7f844e5878e0]
13: /usr/lib64/qt4/libQtCore.so.4(+0x1b4783) [0x7f844e5b3783]
14: /usr/lib64/libglib-2.0.so.0(g_main_context_dispatch+0x135) [0x7f844c452615]
15: /usr/lib64/libglib-2.0.so.0(+0x4a958) [0x7f844c452958]
16: /usr/lib64/libglib-2.0.so.0(g_main_context_iteration+0x34) [0x7f844c452a14]
17: /usr/lib64/qt4/libQtCore.so.4(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x6f) [0x7f844e5b391f]
18: /usr/lib64/qt4/libQtCore.so.4(_ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE+0x32) [0x7f844e582fa2]
19: /usr/lib64/qt4/libQtCore.so.4(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0x14d) [0x7f844e58325d]
20: /usr/lib64/qt4/libQtCore.so.4(_ZN16QCoreApplication4execEv+0xbb) [0x7f844e587d7b]
21: akonadiserver(main+0x1b3) [0x458ba3]
22: /lib64/libc.so.6(__libc_start_main+0xfd) [0x7f844c96f95d]
23: akonadiserver() [0x459221]
]
"
ProcessControl: Application 'akonadiserver' returned with exit code 255 (Unknown error)
QSqlDatabase: QSQLITE3 driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL3 QMYSQL
ASSERT: "database.driver()->hasFeature( QSqlDriver::LastInsertId )" in file /var/tmp/portage/app-office/akonadi-server-1.11.0/work/akonadi-1.11.0/server/src/storage/dbconfigsqlite.cpp, line 122
"[
0: akonadiserver(_Z11akBacktracev+0x34) [0x45de14]
1: akonadiserver() [0x45e231]
2: /lib64/libc.so.6(+0x360f0) [0x7f72040710f0]
3: /lib64/libc.so.6(gsignal+0x35) [0x7f7204071075]
4: /lib64/libc.so.6(abort+0x186) [0x7f72040724f6]
5: /usr/lib64/qt4/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x74) [0x7f7205b646f4]
6: /usr/lib64/qt4/libQtCore.so.4(+0x7788d) [0x7f7205b6488d]
7: /usr/lib64/qt4/libQtCore.so.4(_Z6qFatalPKcz+0x99) [0x7f7205b64a29]
8: akonadiserver(_ZN7Akonadi13AkonadiServer14createDatabaseEv+0x94) [0x461104]
9: akonadiserver(_ZN7Akonadi13AkonadiServer4initEv+0xd75) [0x463905]
10: /usr/lib64/qt4/libQtCore.so.4(_ZN7QObject5eventEP6QEvent+0x376) [0x7f7205c86fb6]
11: /usr/lib64/qt4/libQtCore.so.4(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x8c) [0x7f7205c722ec]
12: /usr/lib64/qt4/libQtCore.so.4(_ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData+0x320) [0x7f7205c758e0]
13: /usr/lib64/qt4/libQtCore.so.4(+0x1b4783) [0x7f7205ca1783]
14: /usr/lib64/libglib-2.0.so.0(g_main_context_dispatch+0x135) [0x7f7203b40615]
15: /usr/lib64/libglib-2.0.so.0(+0x4a958) [0x7f7203b40958]
16: /usr/lib64/libglib-2.0.so.0(g_main_context_iteration+0x34) [0x7f7203b40a14]
17: /usr/lib64/qt4/libQtCore.so.4(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x6f) [0x7f7205ca191f]
18: /usr/lib64/qt4/libQtCore.so.4(_ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE+0x32) [0x7f7205c70fa2]
19: /usr/lib64/qt4/libQtCore.so.4(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0x14d) [0x7f7205c7125d]
20: /usr/lib64/qt4/libQtCore.so.4(_ZN16QCoreApplication4execEv+0xbb) [0x7f7205c75d7b]
21: akonadiserver(main+0x1b3) [0x458ba3]
22: /lib64/libc.so.6(__libc_start_main+0xfd) [0x7f720405d95d]
23: akonadiserver() [0x459221]
]
"
ProcessControl: Application 'akonadiserver' returned with exit code 255 (Unknown error)
"akonadiserver" crashed too often and will not be restarted! 
ktp-contactlist(9467) KTpAllContacts::onAccountManagerReady: Account manager ready
ktp-contactlist(9467) KPixmapSequence::Private::loadSequence: Invalid framesize. 
ktp-contactlist(9467) KPixmapSequence::Private::loadSequence: Invalid framesize. 
ktp-contactlist(9467) KTp::GlobalPresence::onCurrentPresenceChanged: Current presence changed
ktp-contactlist(9467) KTp::GlobalPresence::onCurrentPresenceChanged: Current presence changed
ktp-contactlist(9467) KTp::LogManager::Private::loadPlugins: loaded factory : KPluginFactory(0x9ec230)
ktp-contactlist(9467) KTp::LogManager::Private::loadPlugins: loaded logger plugin :  TpLoggerPlugin(0x88cf70)
tp-qt4-tpl DEBUG:  static Tpl::Utils* Tpl::Utils::instance()  :  Created Utils instance
Comment 29 Szef 2014-05-23 08:21:44 UTC
2 more strings to previous output:

Akonadi failed to load, some metacontact features may not be available 
For more information please load akonadi_console