Problem with KMail and Akonadi

Since a few days I’m getting an error in KMail: it says that it needs the Akonadi service that it needs to function is not running. It also offers to start the service, but even if I confirm the start, the error repeats after a few seconds.
KMail is working correctly despite this error, but the constant popup message disrupts my workflow.

I also tried looking at Akonadi status, everything seems ok to me:

cristiano@xmper8q3:~> akonadictl status
Akonadi Control: running
Akonadi Server: running
akonadiprivate_log: search paths:  ("lib64", "lib64/qt5/plugins/", "lib64/kf5/", "lib64/kf5/plugins/", "/usr/lib/qt5/plugins/", "/usr/lib64/qt5/plugins", "/usr/bin")
Akonadi Server Search Support: available (Remote Search)
Available Agent Types: akonadi_akonotes_resource, akonadi_archivemail_agent, akonadi_birthdays_resource, akonadi_contacts_resource, akonadi_davgroupware_resource, akonadi_followupreminder_agent, akonadi_googlecalendar_resource, akonadi_googlecontacts_resource, akonadi_ical_resource, akonadi_icaldir_resource, akonadi_imap_resource, akonadi_indexing_agent, akonadi_invitations_agent, akonadi_kalarm_dir_resource, akonadi_kalarm_resource, akonadi_knut_resource, akonadi_kolab_resource, akonadi_maildir_resource, akonadi_maildispatcher_agent, akonadi_mailfilter_agent, akonadi_mbox_resource, akonadi_migration_agent, akonadi_mixedmaildir_resource, akonadi_newmailnotifier_agent, akonadi_notes_agent, akonadi_notes_resource, akonadi_openxchange_resource, akonadi_pop3_resource, akonadi_sendlater_agent, akonadi_vcard_resource, akonadi_vcarddir_resource

Here is a screenshot of the error:
https://dl.dropboxusercontent.com/u/1200235/KMail_Akonadi_bug.png

Thank you in advance.

Cris

Some additional information that may help (based on similar threads I found in the forums):

cristiano@xmper8q3:~> zypper se -s kdepim5|grep -i "i |"
i | libKF5Libkdepim5           | pacchetto | 16.04.3-2.1 | x86_64 | repo-oss
cristiano@xmper8q3:~> akonadictl --version
Akonadi 5.2.2
cristiano@xmper8q3:~> rpm -qa | grep kdepim
kdepim-addons-16.04.3-2.1.x86_64
kdepim-16.04.3-2.1.x86_64
kdepimlibs4-4.14.10-2.4.x86_64
libkdepimlibs4-4.14.10-2.4.x86_64
libkdepim-16.04.3-2.1.x86_64
kdepim-runtime-16.04.3-2.1.x86_64
kdepim-apps-libs-16.04.3-2.1.x86_64
libKF5Libkdepim5-16.04.3-2.1.x86_64

Cris

Hi Cris,

This bug has been reported upstream ( at the KDE devs ). Christian Boltz temporarily builds packages that don’t have the bug. These got my kmail up and running like it should again.
Here’s what I did


su
zypper ar -f -n AkonadiTMP http://download.opensuse.org/repositories/home:/cboltz:/branches:/openSUSE:/Factory/standard/ AkonadiTMP
zypper ref
(trust the key by 'a' )
zypper dup --from AkonadiTMP

To make sure I had no stale processes or whatever I rebooted after doing this.

A side note: of course these temporary changes have to be reverted as soon as proper packages with fixed bugs arrive in TW.

Knurpht, thank you for your reply and especially for the detailed procedure!!

Cris

Hello Knurpht, here’s a kiss :kiss: and a hug :shake: (no icon, so handshake will have to do) for you.

Many thanks for the solution, and also to Cris for posting about the problem.

PS: Anyone have the bug number for this issue at hand? Cheers.

Ok, I think I found it: 363881 – akonadi_control fails with memory corruption

