Bug 238217 - Minor mysql startup problem prevents kmail from running
Summary: Minor mysql startup problem prevents kmail from running
Status: RESOLVED UNMAINTAINED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: server (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 256527 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-05-19 19:37 UTC by Davor Cubranic
Modified: 2017-01-07 22:33 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Output of 'akonadictl start' when MySql fails to start (3.18 KB, text/plain)
2010-05-19 19:40 UTC, Davor Cubranic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Davor Cubranic 2010-05-19 19:37:50 UTC
Version:            (using KDE 4.4.2)
OS:                Linux
Installed from:    Ubuntu Packages

I originally reported this bug in Ubuntu Launchpad: https://bugs.launchpad.net/ubuntu/+source/akonadi/+bug/578357

I am opening it here as a wider issue: Akonadi is very fragile in the face of mysql startup problems, and that has a knock-on effect of preventing basic user applications (mail, PIM) from running.

The most visible symptom of the problem was that after starting up KMail, I would get an error dialog stating that Akonadi is not running. After closing the dialog, the app would close also.

I started investigating, and got voluminous, but not very helpful error output when running 'akonadictl start' from the command line. (I'll attach a copy.) Further poking and twiddling with apparmor and other workarounds suggested in various bugs and forums was unsuccessful. Eventually, I stumbled upon mysql.err in ~/.local/share/akonadi/db_data/ with the following contents:

100519 9:49:38 [Note] Plugin 'FEDERATED' is disabled.
 InnoDB: Error: log file ./ib_logfile1 is of different size 0 0 bytes
 InnoDB: than specified in the .cnf file 0 67108864 bytes!
 100519 9:49:38 [ERROR] Plugin 'InnoDB' init function returned error.
 100519 9:49:38 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
 100519 9:49:38 [ERROR] Unknown/unsupported table type: innodb
 100519 9:49:38 [ERROR] Aborting
100519 9:49:38 [Note] /usr/sbin/mysqld-akonadi: Shutdown complete

File 'ib_logfile1' was indeed of size zero. Deleting it and 'ib_logfile0', and then restarting 'akonadictl' seemed to fix the problem and I now have a working mail reader.

I don't know how the log file got corrupted, but the system should be more robust than that. I mean, having a zero-size or corrupted log file does not need to be an unrecoverable error!

It's completely reasonable in such a situation to delete it and proceed with startup. The database should still be in a consistent state, and the worst that could happen is that the last few transactions are missing. Or at the very least notify the user what the real problem is. As it is, akonadi server's output is utterly unhelpful, and it took me forever to find Akonadi's mysql.err, where the problem was actually clearly identified.
Comment 1 Davor Cubranic 2010-05-19 19:40:53 UTC
Created attachment 43736 [details]
Output of 'akonadictl start' when MySql fails to start

This is the output of running 'akonadictl start' from the console before I vixed the problem by deleting the corrupted logfiles. This output actually repeats three times. (Why?)
Comment 2 Joseph Reagle 2010-09-14 22:52:52 UTC
I have the same problem too. Moving to akonadi has been a disaster for me as a user. Beside this breakage, how does one even backup one's email files even?
Comment 3 João Eiras 2010-11-10 17:59:00 UTC
*** Bug 256527 has been marked as a duplicate of this bug. ***
Comment 4 Ricardo Graça 2011-03-13 16:31:37 UTC
*** This bug has been confirmed by popular vote. ***
Comment 5 Denis Kurz 2016-09-24 20:38:55 UTC
This bug has only been reported for versions older than KDEPIM 4.14 (at most akonadi-1.3). Can anyone tell if this bug still present?

If noone confirms this bug for a recent version of akonadi (part of KDE Applications 15.08 or later), it gets closed in about three months.
Comment 6 Denis Kurz 2017-01-07 22:33:33 UTC
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.0 aka 15.08), please open a new one unless it already exists. Thank you for all your input.