This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Akonadi locks up system

Tags: None
(comma "," separated)
nathanaelculver
Registered Member
Posts
12
Karma
0
OS

Akonadi locks up system

Sun Jan 30, 2011 3:56 am
I decided to give Kontact and its associated apps a few days ago and got all kinds of kinds of bad from akonadi. After logging in, the whole system locks up for a half hour; if akonadi is started manually or by launching kmail, it can lock up for up to an hour and a half.

While initially, the self-test was reporting mysql errors, sometime after updating to KDE 4.6 yesterday those went away. Now I'm getting errors at Step 12: Nepomuk search service not registered at D-Bus.

I'd really like to try Kontact, but it is (quite obviously) at this point unusable. And I'm afraid I'm sympathetic with many other here: I don't use Nepomunk, I don't much care for it, and I'm really not sure I want it running just to shave a few milliseconds off my email searches.

Here's my akonadiserverrcc:

Code: Select all
[QMYSQL]
Name=akonadi
Host=
Options="UNIX_SOCKET=/home/nathanael/.local/share/akonadi/socket-nathanael-laptop/mysql.socket"
ServerPath=/usr/sbin/mysqld-akonadi
StartServer=true

[Debug]
Tracer=null

[%General]
Driver=QMYSQL


And the self-test:

Code: Select all
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/nathanael/.config/akonadi/akonadiserverrc':
[QMYSQL]
Name=akonadi
Host=
Options="UNIX_SOCKET=/home/nathanael/.local/share/akonadi/socket-nathanael-laptop/mysql.socket"
ServerPath=/usr/sbin/mysqld-akonadi
StartServer=true

[Debug]
Tracer=null

[%General]
Driver=QMYSQL


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/sbin/mysqld-akonadi'.
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 server executable is typically called 'mysqld'; its location varies depending on the distribution.

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

MySQL server is executable.
Details: MySQL server found: /usr/sbin/mysqld-akonadi  Ver 5.1.49-1ubuntu8.1 for debian-linux-gnu on x86_64 ((Ubuntu))


Test 5:  SUCCESS
--------

MySQL server log contains no errors.
Details: The MySQL server log file &apos;<a href='/home/nathanael/.local/share/akonadi/db_data/mysql.err'>/home/nathanael/.local/share/akonadi/db_data/mysql.err</a>&apos; does not contain any errors or warnings.

File content of '/home/nathanael/.local/share/akonadi/db_data/mysql.err':
110129 20:36:41 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
110129 20:36:41  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
110129 20:36:43  InnoDB: Started; log sequence number 0 199831
110129 20:36:43 [Note] /usr/sbin/mysqld-akonadi: ready for connections.
Version: '5.1.49-1ubuntu8.1'  socket: '/home/nathanael/.local/share/akonadi/socket-nathanael-laptop/mysql.socket'  port: 0  (Ubuntu)


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

MySQL server default configuration found.
Details: The default configuration for the MySQL server was found and is readable at <a href='/etc/akonadi/mysql-global.conf'>/etc/akonadi/mysql-global.conf</a>.

File content of '/etc/akonadi/mysql-global.conf':
#
# Global Akonadi MySQL server settings,
# These settings can be adjusted using $HOME/.config/akonadi/mysql-local.conf
#
# Based on advice by Kris Köhntopp <kris@mysql.com>
#
[mysqld]
skip_grant_tables
skip_networking

# strict query parsing/interpretation
# TODO: make Akonadi work with those settings enabled
#sql_mode=strict_trans_tables,strict_all_tables,strict_error_for_division_by_zero,no_auto_create_user,no_auto_value_on_zero,no_engine_substitution,no_zero_date,no_zero_in_date,only_full_group_by,pipes_as_concat
#sql_mode=strict_trans_tables

