Akonadi self-test comes up if startup takes too long

Bug #583735 reported by Harald Sitter
82
This bug affects 15 people
Affects Status Importance Assigned to Milestone
kdepimlibs (Ubuntu)
Fix Released
Undecided
Harald Sitter
Lucid
Fix Released
Undecided
Harald Sitter
Maverick
Fix Released
Undecided
Harald Sitter

Bug Description

This is a split off of
https://bugs.launchpad.net/ubuntu/+source/akonadi/+bug/554514

When the akonadi server does not start within a hardcoded timeout, a self-test will be started, displaying a report of what went wrong.

If the server however does start normally, but takes longer than the timeout specified, the dialog will popup and report errors.

The presented errors will be:
* No resource agents found.
OR
* No resource agents found. AND Previous Akonadi server error log found.
OR
* No resource agents found. AND Some DBus error BUT NOT any mysql or nepomuk related error.

The first error will be that no resource agents could be found, which is really caused by akonadiserver not being registered to dbus, and that in turn is caused because the startup is still in progress.
So the user gets told that something is wrong, even though it is not. Additionally this issue prevents KMail/Kontact to start at first try, because failed tests will cause the app to terminate.

patches/kubuntu_01_increase_fail_timeout.patch
already bumps the timeout from 10 seconds to 60 seconds, but as in the aforementioned parent bug described this is still not long enough a timeout. Especially on low performance hardware such as netbooks or in combination with a lot of session restoration work it is not enough.

Therefore the timeout should be bumped to at least 5 minutes, which should provide enough time to have akondi start properly.

Revision history for this message
Peter (peterroots) wrote :

My self test file.
Kontact and Kopete start up every time as they are running when I shut down (as is akonadi)
No contacts or calendar is available each time I start up as akonadi fails.
If I use the akonadi tray icon to stop and then start akonadi (with kontact and Kopete running) all works fine.
I have tried a startup script in .kde/Autostart to bring up akonadi to no lasting effect (worked once)

Revision history for this message
Harald Sitter (apachelogger) wrote :

Not this issue, quoting myself from the description: "[...] BUT NOT any mysql or nepomuk related error."

Revision history for this message
Nico den Boer (nicodenboer) wrote :

Attached a self test file from one workstation + 2 .xsession-errors files from the same workstation.
Followed the steps in https://bugs.launchpad.net/ubuntu/+source/akonadi/+bug/554514/comments/16

In a few minutes I will email files generated in the same way from another workstation.

In my opinion this is a high priority bug, since I cannot use Kmail at all. If there is a manual action in order to get Akonadi running, I would like to hear it. If I use the Akonadi server configuration utility, Akonadi crashes immediately.

Revision history for this message
Nico den Boer (nicodenboer) wrote :

A second set of logs, from another workstation. Same version of Kubuntu - most recent.

Revision history for this message
Nico den Boer (nicodenboer) wrote :

I do apologize. Second set of logs again, this time the right files.

Revision history for this message
Harald Sitter (apachelogger) wrote :

Unfortunately neither log qualifies, since both are issues with mysql and then causing further issues along the line.

Changed in kdepimlibs (Ubuntu):
assignee: nobody → Harald Sitter (apachelogger)
Revision history for this message
Nico den Boer (nicodenboer) wrote :

@harald: I have checked the last set of logs (log.tar.gz) again.
The first error occurs in (akonadi.log.v1 and akonadi.log.v2) step 9, "Akonadi control process not registered at D-Bus.".
So, this second set should qualify.

Revision history for this message
Nico den Boer (nicodenboer) wrote :

@harald: One more note. You will see at step 11 the error "Nepomuk search service not registered at D-Bus.". However, this is no error. I have Nepomuk switched off all the time, since it makes crypted file systems very, very, very slow. Therefore step 11 is no error for me, in contrary to what the log reports.

Revision history for this message
Minh Ha Duong (haduong) wrote :

I think what you want is the file produced by the "Akonadi self test" dialog box, so here it is.

I confirm that if Akonadi is not running already when kontact starts, then kadressbook displays the "Akonadi is not operational" complaint.

Three remarks:
- Increasing the timeout is just a workaround.
- There is a program with the specific job of making sure that service A is ready when application B starts: it is "upstart" of course. I am not sure about integration with KDE.
- What we really want is that akonadi starts fast.

Yours,
Minh

Revision history for this message
Harald Sitter (apachelogger) wrote :

Nico, please note the line
"100511 16:41:52 InnoDB: Operating system error number 13 in a file operation."
as appearing in your akonadiserver log. To me this looks like mysql goes down, draging akonadiserver and akonadicoontrol along with it.

Thanks Minh Ha Duong, this is exactly what I needed!

Changed in kdepimlibs (Ubuntu Lucid):
assignee: nobody → Harald Sitter (apachelogger)
status: New → In Progress
Changed in kdepimlibs (Ubuntu Maverick):
status: New → In Progress
Revision history for this message
Harald Sitter (apachelogger) wrote :

I am holding back on an increased timeout for maverick until after KDE 4.5 beta1 landed, as to prevent intermediate issues.

Revision history for this message
Jonathan Riddell (jr) wrote :
Revision history for this message
Jonathan Riddell (jr) wrote :

