Bug 310381 - Akonadi server selftest fail
Summary: Akonadi server selftest fail
Status: RESOLVED NOT A BUG
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: server (show other bugs)
Version: 4.10
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-19 21:11 UTC by Dan
Modified: 2013-12-07 08:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
The whole self-test log (31.63 KB, text/plain)
2012-11-19 21:12 UTC, Dan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan 2012-11-19 21:11:09 UTC
When starting kontact after plasma crash (see bug 309223) and computer reboot (through logout, reboot menu items), Akonadi server fails wilth the following error:

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/dtihelka/.config/akonadi/akonadiserverrc':
[%General]
Driver=QMYSQL

[QMYSQL]
Name=akonadi
Host=
Options="UNIX_SOCKET=/home/dtihelka/.local/share/akonadi/socket-uk508n02-kky/mysql.socket"
ServerPath=/usr/bin/mysqld
StartServer=true

[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:  SUCCESS
--------

MySQL server found.
Details: You have currently configured Akonadi to use the MySQL server '/usr/bin/mysqld'.
Make sure you have the MySQL server installed, set the correct path and ensure you have the necessary read and execution rights on the server executable. The s
erver executable is typically called 'mysqld'; its location varies depending on the distribution.

Test 4:  SUCCESS
--------

MySQL server is executable.
Details: MySQL server found: /usr/bin/mysqld  Ver 5.5.28-log for Linux on x86_64 (Source distribution)


Test 5:  ERROR
--------

MySQL server log contains errors.
Details: The MySQL server error log file &apos;<a href='/home/dtihelka/.local/share/akonadi/db_data/mysql.err'>/home/dtihelka/.local/share/akonadi/db_data/mysq
l.err</a>&apos; contains errors.

File content of '/home/dtihelka/.local/share/akonadi/db_data/mysql.err':
121119 21:38:43 InnoDB: The InnoDB memory heap is disabled
121119 21:38:43 InnoDB: Mutexes and rw_locks use GCC atomic builtins
121119 21:38:43 InnoDB: Compressed tables use zlib 1.2.7
121119 21:38:43 InnoDB: Initializing buffer pool, size = 80.0M
121119 21:38:43 InnoDB: Completed initialization of buffer pool
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
121119 21:38:43  InnoDB: Retrying to lock the first data file
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.

Reproducible: Didn't try




Well, I suppose that the error is more likely connected with MySQL, but I think it is related to the crash of KDE desktop, which requires the restart of KDE. It occures despite the fact that I invoked "logout" through Alt+F2 runner and choose "restart" in kdm screen then.

What to do to make kontact running again?
Comment 1 Dan 2012-11-19 21:12:07 UTC
Created attachment 75361 [details]
The whole self-test log
Comment 2 Dan 2013-01-30 16:12:20 UTC
Well, it occurred again, after previous CORRECT KDE shutdown!!??

To start kontact again, I have to delete all files and dirs in ~/.local/share/akonadi/db_data.

May I provide you some other information?

May it be connected somehow with the fact that my home is mounted using sshfs? I mean that the FS is unmounted earlier than DB finishes writing? Maybe it is nonsense, I just guessing ...
Comment 3 Dan 2013-01-30 23:05:40 UTC
I don't know if it is related to be bug, but when I close kontact (through close menu item in kontact's icon in system tray), the following crash appeared:

Application: Kontact (kontact), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fb416c5b780 (LWP 1545))]