# use InnoDB for transactions and better crash recovery
default_storage_engine=innodb
# case-insensitive table names, avoids trouble on windows
lower_case_table_names=1
character_set_server=utf8
collation_server=utf8_general_ci
table_cache=200
thread_cache_size=3
#log_bin=mysql-bin
#expire_logs_days=3
#sync_bin_log=0
# error log file name, relative to datadir
log_error=mysql.err
log_warnings=2
# log all queries, useful for debugging but generates an enormous amount of data
#log=mysql.full
# log queries slower than n seconds, log file name relative to datadir (for debugging only)
#log_slow_queries=mysql.slow
#long_query_time=1
# log queries not using indices, debug only, disable for production use
#log_queries_not_using_indexes=1
# maximum blob size
max_allowed_packet=32M
max_connections=256
# makes sense when having the same query multiple times
# makes no sense with prepared statements and/or transactions
query_cache_type=0
query_cache_size=0

innodb_file_per_table=1
innodb_log_buffer_size=1M
innodb_additional_mem_pool_size=1M
# messure database size and adjust
# SELECT sum(data_length) as bla, sum(index_length) as blub FROM information_schema.tables WHERE table_schema not in ("mysql", "information_schema");
innodb_buffer_pool_size=80M
# size of average write burst, keep Innob_log_waits small, keep Innodb_buffer_pool_wait_free small (see show global status like "inno%", show global variables)
innodb_log_file_size=64M
innodb_flush_log_at_trx_commit=2

# Do not drop the connection to the DB after 8 hours of inactivity
wait_timeout=1296000

[client]
default-character-set=utf8


Test 7:  SKIP
--------

MySQL server custom configuration not available.
Details: The custom configuration for the MySQL server was not found but is optional.

Test 8:  SUCCESS
--------

MySQL server configuration is usable.
Details: The MySQL server configuration was found at <a href='/home/nathanael/.local/share/akonadi/mysql.conf'>/home/nathanael/.local/share/akonadi/mysql.conf</a> and is readable.

File content of '/home/nathanael/.local/share/akonadi/mysql.conf':
#
# Global Akonadi MySQL server settings,
# These settings can be adjusted using $HOME/.config/akonadi/mysql-local.conf
#
# Based on advice by Kris Köhntopp <kris@mysql.com>
#
[mysqld]
skip_grant_tables
skip_networking

# strict query parsing/interpretation
# TODO: make Akonadi work with those settings enabled
#sql_mode=strict_trans_tables,strict_all_tables,strict_error_for_division_by_zero,no_auto_create_user,no_auto_value_on_zero,no_engine_substitution,no_zero_date,no_zero_in_date,only_full_group_by,pipes_as_concat
#sql_mode=strict_trans_tables

# use InnoDB for transactions and better crash recovery
default_storage_engine=innodb
# case-insensitive table names, avoids trouble on windows
lower_case_table_names=1
character_set_server=utf8
collation_server=utf8_general_ci
table_cache=200
thread_cache_size=3
#log_bin=mysql-bin
#expire_logs_days=3
#sync_bin_log=0
# error log file name, relative to datadir
log_error=mysql.err
log_warnings=2
# log all queries, useful for debugging but generates an enormous amount of data
#log=mysql.full
# log queries slower than n seconds, log file name relative to datadir (for debugging only)
#log_slow_queries=mysql.slow
#long_query_time=1
# log queries not using indices, debug only, disable for production use
#log_queries_not_using_indexes=1
# maximum blob size
max_allowed_packet=32M
max_connections=256
# makes sense when having the same query multiple times
# makes no sense with prepared statements and/or transactions
query_cache_type=0
query_cache_size=0

innodb_file_per_table=1
innodb_log_buffer_size=1M
innodb_additional_mem_pool_size=1M
# messure database size and adjust
# SELECT sum(data_length) as bla, sum(index_length) as blub FROM information_schema.tables WHERE table_schema not in ("mysql", "information_schema");
innodb_buffer_pool_size=80M
# size of average write burst, keep Innob_log_waits small, keep Innodb_buffer_pool_wait_free small (see show global status like "inno%", show global variables)
innodb_log_file_size=64M
innodb_flush_log_at_trx_commit=2

# Do not drop the connection to the DB after 8 hours of inactivity
wait_timeout=1296000

[client]
default-character-set=utf8


Test 9:  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.4.90


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

Akonadi control process registered at D-Bus.
Details: The Akonadi control process is registered at D-Bus which typically indicates it is operational.

