[Kde-pim] How to pinpoint issues with KMail + Akonadi in order to make bug reports more actionable (was: Re: KMail seems to loose connection to Akonadi at times)

Martin Steigerwald martin at lichtvoll.de
Thu Mar 12 12:06:55 GMT 2015


Am Mittwoch, 21. Januar 2015, 13:34:43 schrieb Martin Steigerwald:
> Am Mittwoch, 21. Januar 2015, 11:59:37 schrieb Martin Steigerwald:
> > Am Mittwoch, 21. Januar 2015, 11:48:29 schrieb Martin Steigerwald:
> > > Am Montag, 3. November 2014, 11:26:24 schrieb Daniel Vratil:
> > > > On Saturday 01 of November 2014 17:00:01 Martin Steigerwald wrote:
> > > > > Am Samstag, 1. November 2014, 10:36:26 schrieb Martin 
Steigerwald:
> > > > > > Hello Pimsters,
> > > > > > 
> > > > > > I am using KDEPIM 4.14.2 at the moment and it mostly works
> > > > > > quite
> > > > > > well.
> > > > > > Better than others versions before.
> > > > > > 
> > > > > > Yet I have one issue: Sometimes it appears to me KMail looses
> > > > > > connection
> > > > > > to
> > > > > > Akonadi completely. Then it just sits there, displaying the
> > > > > > blue
> > > > > > retrieving
> > > > > > display I do not see often or for long anymore with my POP3
> > > > > > and
> > > > > > Dovecot
> > > > > > IMAP setups at least (with Exchange IMAP at work this is a
> > > > > > different
> > > > > > story), or displaying the wait animation at the folders I
> > > > > > click on
> > > > > > in
> > > > > > the
> > > > > > folder list, while at the same time Akonadi is doing
> > > > > > *nothing*.
> > > > > > 
> > > > > > It sits there like this then.
> > > > > > 
> > > > > > I can even restart Akonadi, but KMail would still sit there,
> > > > > > apparently
> > > > > > waiting for an Akonadi that at the same time actually is ready
> > > > > > to
> > > > > > serve.
> > > > > > 
> > > > > > Only when I also restart KMail and just closing the window and
> > > > > > starting
> > > > > > it
> > > > > > again often is not enough, I need to really make sure the
> > > > > > process is
> > > > > > gone
> > > > > > by using killall kmail (with SIGTERM, no SIGKILL needed). Then
> > > > > > everything
> > > > > > works again for quite a while usually.
> > > > > 
> > > > > I also tried out now *just* restarting KMail while leaving
> > > > > Akonadi
> > > > > alone.
> > > > > This worked also. I just have to make sure KMail process is
> > > > > gone,
> > > > > closing
> > > > > its main application window in that case is not sufficient to
> > > > > achieve
> > > > > this.
> > > > 
> > > > From this description it sounds like the session is stuck (that's
> > > > why
> > > > the
> > > > window closes, but the event loop won't quit, as the Akonadi
> > > > Session is
> > > > still active. You can debug this bug trying to log communications
> > > > between
> > > > KMail and server:
> > > > 
> > > > export AKONADI_SESSION_LOGFILE=/tmp/akonadi.log
> > > > kmail
> > > > 
> > > > This way, when it happens, we will know which command has caused
> > > > the
> > > > session to get stuck. You could also try to get a full backtrace
> > > > of the
> > > > Akonadi server, but that will only provide useful detail in case
> > > > you are running into some kind of a deadlock (QMutex or
> > > > database).
> > > 
> > > Okay, I will do this now.
> > > 
> > > This is the biggest issue I face daily. I hope it will turn up
> > > something useful.
> > > 
> > > I will do this for both work and private use cases. Work first, as
> > > it
> > > happens almost every hour that KMail does not respond at all
> > > anymore.
> > 
> > Wow, this contains a ton of confidential data. I.e. all accesses with
> > folder names and stuff. No anonymization.
> > 
> > Also this is getting huge quickly.
> > 
> > So what is it what you look for?
> > 
> > The last lines of the corresponding imap_resource log when KMail does
> > not respond anymore? Anything else?
> 
> Okay, I have one case of KMail getting stucks displaying mail and it
> seems to me that Akonadi IMAP resource is blocked out then:
> 
> Bug 343114 - gets stuck on one request that times out, kmail and
> akonadiconsole do not display any mail payloads anymore, stuck waiting
> 
> I will archive the logs now. Please tell me what to look for. I won´t
> upload the whole 130 MiB of cleartext with folder names and complete
> mails in it due to privacy concerns.

As I wrote in

https://bugs.kde.org/show_bug.cgi?id=343114#c2

I´d like to look up what is happening when KMail doesn´t respond to user 
input anymore while Akonadi idles around in my private setup as well. As 
my private setup primarily filters my main and other POP3 accounts into a 
huge maildir resource and it only has a smaller IMAP account on a way 
faster Dovecot server than the work Exchange IMAP, I like to test more 
broadly.

Any hints on the following:

1) How do I see the state of Akonadi and whether it is stuck somewhere?