Thread 3 (Thread 0x7fb3fc59a700 (LWP 1546)):
#0  0x00007fb40e885954 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007fb41348737d in ?? () from /usr/lib/libQtWebKit.so.4
#2  0x00007fb413487489 in ?? () from /usr/lib/libQtWebKit.so.4
#3  0x00007fb40e881e0f in start_thread () from /usr/lib/libpthread.so.0
#4  0x00007fb4141c531d in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7fb39bfff700 (LWP 2594)):
#0  0x00007fb4141bd18d in poll () from /usr/lib/libc.so.6
#1  0x00007fb40e2d1b14 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007fb40e2d1c34 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007fb41492f756 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007fb41490031f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007fb4149005a8 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007fb4148017c0 in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0x00007fb4148e0adf in ?? () from /usr/lib/libQtCore.so.4
#8  0x00007fb41480479c in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007fb40e881e0f in start_thread () from /usr/lib/libpthread.so.0
#10 0x00007fb4141c531d in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7fb416c5b780 (LWP 1545)):
[KCrash Handler]
#5  0x00007fb40ca54947 in Nepomuk::Resource::~Resource() () from /usr/lib/libnepomuk.so.4
#6  0x00007fb40ca54bf9 in Nepomuk::Resource::~Resource() () from /usr/lib/libnepomuk.so.4
#7  0x00007fb414911d1a in QMetaCallEvent::~QMetaCallEvent() () from /usr/lib/libQtCore.so.4
#8  0x00007fb414911d89 in QMetaCallEvent::~QMetaCallEvent() () from /usr/lib/libQtCore.so.4
#9  0x00007fb4149056b7 in QCoreApplication::removePostedEvents(QObject*, int) () from /usr/lib/libQtCore.so.4
#10 0x00007fb4149152fb in QObjectPrivate::~QObjectPrivate() () from /usr/lib/libQtCore.so.4
#11 0x00007fb414915369 in QObjectPrivate::~QObjectPrivate() () from /usr/lib/libQtCore.so.4
#12 0x00007fb414917b4c in QObject::~QObject() () from /usr/lib/libQtCore.so.4
#13 0x00007fb40ca5a6b9 in ?? () from /usr/lib/libnepomuk.so.4
#14 0x00007fb414913cd2 in QObjectPrivate::deleteChildren() () from /usr/lib/libQtCore.so.4
#15 0x00007fb414917b16 in QObject::~QObject() () from /usr/lib/libQtCore.so.4
#16 0x00007fb40ca48e49 in Nepomuk::ResourceManager::~ResourceManager() () from /usr/lib/libnepomuk.so.4
#17 0x00007fb414913cd2 in QObjectPrivate::deleteChildren() () from /usr/lib/libQtCore.so.4
#18 0x00007fb414917b16 in QObject::~QObject() () from /usr/lib/libQtCore.so.4
#19 0x00007fb4152f9361 in QApplication::~QApplication() () from /usr/lib/libQtGui.so.4
#20 0x000000000040345e in ?? ()
#21 0x00007fb414100725 in __libc_start_main () from /usr/lib/libc.so.6
#22 0x0000000000403951 in _start ()
Comment 4 Dan 2013-02-20 20:14:50 UTC
The same for KDE 4.10. Correct shutdown of KDE and akonadi error when jkontact is started after reboot.

There is ~/.local/share/akonadi/akonadiserver.error with content:

"
Sql error: Table 'akonadi.schemaversiontable' doesn't exist QMYSQL: Unable to execute query
Query: ALTER TABLE SchemaVersionTable ADD COLUMN version INTEGER NOT NULL DEFAULT 0"
Unable to initialize database.
"[
0: akonadiserver(_Z11akBacktracev+0x34) [0x4540e4]
1: akonadiserver() [0x454421]
2: /usr/lib/libc.so.6(+0x35340) [0x7fb94e05e340]
3: /usr/lib/libc.so.6(gsignal+0x35) [0x7fb94e05e2c5]
4: /usr/lib/libc.so.6(abort+0x148) [0x7fb94e05f748]
5: /usr/lib/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x74) [0x7fb94fb2f414]
6: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0x9b) [0x45619b]
7: /usr/lib/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0xb4) [0x7fb94fbc9b54]
8: /usr/lib/libQtCore.so.4(+0x1167ff) [0x7fb94fbd47ff]
9: /usr/lib/libQtCore.so.4(_ZN11QTextStreamD1Ev+0x3b) [0x7fb94fbdcdfb]
10: akonadiserver(_ZN7Akonadi13AkonadiServerC1EP7QObject+0x5e5) [0x4582c5]
11: akonadiserver(_ZN7Akonadi13AkonadiServer8instanceEv+0x47) [0x459477]
12: akonadiserver(main+0x1a0) [0x44d670]
13: /usr/lib/libc.so.6(__libc_start_main+0xf5) [0x7fb94e04aa15]
14: akonadiserver() [0x44de71]
]
"
Comment 5 Dan 2013-11-24 21:33:11 UTC
The same for kontact 4.11.2.

What helps to start the contact/akonadi again is this brutal force script:

#!/bin/sh

# kill kontact
while $(killall kontact); do
        echo "Killing contact"
        sleep 0.5
done
# kill mysql daemon
while $(killall mysqld); do
        echo "Killing mysqld ..."
        sleep 0.5
done

# Remove the content
rm -f *log*
rm -f ib*
rm -f *.err
rm -f akonadi/*
Comment 6 Daniel Vrátil 2013-12-06 17:20:04 UTC
> May it be connected somehow with the fact that my home is mounted using sshfs? I mean that the FS is unmounted earlier than DB finishes writing? Maybe it is nonsense, I just guessing 

This is almost definitely the cause of your problems. In general, we don't recommend running Akonadi database on a remote filesystem (also for performance reasons). The errors you were seeing were caused by corrupted or incomplete database. Please make sure the Akonadi database has been always properly shut down before unmouting the filesystem.
Comment 7 Dan 2013-12-07 08:58:29 UTC
Ehm, sorry. I wrote 'sshfs' but I meant 'encfs'. 
But well, it may the same problem? I don't know where exactly akonadi stops and when the encfs is unmounted on logoff.