Test 11:  SUCCESS
--------

Akonadi server process registered at D-Bus.
Details: The Akonadi server process is registered at D-Bus which typically indicates it is operational.

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

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

Test 13:  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 14:  SUCCESS
--------

Resource agents found.
Details: At least one resource agent has been found.

Directory listing of '/usr/share/akonadi/agents':
birthdaysresource.desktop
contactsresource.desktop
icalresource.desktop
imapresource.desktop
kabcresource.desktop
kcalresource.desktop
knutresource.desktop
kolabproxyresource.desktop
localbookmarksresource.desktop
maildirresource.desktop
maildispatcheragent.desktop
mboxresource.desktop
microblog.desktop
mtdummyresource.desktop
nepomukcalendarfeeder.desktop
nepomukcontactfeeder.desktop
nepomuktagresource.desktop
nntpresource.desktop
notesresource.desktop
pop3resource.desktop
vcarddirresource.desktop
vcardresource.desktop
Directory listing of '/usr/share/akonadi/agents':
birthdaysresource.desktop
contactsresource.desktop
icalresource.desktop
imapresource.desktop
kabcresource.desktop
kcalresource.desktop
knutresource.desktop
kolabproxyresource.desktop
localbookmarksresource.desktop
maildirresource.desktop
maildispatcheragent.desktop
mboxresource.desktop
microblog.desktop
mtdummyresource.desktop
nepomukcalendarfeeder.desktop
nepomukcontactfeeder.desktop
nepomuktagresource.desktop
nntpresource.desktop
notesresource.desktop
pop3resource.desktop
vcarddirresource.desktop
vcardresource.desktop

Environment variable XDG_DATA_DIRS is set to '/usr/share:/usr/share:/usr/local/share'

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

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

Test 16:  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/nathanael/.local/share/akonadi/akonadiserver.error.old'>/home/nathanael/.local/share/akonadi/akonadiserver.error.old</a>.

File content of '/home/nathanael/.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 '/home/nathanael/.local/share/akonadi/socket-nathanael-laptop/mysql.socket' (2)"
Unable to open database "Can't connect to local MySQL server through socket '/home/nathanael/.local/share/akonadi/socket-nathanael-laptop/mysql.socket' (2) QMYSQL: Unable to connect"
"[
0: akonadiserver(_Z11akBacktracev+0x39) [0x447149]
1: akonadiserver() [0x44769a]
2: /lib/libc.so.6(+0x33c20) [0x7fba429d4c20]
3: /lib/libc.so.6(gsignal+0x35) [0x7fba429d4ba5]
4: /lib/libc.so.6(abort+0x180) [0x7fba429d86b0]
5: /usr/lib/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x74) [0x7fba44667864]
6: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0xa8) [0x448788]
7: /usr/lib/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0x77) [0x7fba446f94a7]
8: /usr/lib/libQtCore.so.4(+0x10ba59) [0x7fba44706a59]
9: /usr/lib/libQtCore.so.4(_ZN11QTextStreamD1Ev+0x39) [0x7fba44707c69]
10: akonadiserver(_ZN7Akonadi13AkonadiServerC1EP7QObject+0x535) [0x44a105]
11: akonadiserver(_ZN7Akonadi13AkonadiServer8instanceEv+0x4a) [0x44b31a]
12: akonadiserver(main+0x414) [0x441f94]
13: /lib/libc.so.6(__libc_start_main+0xfe) [0x7fba429bfd8e]
14: akonadiserver() [0x441a89]
]
"


Test 17:  ERROR
--------

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