waiting on approval from ubuntu-sru before accepting into lucid-proposed

Revision history for this message
John Dong (jdong) wrote :

ACK from ubuntu-sru

Revision history for this message
Jonathan Riddell (jr) wrote : Please test proposed package

Accepted into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in kdepimlibs (Ubuntu Lucid):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Nico den Boer (nicodenboer) wrote :

The patch does not help me. But, I did some testing to isolate the problem and found some info which is perhaps interesting for others.

On one box, I logged in as another user. Kmail was not used in this account. Akonadi starts normally in this account. Then I copied the whole dir /home/nico/.kde/share/apps/kmail and the files
/home/nico/.kde/share/config/kmail*
/home/nico/.kde/share/config/mail*
/home/nico/.kde/share/config/email*
Then restarted Akonadi and started kmail without any problem.

For this new user account remains working fine, it seems files or settings in /home/nico are causing this error.

Deleting the dir /home/nico/.local/share/akonadi has no effect, the dir is recreated and I still have the error.
Did a search on all akonadi files in my home dir:
./.local/share/akonadi/akonadiserver.socket
./.local/share/akonadi/akonadiserver.error.old
./.kde/share/config/akonadi-firstrunrc
./.config/akonadi/ <some files here, but they are recreated and therefore fresh>

I cannot find the difference, why in one account kmail / akonadi works fine, while in the other / my account I get a crash.
What can I do to assist in finding the cause of this problem?

Revision history for this message
Harald Sitter (apachelogger) wrote :

Clearly I have not made myself clear enough.
In comment #10 I was meant to say that Nico is not affected by this bug and shall please open a new report, because the issue is absolutely and completely unrelated to what is explained here.

Revision history for this message
Nico den Boer (nicodenboer) wrote :

Harald; I am sorry. Will open another bug.

Revision history for this message
Elias Helou (eshneto) wrote :

I have found a workaround for this rather annoying problem. If you want to fix it on a per user basis it is just a matter of going to "System Settings"->"Start Automatically" (under the advanced tab).
      A remark: I am not sure about those menu items because my Kubuntu is in Portuguese.
Once there you will want click the "Add program..." button and type "akonadictl start" in the text box that appears. Apply the settings and exit.

If you want to make this change available systewide, just move the recently created .desktop item to the proper directory:

sudo mv ~/.config/autostart/akonadictl.desktop /usr/share/autostart/

Notice that this is a very rough workaround and may not work on every system since it seems to rely on some rather arbritary sequence and timing of events to work.

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

Tested this in a not-so-fast VM. After installing the version from lucid-proposed the "akonadi self-test" window now doesn't pop-up as it did the first few times i tested with the old version.

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kdepimlibs - 4:4.4.2-0ubuntu2.1

---------------
kdepimlibs (4:4.4.2-0ubuntu2.1) lucid-proposed; urgency=low

  * Increase timeout in kubuntu_01_increase_fail_timeout.patch once more.
    300000 (i.e. 5 minutes) should hopefully be enough to not run into time
    outs. (LP: #583735)
 -- Harald Sitter <email address hidden> Thu, 27 May 2010 09:16:50 +0200

Changed in kdepimlibs (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
Harald Sitter (apachelogger) wrote :

Fixed upstream using a more suitable approach for maverick.

Changed in kdepimlibs (Ubuntu Maverick):
status: In Progress → Fix Released
Revision history for this message
ian_hawdon (ian-hawdon) wrote :

Since the update on Lucid, I still get the same error, only it appears much later!

Revision history for this message
Thierry Chich (thierry-chich) wrote :

I can't understand that such an important piece of software can be so buggy. I have tried all I can imagine. One day, I can see all my google contacts and all my calendar events on google, and tomorrow, it will say that it can't find an akonadi resource. Today, I can't acces to my contact (even local contacts) , and I have all my events synchronized with google.
However, it's look like there is a some error message with the synchronisation of new events :

Erreur : http://kde-apps.org/content/show.php/PyQt?content=28477 : ReferenceError: Can't find variable: GS_googleAddAdSenseService
Erreur : http://kde-apps.org/content/show.php/PyQt?content=28477 : ReferenceError: Can't find variable: GA_googleAddSlot
Erreur : http://kde-apps.org/content/show.php/PyQt?content=28477 : ReferenceError: Can't find variable: GA_googleFetchAds
Erreur : http://kde-apps.org/content/show.php/PyQt?content=28477 : ReferenceError: Can't find variable: GA_googleFillSlot
Erreur : http://kde-apps.org/content/show.php/PyQt?content=28477 : ReferenceError: Can't find variable: GA_googleFillSlot
Erreur : http://kde-apps.org/content/show.php/PyQt?content=28477 : ReferenceError: Can't find variable: GA_googleFillSlot

Revision history for this message
Joke de Buhr (joke) wrote :

Still the same error after a fresh kde setup. The status window pops up about two minutes after login.

Revision history for this message
Konstantin L. Metlov (metlov) wrote :

This bug seems to be fixed in KDE 4.4.5. The patch is <a href="https://bugs.kde.org/show_bug.cgi?id=236538#c18">here</a>.

May be the fix can be backported to lucid ?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.