2) How do I see whether Akonadi and the maildir resource still talk to 
each other?

3) How do I see whether the maildir resource is stuck?

4) How do I see whether the IMAP resource for the smaller IMAP account is 
still sane?

5) How can I see that KMail and Akonadi can still talk to each other?

6) How can I see that Akonadi and MySQL database are still fine with one 
another (I bet they are in this case)?

In general: How can I find why KMail doesn´t do anything useful again 
anymore while Akonadi is idling as well? How can I pinpoint this to the 
exact cause?

Sure I can at least put what I think would be the meaningful portion of 
~/.xsession-errors into a bug report. But I´d like to dig a bit deeper to 
make the bug report more useful.

So is there any high level overview of what parts communicate to which 
other in what way and how to check whether any of those parts are stuck or 
the communication between any of the parts are broken?

Heck, I am willing to put answers into the wiki in some structured way. So 
please give some hints. Up so far I didn´t found any comprehense page on 
this. Just hints here and there and trying to fiddle around myself with 
Akonadiconsole myself without understanding half of what I have been 
doing?

I think thats my main issue with providing useful bug reports. I really 
try to hard. But then I write up anything I find and still have no idea 
what is happening. And devs seem to be too busy to dig through my bug 
reports often enough. So I like to learn more myself on how to debug 
things in Akonadi. How to at least be able to point you devs who 
thankfully work on KDEPIM to more speficic areas of the code to look at?

Honestly: Do you know how to do this yourself? Is there anyone with a high 
level overview who can teach me to pinpoint the various issues I have with 
KDEPIM more closer to their actual causes? Maybe it would even reduce the 
amount of bug reports considerably, as I bet there may be quite some 
duplicates in bugzilla that currently do look like different bugs to me.

I think this is still important work to do. As Akonadi Next will take some 
time. Of course, the other alternative would be to give up on bug 
reporting or fixing and help with Akonadi Next, coping with the current 
amount of issues KDEPIM + Akonadi still has. Heck, if you say thats your 
priority, I´d help that way. But as I see it, Akonadi 1 will be around for 
a while, so at least fixing the most important, most annoying issues would 
help a great deal to improve user satisfaction and reduce user frustration 
with using KMail and other KDEPIM application, but honestly, for me its 
mostly KMail + Akonadi. KAddressbook, KOrganizer just work nicely most of 
the time. Just KMail, the mail application I still prefer over anything 
else, does not often enough.


Also any feedback to the bug report itself? I provided some of my 
insights, and I still have all the logs somewhere at work and I can try to 
dig for useful hints in there, given some guidance. But I won´t upload all 
of them as they contain confidential information that are not easy to filter 
out carefully before upload.

-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list