File content of '/home/nathanael/.local/share/akonadi/akonadi_control.error':
void AgentManager::readPluginInfos(const QDir&) Duplicated agent identifier "akonadi_birthdays_resource" from file "/usr/share/akonadi/agents/birthdaysresource.desktop"
void AgentManager::readPluginInfos(const QDir&) Duplicated agent identifier "akonadi_contacts_resource" from file "/usr/share/akonadi/agents/contactsresource.desktop"
void AgentManager::readPluginInfos(const QDir&) Duplicated agent identifier "akonadi_ical_resource" from file "/usr/share/akonadi/agents/icalresource.desktop"
void AgentManager::readPluginInfos(const QDir&) Duplicated agent identifier "akonadi_imap_resource" from file "/usr/share/akonadi/agents/imapresource.desktop"
void AgentManager::readPluginInfos(const QDir&) Duplicated agent identifier "akonadi_kabc_resource" from file "/usr/share/akonadi/agents/kabcresource.desktop"
void AgentManager::readPluginInfos(const QDir&) Duplicated agent identifier "akonadi_kcal_resource" from file "/usr/share/akonadi/agents/kcalresource.desktop"
void AgentManager::readPluginInfos(const QDir&) Duplicated agent identifier "akonadi_knut_resource" from file "/usr/share/akonadi/agents/knutresource.desktop"
void AgentManager::readPluginInfos(const QDir&) Duplicated agent identifier "akonadi_kolabproxy_resource" from file "/usr/share/akonadi/agents/kolabproxyresource.desktop"
void AgentManager::readPluginInfos(const QDir&) Duplicated agent identifier "akonadi_localbookmarks_resource" from file "/usr/share/akonadi/agents/localbookmarksresource.desktop"
void AgentManager::readPluginInfos(const QDir&) Duplicated agent identifier "akonadi_maildir_resource" from file "/usr/share/akonadi/agents/maildirresource.desktop"
void AgentManager::readPluginInfos(const QDir&) Duplicated agent identifier "akonadi_maildispatcher_agent" from file "/usr/share/akonadi/agents/maildispatcheragent.desktop"
void AgentManager::readPluginInfos(const QDir&) Duplicated agent identifier "akonadi_mbox_resource" from file "/usr/share/akonadi/agents/mboxresource.desktop"
void AgentManager::readPluginInfos(const QDir&) Duplicated agent identifier "akonadi_microblog_resource" from file "/usr/share/akonadi/agents/microblog.desktop"
void AgentManager::readPluginInfos(const QDir&) Duplicated agent identifier "akonadi_mailtransport_dummy_resource" from file "/usr/share/akonadi/agents/mtdummyresource.desktop"
void AgentManager::readPluginInfos(const QDir&) Duplicated agent identifier "akonadi_nepomuk_calendar_feeder" from file "/usr/share/akonadi/agents/nepomukcalendarfeeder.desktop"
void AgentManager::readPluginInfos(const QDir&) Duplicated agent identifier "akonadi_nepomuk_contact_feeder" from file "/usr/share/akonadi/agents/nepomukcontactfeeder.desktop"
void AgentManager::readPluginInfos(const QDir&) Duplicated agent identifier "akonadi_nepomuktag_resource" from file "/usr/share/akonadi/agents/nepomuktagresource.desktop"
void AgentManager::readPluginInfos(const QDir&) Duplicated agent identifier "akonadi_nntp_resource" from file "/usr/share/akonadi/agents/nntpresource.desktop"
void AgentManager::readPluginInfos(const QDir&) Duplicated agent identifier "akonadi_notes_resource" from file "/usr/share/akonadi/agents/notesresource.desktop"
void AgentManager::readPluginInfos(const QDir&) Duplicated agent identifier "akonadi_pop3_resource" from file "/usr/share/akonadi/agents/pop3resource.desktop"
void AgentManager::readPluginInfos(const QDir&) Duplicated agent identifier "akonadi_vcarddir_resource" from file "/usr/share/akonadi/agents/vcarddirresource.desktop"
void AgentManager::readPluginInfos(const QDir&) Duplicated agent identifier "akonadi_vcard_resource" from file "/usr/share/akonadi/agents/vcardresource.desktop"


Test 18:  SUCCESS
--------

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



Any other info I need to provide?

Nathanael
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Akonadi locks up system

Sun Jan 30, 2011 7:14 am
Which version of KDE are you using?

Also, it appears that Akonadi cannot reach Nepomuk. Please ensure that Nepomuk is enabled (Strigi is not required) in System Settings > Desktop Search.

The most major error seems to be caused by Akonadi being unable to contact it's database.
Please try restarting Akonadi (by running in Konsole: "akonadictl restart")

