[kontact] [Bug 352701] Kontact forgets how to download messages

Nick bugzilla_noreply at kde.org
Fri Sep 15 10:15:27 BST 2017


https://bugs.kde.org/show_bug.cgi?id=352701

--- Comment #4 from Nick <nick.craig.law at gmail.com> ---
This fixed it for me .. (until the next time the akonadi database gets
corrupted)

This involves removing the old akonadi database and letting akonadi construct
and reindex a new one.

First exit kmail
then as normal user
akonadi stop

mv /home/jbloggs/.local/share/akonadi /home/jbloggs/.local/share/akonadi.orig
(This is where akonadi stores it's mysql database)

akonadi start

You may get the following messages, but then nothing while it's reindexing.
akonadictl start
Connecting to deprecated signal
QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
nick at nick-X681X:~/.local/share$ /usr/bin/mysqlcheck: Got error: 1049: Unknown
database 'akonadi' when selecting the database
Connecting to deprecated signal
QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
"No file selected."
org.kde.pim.akonadicore: Failed SpecialCollectionsRequestJob::slotResult
"Failed to fetch the resource collection."
org.kde.pim.maildispatcher: Failed to get outbox folder. Retrying in:  5000
org.kde.pim.akonadicore: Failed to request resource
"akonadi_maildir_resource_0" : "Failed to fetch the resource collection."
org.kde.pim.akonadicore: Failed SpecialCollectionsRequestJob::slotResult
"Failed to fetch the resource collection."
org.kde.pim.akonadicore: Failed to request resource
"akonadi_maildir_resource_0" : "Failed to fetch the resource collection."
org.kde.akonadi.ETM: GEN true false false
org.kde.akonadi.ETM: collection: QVector()
org.kde.akonadi.ETM: 
org.kde.akonadi.ETM: Fetch job took  31 msec
org.kde.akonadi.ETM: was collection fetch job: collections: 0
org.kde.akonadi.ETM: collection: QVector()
org.kde.akonadi.ETM: Fetch job took  39 msec
org.kde.akonadi.ETM: was collection fetch job: collections: 2
org.kde.akonadi.ETM: first fetched collection: "Search"
org.kde.akonadi.ETM: Fetch job took  2 msec
org.kde.akonadi.ETM: was collection fetch job: collections: 0
org.kde.akonadi.ETM: GEN true false false
org.kde.akonadi.ETM: collection: QVector()
org.kde.akonadi.ETM: 
org.kde.akonadi.ETM: Fetch job took  39 msec
org.kde.akonadi.ETM: was collection fetch job: collections: 0
org.kde.akonadi.ETM: collection: QVector()
org.kde.akonadi.ETM: Fetch job took  42 msec
org.kde.akonadi.ETM: was collection fetch job: collections: 2
org.kde.akonadi.ETM: first fetched collection: "Search"
org.kde.akonadi.ETM: Fetch job took  1 msec
org.kde.akonadi.ETM: was collection fetch job: collections: 0
Pass a valid window to KWallet::Wallet::openWallet().
"Unable to fetch item from backend (collection -1) : Unable to retrieve item
from resource: Did not receive a reply. Possible causes include: the remote
application did not send a reply, the message bus security policy blocked the
reply, the reply timeout expired, or the network connection was broken."

To completely reindex akonadi may take a considerable time especially if you
have tens of thousands of emails. In my case it's still indexing after an hour.
However I can access my emails during this time.

looking at the process list with 'top' mysqld shows at 70-95% on my system
during this reindexing period.

If it all goes ok then remove the backup you made.
rm /home/jbloggs/.local/share/akonadi.orig

I don't use kontact or any Calendar so can't comment on what will happen to any
data you've entered in those apps however if like me you just use kmail then
this worked fine. In kmail it retained the various folders and filters I'd
created. And it now works without getting the annoying please wait retrieving
folder contents.

Because I made a backup of the original database I noticed that there were a
few mysql errors in the log, reproduced below. In particular the error that
stands out is this one (with lots of variations.. but basically native table
has the wrong structure.

[ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong
structure

more mysql.err
170915  0:46:57 [Note] InnoDB: innodb_empty_free_list_algorithm has been
changed to legacy because of small buffer pool size. In order to use backoff,
increase buffer pool at least up to 20MB.

170915  0:46:57 [Note] InnoDB: Using mutexes to ref count buffer pool pages
170915  0:46:57 [Note] InnoDB: The InnoDB memory heap is disabled
170915  0:46:57 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
170915  0:46:57 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for
memory barrier
170915  0:46:57 [Note] InnoDB: Compressed tables use zlib 1.2.8
170915  0:46:57 [Note] InnoDB: Using Linux native AIO
170915  0:46:57 [Note] InnoDB: Using CPU crc32 instructions
170915  0:46:57 [Note] InnoDB: Initializing buffer pool, size = 128.0M
170915  0:46:57 [Note] InnoDB: Completed initialization of buffer pool
170915  0:46:57 [Note] InnoDB: Highest supported file format is Barracuda.
170915  0:46:57 [Note] InnoDB: 128 rollback segment(s) are active.
170915  0:46:57 [Note] InnoDB: Waiting for purge to start
170915  0:46:58 [Note] InnoDB:  Percona XtraDB (http://www.percona.com)
5.6.36-82.0 started; log sequence number 5061252276
170915  0:46:58 [Note] Plugin 'FEEDBACK' is disabled.
170915  0:46:58 [ERROR] Can't open and lock privilege tables: Table
'mysql.servers' doesn't exist
170915  0:46:58 [Warning] Can't open and lock time zone table: Table
'mysql.time_zone_leap_second' doesn't exist trying to live without them
170915  0:46:58 [ERROR] Native table 'performance_schema'.'cond_instances' has
the wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'events_waits_current' has the wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'events_waits_history' has the wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'events_waits_history_long' has the wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'events_waits_summary_by_host_by_event_name' has the wrong
structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the
wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'events_waits_summary_by_user_by_event_name' has the wrong
structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'events_waits_summary_by_account_by_event_name' has the
wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong
structure
170915  0:46:58 [ERROR] Native table 'performance_schema'.'file_instances' has
the wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'file_summary_by_event_name' has the wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'file_summary_by_instance' has the wrong structure
170915  0:46:58 [ERROR] Native table 'performance_schema'.'host_cache' has the
wrong structure
170915  0:46:58 [ERROR] Native table 'performance_schema'.'mutex_instances' has
the wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'objects_summary_global_by_type' has the wrong structure
170915  0:46:58 [ERROR] Native table 'performance_schema'.'performance_timers'
has the wrong structure
170915  0:46:58 [ERROR] Native table 'performance_schema'.'rwlock_instances'
has the wrong structure
170915  0:46:58 [ERROR] Native table 'performance_schema'.'setup_actors' has
the wrong structure
170915  0:46:58 [ERROR] Native table 'performance_schema'.'setup_consumers' has
the wrong structure
170915  0:46:58 [ERROR] Native table 'performance_schema'.'setup_instruments'
has the wrong structure
170915  0:46:58 [ERROR] Native table 'performance_schema'.'setup_objects' has
the wrong structure
170915  0:46:58 [ERROR] Native table 'performance_schema'.'setup_timers' has
the wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'table_io_waits_summary_by_index_usage' has the wrong
structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'table_io_waits_summary_by_table' has the wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'table_lock_waits_summary_by_table' has the wrong
structure
170915  0:46:58 [ERROR] Native table 'performance_schema'.'threads' has the
wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'events_stages_current' has the wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'events_stages_history' has the wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'events_stages_history_long' has the wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'events_stages_summary_by_thread_by_event_name' has the
wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'events_stages_summary_by_account_by_event_name' has the
wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'events_stages_summary_by_user_by_event_name' has the
wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'events_stages_summary_by_host_by_event_name' has the
wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'events_stages_summary_global_by_event_name' has the wrong
structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'events_statements_current' has the wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'events_statements_history' has the wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'events_statements_history_long' has the wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'events_statements_summary_by_thread_by_event_name' has
the wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'events_statements_summary_by_account_by_event_name' has
the wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'events_statements_summary_by_user_by_event_name' has the
wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'events_statements_summary_by_host_by_event_name' has the
wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'events_statements_summary_global_by_event_name' has the
wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'events_statements_summary_by_digest' has the wrong
structure
170915  0:46:58 [ERROR] Native table 'performance_schema'.'users' has the wrong
structure
170915  0:46:58 [ERROR] Native table 'performance_schema'.'accounts' has the
wrong structure
170915  0:46:58 [ERROR] Native table 'performance_schema'.'hosts' has the wrong
structure
170915  0:46:58 [ERROR] Native table 'performance_schema'.'socket_instances'
has the wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'socket_summary_by_instance' has the wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'socket_summary_by_event_name' has the wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'session_connect_attrs' has the wrong structure
170915  0:46:58 [ERROR] Native table
'performance_schema'.'session_account_connect_attrs' has the wrong structure
170915  0:46:58 [Warning] Failed to load slave replication state from table
mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' doesn't exist
170915  0:46:58 [Note] Reading of all Master_info entries succeded
170915  0:46:58 [Note] Added new Master_info '' to hash table
170915  0:46:58 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.0.31-MariaDB-0ubuntu0.16.04.2'  socket:
'/tmp/akonadi-nick.R5c8TJ/mysql.socket'  port: 0  Ubuntu 16.04
2017-09-15 00:46:58 7fe2fc6de700 InnoDB: Error: Table
"mysql"."innodb_table_stats" not found.
170915  0:52:39 [Warning] Aborted connection 5 to db: 'akonadi' user: 'nick'
host: '' (Got an error reading communication packets)
170915  8:30:23 [Note] /usr/sbin/mysqld: Normal shutdown

170915  8:30:23 [Note] InnoDB: FTS optimize thread exiting.
170915  8:30:23 [Note] InnoDB: Starting shutdown...
170915  8:30:23 [Note] InnoDB: Waiting for page_cleaner to finish flushing of
buffer pool
170915  8:30:24 [Note] InnoDB: Shutdown completed; log sequence number
5985427122
170915  8:30:24 [Note] /usr/sbin/mysqld: Shutdown complete

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Kdepim-bugs mailing list