FYI, back on the stock TW packages, seems to be fixed now.

Is this the same bug that was discussed in this thread: https://forums.opensuse.org/showthread.php/516850-After-Updating-KDE-FW-to-5-20-and-Plasma-to-5-6-(with-Qt-to-5-6-as-well)-Akonadi-quot-doesn-t-work-quot ? If it is, is the fixed version in the Leap KDE and Framework repositories?

Thanks.

Not really.
This is about a problem with the latest Xapian update in Tumbleweed, Leap 42.1 never was affected by this as it didn’t get that update (because it is a stable release).
And we don’t have Xapian in those repos either, not to mention that the other thread is much older.

PS, I forgot to mention: We cannot even offer the latest KDEPIM/Akonadi 16.08.0 for Leap 42.1, because it requires Qt 5.6, while 42.1 only has 5.5.1.
KDE:Applications for 42.1 is still built against the Qt from the standard repos, not 5.6/5.7 from KDE:Qt5.

True, but the thread I referenced refers to the version of Qt from download.opensuse/repositories/KDE:/Qt5/openSUSE_Leap_42.1/ which currently contains Qt 5.7 and download.opensuse.org/repositories/KDE:/Applications/openSUSE_Leap_42.1 which contains Akonadi core 16.08, though the KDEPim entries are 16.04. At the time of the the thread I mentioned, the Qt repository contained 5.6, as you’ll see in the first post in the thread and referred to the updated KDEPIM/Akonadi from the Applications repository. Given that the symptoms were exactly the same as mentioned in this thread and were linked back to memory corruption, I’d think that they are referring to the same bug.

I know about that thread. As you should remember, I took part.

You asked whether there is a fix in KDE:Applications. But there cannot be for Leap 42.1, as the packages cannot be updated.

Your problem may have been caused by the fact that Akonadi 16.04.x is actually built against Qt 5.5.1 for Leap, which may introduce incompatibilities with Qt 5.6/5.7 from KDE:Qt5, but I did try it on Leap as well back then and couldn’t reproduce your problem.

Given that the symptoms were exactly the same as mentioned in this thread and were linked back to memory corruption, I’d think that they are referring to the same bug.

No, they are not.
Again, a new version of Xapian has been submitted to Factory recently, and that apparently caused some hickups.
Christian Boltz built the older Xapian in his repo (and Akonadi against it) as a “fix” for people affected.
And as I said this won’t help on Leap 42.1, because Leap 42.1 still only has the older Xapian anyway.

Btw, that was not 363881 – akonadi_control fails with memory corruption, but 363741 – akonadi server 16.08.1: crashing every few seconds (an openSUSE version is here: 997246 – Caught a Xapian crash).
And note that there is currently also a problem with nouveau that causes KDEPIM’s message viewer (and chromium too, on which it is based) to crash.

Another bug report that sounds more like your issue is 367846 – KMail2 and akonadiconsole continuously lose connection to akonadi server - happens every 30 secs to 2 minutes., the reporter’s problem was fixed

Knurpht,
I am still experiencing the problem. I have waited a few days after your message, but now at least two major updates have been installed on my system and still it is not fixed.
Is there something I can verify on my side to understand why it is not fixed here?

Thank you in advance.

Cris

How do you update?

How does my output compare to yours?

knurpht@knurphtlaptop:~> rpm -qa | grep -i akonadi | sort
akonadi-contact-16.08.0-1.3.x86_64
akonadi-mime-16.08.0-1.2.x86_64
akonadi_resources-16.08.0-1.2.x86_64
akonadi-search-16.08.0-1.2.x86_64
akonadi-server-16.08.0-1.2.x86_64
libakonadi4-4.14.10-2.6.x86_64
libakonadiprotocolinternals1-1.13.0-7.9.x86_64
libKF5AkonadiAgentBase5-16.08.0-1.2.x86_64
libKF5AkonadiCalendar5-16.08.0-1.2.x86_64
libKF5AkonadiContact5-16.08.0-1.3.x86_64
libKF5AkonadiCore5-16.08.0-1.2.x86_64
libKF5AkonadiMime5-16.08.0-1.2.x86_64
libKF5AkonadiNotes5-16.08.0-1.2.x86_64
libKF5AkonadiSearch-16.08.0-1.2.x86_64
libKF5AkonadiWidgets5-16.08.0-1.2.x86_64
knurpht@knurphtlaptop:~> rpm -qa | grep libxap
libxapian30-1.4.0-1.2.x86_64