If the error persists, please try disabling Apparmor, as it is known to interfere in the operation of non-systemwide MySQL processes.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
nathanaelculver
Registered Member
Posts
12
Karma
0
OS

Re: Akonadi locks up system

Sun Jan 30, 2011 8:54 am
bcooksley wrote:Which version of KDE are you using?


) I just updated to 4.6 yesterday. Prior to that the self-test was also falling over on MYSQL; now I'm only getting the Nepomunk problem. 2) System -> Desktop Search shows Nepomunk is both enabled and active (Strigi is also enabled, but not currently running). 3) I've attempted several times to start akonadi from the console ("akonadictl start"); each time I have to wait at least an hour to get my system back. 4) I've already reduced Apparmor to complain mode; I'll try disabling it entirely and get back with the result.

EDIT: No difference. System still locks up at login -- hard drive and CPU both maxed.

--Nathanael
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Akonadi locks up system

Sun Jan 30, 2011 9:19 am
Is it possible, using either a virtual terminal or other method to see which processes are causing the system to perform slowly? Tools such as iotop and htop should be most helpful for this.

Your Nepomuk virtuoso database may need removing.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
nathanaelculver
Registered Member
Posts
12
Karma
0
OS

Re: Akonadi locks up system

Sun Jan 30, 2011 10:54 am
bcooksley wrote:Is it possible, using either a virtual terminal or other method to see which processes are causing the system to perform slowly?


Prior to logging in I've been starting up TOP (didn't know about htop but, hey, I kinda like it) in another terminal, logging in then popping back over to watch the fireworks. Eventually the whole screen fills up with akonadi_contact tasks, with the occasional akondadi_something_else thrown in. Interestingly, aggregate total CPU usage for the twenty tasks often exceeds 200%.

How do I remove the Nepomunk database?

--Nathanael
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Akonadi locks up system

Mon Jan 31, 2011 4:38 am
That is highly unusual. Did you have an extensive number of contacts stored in Kontact prior to the Akonadi migration?

To remove the Nepomuk database, delete ~/.kde4/share/apps/nepomuk/ without being logged into KDE.
Note that htop will show threads, so it may be that the akonadi_contacts_* processes are simply highly threaded.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
nathanaelculver
Registered Member
Posts
12
Karma
0
OS

Re: Akonadi locks up system

Mon Jan 31, 2011 10:25 am
bcooksley wrote:Did you have an extensive number of contacts stored in Kontact


Nada. I've never used the KDE PIM apps. I just wanted to try them out. So far, I haven't had the chance to be impressed :-)

To remove the Nepomuk database, delete ~/.kde4/share/apps/nepomuk/ without being logged into KDE.


(In Kubuntu it's ~/.kde/....) With KDE at login, I opened a terminal and mv'ed virtuosobackend/ to virtuosebackend_backup/, then logged in. System still locks up. I didn't, however, delete the whole nepomuk/ tree. I'll give that a try.

[EDIT] OK, mv ~/.kde/share/apps/nepomuk/ ~/.kde/share/apps/nepomuk/_backup/. No joy. :-(

Oh, and I put htop in tree mode this time. Yes, all those akonadi_* are daemon spawn of akonadi_control.

--Nathanael
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Akonadi locks up system

Mon Jan 31, 2011 10:34 pm
Ok, as you have never used KDE PIM before, we can erase it's config and data safely.

Remove ~/.local/share/akonadi, ~/.config/akonadi and ~/.kde4/share/config/akonadi* outside KDE.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
nathanaelculver
Registered Member
Posts
12
Karma
0
OS

Re: Akonadi locks up system  Topic is solved

Tue Feb 01, 2011 12:10 am
bcooksley wrote:Remove ~/.local/share/akonadi, ~/.config/akonadi and ~/.kde4/share/config/akonadi* outside KDE.


Well, that seems to have done it. At least, Kmail is currently downloading my email. If I run into further problems, I'll be back. Thanks, Ben.

--Nathanael

P.S. New Zealand? I'd KILL to live in New Zealand :-)


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], watchstar, Yahoo [Bot]