I am not aware of any fix.

As explained this is a problem with the Xapian update (which the search agent uses as database).
It may be a bug in Xapian, or akonadi-search may be incompatible with the latest Xapian.
None of the two have seen any changes in this regard yet though.

The “fix” is to install Christian Boltz’s older Xapian package (and the KDEPIM packages that are built against).

Maybe not using the indexed search (and disabling indexing or even uninstalling akonadi-search completely) might help too…

Hi Knurpht,
here is my output. To me it seems identical to yours:

cristiano@xmper8q3:~> rpm -qa | grep -i akonadi | sort
akonadi-contact-16.08.0-1.3.x86_64
akonadi-mime-16.08.0-1.2.x86_64
akonadi_resources-16.08.0-1.2.x86_64
akonadi-search-16.08.0-1.2.x86_64
akonadi-server-16.08.0-1.2.x86_64
libakonadi4-4.14.10-2.6.x86_64
libakonadiprotocolinternals1-1.13.0-7.9.x86_64
libKF5AkonadiAgentBase5-16.08.0-1.2.x86_64
libKF5AkonadiCalendar5-16.08.0-1.2.x86_64
libKF5AkonadiContact5-16.08.0-1.3.x86_64
libKF5AkonadiCore5-16.08.0-1.2.x86_64
libKF5AkonadiMime5-16.08.0-1.2.x86_64
libKF5AkonadiNotes5-16.08.0-1.2.x86_64
libKF5AkonadiSearch-16.08.0-1.2.x86_64
libKF5AkonadiWidgets5-16.08.0-1.2.x86_64
cristiano@xmper8q3:~> rpm -qa | grep libxap
libxapian30-1.4.0-1.2.x86_64

However, since Wolfi is saying that no fix has been published yet, I tend to believe him :).

The difference between me and you is that you installed Christian Boltz’s packages, while I preferred to wait for a fix. Maybe something changed on your system due to Christian Boltz’s packages?

Cris

Yes, do believe wolfi323, he’s by far more into this matter than I am.

Still. it’s weird. I performed a clean TW install, using a copy of my homedir. Kmail / Akonadi behaved “normal”. So, I rebooted in my TW install with Christian’s packages, reverted to the TW stock packages, where I got an error message on Christian’s temporary repo, so I assumed my thought it was fixed was right ( all this before logging in on the desktop ), logged in and Kmail / Akonadi worked. And still work

Knurpht, I agree with you that it’s really weird.
I will let you know if/when it’s fixed on my side.

Cris

Yes, it is indeed a bit weird that it is fixed for him and not for you.

But as I wrote, the crash is in Xapian (which is used as database for the indexed search), so it may be dependant to if/how you use kmail’s search functions.
Again, try to uninstall akonadi-search (and ignore the conflicts), that should fix it in any case, I think.
Unless you suffer from a different problem of course…

Unfortunately it is not possible, because it would remove KMail too:

cristiano@xmper8q3:~> LANG=C sudo zypper rm akonadi-search
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following application is going to be REMOVED:
  KMail

The following 3 packages are going to be REMOVED:
  akonadi-search kdepim kmail5

3 packages to remove.
After the operation, 11.0 MiB will be freed.
Continue? [y/n/? shows all options] (y): n

Well, in a certain sense it would definitely fix my problems with KMail :wink:

Cris