Bug 246027 - Kmail stoped with: KMail encountered a fatal error and will terminate now. The error was: Timeout trying to get lock."
Summary: Kmail stoped with: KMail encountered a fatal error and will terminate now. Th...
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: 4.8
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 288892 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-07-28 14:53 UTC by Marcello Ceschia
Modified: 2016-04-23 02:39 UTC (History)
17 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.9.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcello Ceschia 2010-07-28 14:53:25 UTC
Version:           2.0.89 (using Devel) 
OS:                Linux

> kmail
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
marcello@carol:~/Downloads> kmail2(12966)/kdeui (KIconLoader): Removing 189 will not work as it is assigned to page 240 which is itself assigned to entry 70 instead! 
kmail2(12966)/kdeui (KIconLoader): We somehow did not remove 6 when removing entry 189 , instead we removed 0 
kmail2(12966)/libakonadi Akonadi::GetLockJob::Private::timeout: Timeout trying to get lock. 
kmail2(12966)/libakonadi Akonadi::SpecialCollectionsRequestJobPrivate::lockResult: Failed to get lock: "Timeout trying to get lock." 
kmail2(12966) KMKernel::emergencyExit: "KMail encountered a fatal error and will terminate now.
The error was:
Timeout trying to get lock." 
kmail2(12966)/libakonadi Akonadi::GetLockJob::Private::timeout: Timeout trying to get lock. 
kmail2(12966)/libakonadi Akonadi::SpecialCollectionsRequestJobPrivate::lockResult: Failed to get lock: "Timeout trying to get lock." 
kmail2(12966) KMKernel::emergencyExit: "KMail encountered a fatal error and will terminate now.
The error was:
Timeout trying to get lock." 
kmail2(12966)/libakonadi Akonadi::GetLockJob::Private::timeout: Timeout trying to get lock. 
kmail2(12966)/libakonadi Akonadi::SpecialCollectionsRequestJobPrivate::lockResult: Failed to get lock: "Timeout trying to get lock." 
kmail2(12966) KMKernel::emergencyExit: "KMail encountered a fatal error and will terminate now.
The error was:
Timeout trying to get lock." 
kmail2(12966)/libakonadi Akonadi::GetLockJob::Private::timeout: Timeout trying to get lock. 
kmail2(12966)/libakonadi Akonadi::SpecialCollectionsRequestJobPrivate::lockResult: Failed to get lock: "Timeout trying to get lock." 
kmail2(12966) KMKernel::emergencyExit: "KMail encountered a fatal error and will terminate now.
The error was:
Timeout trying to get lock." 
kmail2(12966)/libakonadi Akonadi::GetLockJob::Private::timeout: Timeout trying to get lock. 
kmail2(12966)/libakonadi Akonadi::SpecialCollectionsRequestJobPrivate::lockResult: Failed to get lock: "Timeout trying to get lock." 
kmail2(12966) KMKernel::emergencyExit: "KMail encountered a fatal error and will terminate now.
The error was:
Timeout trying to get lock." 
kmail2(12966)/libakonadi Akonadi::GetLockJob::Private::timeout: Timeout trying to get lock. 
kmail2(12966)/libakonadi Akonadi::SpecialCollectionsRequestJobPrivate::lockResult: Failed to get lock: "Timeout trying to get lock." 
kmail2(12966) KMKernel::emergencyExit: "KMail encountered a fatal error and will terminate now.
The error was:
Timeout trying to get lock."



Reproducible: Always




> kmail --version
Qt: 4.6.3
KDE Development Platform: 4.5.61 (KDE 4.5.61 (KDE 4.6 >= 20100724)) "release 1"
KMail: 2.0.89
Comment 1 roger spires 2010-07-29 17:05:31 UTC
I also have this problem. Deleting the akonadi maildir resources allows kmail to run but that cretes problems with mail fetching, imap and pop.
Comment 2 Laurent Montel 2010-07-30 09:59:31 UTC
Already fixed in kdepimlib-trunk
Please update your kdepimlib
Comment 3 pete_herworth 2010-09-14 21:09:59 UTC
I was getting "unknown resource" now I'm getting this "timeout trying to get lock" and although all other kontact sections work (Summary, Calendar, Contacts) kmail won't.
opensuse 11.4 m1 (kde-4.5-68svn..)
kmail 2.0.89
kernel 2.6.36-rc3
Comment 4 Arne Babenhauserheide 2011-01-16 12:11:41 UTC
I was getting this, too. Removing my akonadi and nepomuk folders (after doing a backup) fixed it for me (more precisely: at least I can now open it again, and I see mails).
Comment 5 Wolfgang Mader 2011-09-27 10:34:47 UTC
Hi,

this is
Qt: 4.7.4
KDE Development Platform: 4.7.1 (4.7.1)
KMail: 4.7.1

while I have to mention that I am using kdevplatform-git package from aur. aur is the user repository of arch linux. The version of kdevplatform on my maschine is termed 20110922-1, what I would say is the date of the git snapshot.

When I start kmail, or kmail as part of kontact, I see the application and the mail headlines, but as kmail tries to fetch mail content it dies with the console output attached to the end of this post.

I only have imap accounts in use + the local folders which seem to be a must. I have not tried to remove any accounts or restart any aconadie stuff. I just want to mention that I have seen this bug. I will come back to this report if I find s.th. on interest.


---kmail console output---

[home]$  kmail

** (process:8646): WARNING **: Error loading plugin: libhspell.so.0: cannot open shared object file: No such file or directory

kmail2(8646)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
[home]$ kmail2(8646)/libakonadi Akonadi::GetLockJob::Private::timeout: Timeout trying to get lock. 
kmail2(8646)/libakonadi Akonadi::SpecialCollectionsRequestJobPrivate::lockResult: Failed to get lock: "Timeout trying to get lock." 
kmail2(8646) MailCommon::Kernel::emergencyExit: "KMail encountered a fatal error and will terminate now.
The error was:
Timeout trying to get lock." 
^C
Comment 6 Wolfgang Mader 2011-09-27 12:15:53 UTC
After removing all imap resources from akonadi, log out log in from the kde session, and add the imap resources again, all is fine again. I want to note that restaring akonadi was not enough, I had to log out and login in again.
Comment 7 S. Burmeister 2011-10-27 13:39:33 UTC
I get this with KDE 4.7.2!

Object::connect: No such slot KMMainWidget::slotItemNotMovedByFilters( Akonadi::Item )
rabauke@linux-vdb1:~> kmail2(3226)/libakonadi Akonadi::GetLockJob::Private::timeout: Timeout trying to get lock. 
kmail2(3226)/libakonadi Akonadi::SpecialCollectionsRequestJobPrivate::lockResult: Failed to get lock: "Zeitüberschreitung beim Erhalten der Sperre." 
kmail2(3226) MailCommon::Kernel::emergencyExit: "In KMail ist ein schwerwiegender Fehler aufgetreten. Das Programm wird beendet.
Die Fehlermeldung lautet:
Zeitüberschreitung beim Erhalten der Sperre." 
kmail2(3226)/libakonadi Akonadi::GetLockJob::Private::timeout: Timeout trying to get lock. 
kmail2(3226)/libakonadi Akonadi::SpecialCollectionsRequestJobPrivate::lockResult: Failed to get lock: "Zeitüberschreitung beim Erhalten der Sperre." 
kmail2(3226) MailCommon::Kernel::emergencyExit: "In KMail ist ein schwerwiegender Fehler aufgetreten. Das Programm wird beendet.
Die Fehlermeldung lautet:
Zeitüberschreitung beim Erhalten der Sperre."
Comment 8 David Faure 2011-10-27 13:47:59 UTC
I had this, this morning, with uptodate 4.7 branch.

"qdbus | grep -C5 org.kde.pim.SpecialCollections" showed that one of the imap resources still had the lock registered (i.e. it had acquired the name org.kde.pim.SpecialCollections and had not released it), so I restarted akonadi and kmail, and everything was fine then.
Simply killing/restarting the imap resource might have been enough, too.

No idea why this happens, nor why restarting akonadi was apparently not enough for some posters here.
Comment 9 Everard 2012-03-18 12:34:26 UTC
This problem still occurs in kdepim-4.8.1-3.fc16.x86_64 immediately after I start kmail - all I want to do is read my email :(

I don't like Thunderbird but at least it allows me to read email.

$ kmail
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
loaded the Generic plugin 
kmail2(6611)/kdepimlibs (mailtransport): Could not access Outbox. 
[everard@sisko OA-rails]$ kmail2(6611)/libakonadi Akonadi::GetLockJob::Private::timeout: Timeout trying to get lock. Check who has acquired the name "org.kde.pim.SpecialCollections" on DBus, using qdbus or qdbusviewer. 
kmail2(6611)/libakonadi Akonadi::SpecialCollectionsRequestJobPrivate::lockResult: Failed to get lock: "Timeout trying to get lock." 
kmail2(6611) MailCommon::Kernel::emergencyExit: "KMail encountered a fatal error and will terminate now.
The error was:
Timeout trying to get lock."
Comment 10 David Faure 2012-03-20 12:58:43 UTC
(In reply to comment #9)
> This problem still occurs in kdepim-4.8.1-3.fc16.x86_64 immediately after I
> start kmail - all I want to do is read my email :(

Did you read my comment, and did you try to restart akonadi?
Comment 11 Everard 2012-03-20 13:20:32 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > This problem still occurs in kdepim-4.8.1-3.fc16.x86_64 immediately after I
> > start kmail - all I want to do is read my email :(
> 
> Did you read my comment, and did you try to restart akonadi?

Yes. I have managed to get it to start by shutting down (and disabling) akonadi. I might re-enable aknonadi someday but, for now, I will leave it disabled - I can read my email now :)
Comment 12 Christophe Marin 2012-04-14 09:30:19 UTC
Valid in master
I tried removing the Akonadi & Nepomuk data (including the config files) and restarting from scratch

3 dimap accounts added in akonadiconsole, the mail sync worked without issue, the nepomuk data are still being reindexed.

Attaching gdb gives this:

#6  0x00007f418de15157 in QEventLoop::exec (this=0x7fffbf36c2f0, flags=...) at kernel/qeventloop.cpp:204
#7  0x00007f418e817506 in QDialog::exec() () from /usr/lib64/libQtGui.so.4
#8  0x00007f418f610619 in KMessageBox::createKMessageBox (dialog=0xf5f2d0, icon=..., text=..., strlist=..., ask=..., checkboxReturn=0x0, options=..., details=
    ..., notifyType=QMessageBox::Critical) at /kde/src/kdelibs/kdeui/dialogs/kmessagebox.cpp:344
#9  0x00007f418f60f29d in KMessageBox::createKMessageBox (dialog=0xf5f2d0, icon=QMessageBox::Critical, text=..., strlist=..., ask=..., checkboxReturn=0x0, 
    options=..., details=...) at /kde/src/kdelibs/kdeui/dialogs/kmessagebox.cpp:159
#10 0x00007f418f613012 in KMessageBox::errorListWId (parent_id=0, text=..., strlist=..., caption=..., options=...)
    at /kde/src/kdelibs/kdeui/dialogs/kmessagebox.cpp:854
#11 0x00007f418f612cb6 in KMessageBox::error (parent=0x0, text=..., caption=..., options=...) at /kde/src/kdelibs/kdeui/dialogs/kmessagebox.cpp:821
#12 0x00007f4189da5a31 in MailCommon::Kernel::emergencyExit (this=0xa118d0, reason=...) at /kde/src/pim/kdepim/mailcommon/mailkernel.cpp:210
#13 0x00007f4189da577e in MailCommon::Kernel::createDefaultCollectionDone (this=0xa118d0, job=0xcecf00) at /kde/src/pim/kdepim/mailcommon/mailkernel.cpp:173
#14 0x00007f4189da6cee in MailCommon::Kernel::qt_static_metacall (_o=0xa118d0, _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0x7fffbf36cca0)
    at /kde/build/pim/kdepim/mailcommon/mailkernel.moc:59
#15 0x00007f418de29fe1 in QMetaObject::activate (sender=0xcecf00, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fffbf36cca0)
    at kernel/qobject.cpp:3556
#16 0x00007f418f22be23 in KJob::result (this=0xcecf00, _t1=0xcecf00) at /kde/build/kdelibs/kdecore/kjob.moc:208
#17 0x00007f418f22b2e7 in KJob::emitResult (this=0xcecf00) at /kde/src/kdelibs/kdecore/jobs/kjob.cpp:318
#18 0x00007f418a2d6dd2 in Akonadi::SpecialCollectionsRequestJobPrivate::lockResult (this=0xcfafe0, job=0xb64040)
    at /kde/src/pim/kdepimlibs/akonadi/specialcollectionsrequestjob.cpp:121
#19 0x00007f418a2d8ac5 in Akonadi::SpecialCollectionsRequestJob::qt_static_metacall (_o=0xcecf00, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffbf36cee0)
    at /kde/build/pim/kdepimlibs/akonadi/specialcollectionsrequestjob.moc:55
#20 0x00007f418de29fe1 in QMetaObject::activate (sender=0xb64040, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fffbf36cee0)
    at kernel/qobject.cpp:3556
#21 0x00007f418f22be23 in KJob::result (this=0xb64040, _t1=0xb64040) at /kde/build/kdelibs/kdecore/kjob.moc:208
#22 0x00007f418f22b2e7 in KJob::emitResult (this=0xb64040) at /kde/src/kdelibs/kdecore/jobs/kjob.cpp:318
#23 0x00007f418a2d4bbf in Akonadi::GetLockJob::Private::timeout (this=0x9e1420) at /kde/src/pim/kdepimlibs/akonadi/specialcollectionshelperjobs.cpp:610
#24 0x00007f418a2d53b6 in Akonadi::GetLockJob::qt_static_metacall (_o=0xb64040, _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0x7fffbf36d090)
    at /kde/build/pim/kdepimlibs/akonadi/specialcollectionshelperjobs_p.moc:211
#25 0x00007f418de29fe1 in QMetaObject::activate (sender=0x951d90, m=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3556
Comment 13 Christophe Marin 2012-04-14 09:34:18 UTC
# qdbus | grep -C5 org.kde.pim.SpecialCollections 
 org.kde.StatusNotifierItem-27845-1
:1.742
 org.freedesktop.Akonadi.Agent.akonadi_imap_resource_1
 org.freedesktop.Akonadi.Resource.akonadi_imap_resource_1
 org.kde.akonadi_imap_resource_1-32487
 org.kde.pim.SpecialCollections
:1.743
:1.744
 org.freedesktop.Akonadi.Agent.akonadi_imap_resource_2
 org.freedesktop.Akonadi.Resource.akonadi_imap_resource_2
 org.kde.akonadi_imap_resource_2-32515
Comment 14 Christophe Marin 2012-04-17 14:37:34 UTC
tried again later to wipe everything again, and this time, it worked flawlessly. 
The only (notable) difference between both experiments is the local folders behaviour. On the first attempt, the 'Draft' folder wasn't created.
Comment 15 Sérgio Basto 2012-05-12 00:13:10 UTC
hi , I got this error , and after googling arrive here , 
My solution was system settings -> akonadi configuration -> akanodi server configuration -> restart mysql (akonodi server)
Comment 16 Unknown 2012-06-24 17:10:25 UTC
This bug is now fixed. Look at release KDE 4.9 and https://bugs.kde.org/show_bug.cgi?id=124111
Comment 17 Kanwar Plaha 2012-12-03 00:46:29 UTC
This bug is still present in 4.10 beta1. I am using it right now and it shows up on both openSUSE as well as Kubuntu builds.
Comment 18 Cédric Bellegarde 2013-06-06 09:32:44 UTC
Still present here with KDE 4.10.3
Comment 19 Unknown 2013-06-13 16:29:07 UTC
can you try to make a trace such as:
strace -f -e trace=file /usr/bin/kmail
and store the ouput of the console.
Then, search for lines such as:
statfs("/home/guy-kde/.kde/share/config/emailidentities.lock", 0x7fffbcf09630) = -1 ENOENT 

and check if the directory is writeable
Comment 20 Kanwar Plaha 2013-06-14 02:14:04 UTC
@Maurel: thanks for that suggestion. I can explain further when the issue happens. Let's say I have cleared .config/akonadi and .local/share/akonadi directories and then tried to restart Kontact. This is usually if I've upgraded my KDE version. I have several local mail folders. I have noticed I get the above error when its reading local mail folders and in the meanwhile I'm trying to add an IMAP account, in particular, and changing settings, in general. Once local mail is loaded and Kmail is happy, this error does not show.
Is there a race condition somewhere (just guessing!) while local mail is being read?
Comment 21 Tim Holy 2014-06-09 14:23:51 UTC
I'm seeing this upon upgrade from Kubuntu 12.04 to 14.04. Doing
    strace -f -e trace=file /usr/bin/kmail
revealed the following interesting lines:

kmail2(8480)/libakonadi Akonadi::GetLockJob::Private::timeout: Timeout trying to get lock. Check who has acquired the name "org.kde.pim.SpecialCollections" on DBus, using qdbus or qdbusviewer. 
kmail2(8480)/libakonadi Akonadi::SpecialCollectionsRequestJobPrivate::lockResult: Failed to get lock: "Timeout trying to get lock." 
kmail2(8480) MailCommon::Kernel::emergencyExit: "The Email program encountered a fatal error and will terminate now.
The error was:
Timeout trying to get lock." 


$ qdbus org.kde.pim.SpecialCollections
/
/Debug
/MailDispatcherAgent
/MainApplication
/Settings

$ qdbus | grep -C5 org.kde.pim.SpecialCollections
 org.kde.akonadi_baloo_indexer-2841
:1.65
 org.freedesktop.Akonadi.Agent.akonadi_maildispatcher_agent
 org.freedesktop.Akonadi.MailDispatcherAgent
 org.kde.akonadi_maildispatcher_agent-2843
 org.kde.pim.SpecialCollections
:1.66
 org.freedesktop.Akonadi.Agent.akonadi_migration_agent
 org.kde.akonadi_migration_agent-2845
:1.67
 org.freedesktop.Akonadi.Agent.akonadi_newmailnotifier_agent


I moved my ~/.config/akonadi and ~/.local/share/akonadi out of the way and rebooted, but this didn't help.

One oddity is that new local-mail resources get added each time I fail to start kontact. I can delete them in the Akonadi Configuration module, so I have only one left.

My mail is stored in ~/.local/share/local-mail. I have two POP3 accounts configured.
Comment 22 Tim Holy 2014-06-09 15:09:23 UTC
I did some random sequence of deleting all akonadi resources (multiple times), starting kontact (multiple times), manually specifying a resource at ~/.local/share/local-mail, and restarting the mysql server. At a certain point I got to a stage where there was just one "Local Folders" resource listed in Akonadi Control. At the time is was listed as "syncing," so I waited until that finished and said Ready. From that point forward I have a better sense for my specific steps and the consequences were.

I started Akonadi Control (with kontact not running) and then restarted the akonadi server. This produced two resources labeled "Local Folders" with status Ready. Restarting a second time, without launching kontact, kept it at 2 (it did not go to 3).

Then, I tried starting kontact. For the first time, it did not crash, and I could even send a mail to myself. (yay!) However, there are two "Local Folders" in my list of mailboxes. One with a blue folder icon is empty. The other with some other icon (a computer?) seems to have my mail. "outbox", "sent-mail", and "trash" are not in their usual places near the top, instead they are sorted in alphabetical order, and they have standard folder-icons rather than the custom icons for things like "inbox", "outbox", etc. The new message I sent ended up inside the "new" (empty) Local Folders sent-mail folder, not my old one. I opened the properties on it, and unchecked "Act on new/unread mail in this folder". Then I sent another test message. It still ended up in the new (undesired) resource. I haven't yet dared to download my email, there will be quite a lot waiting and I am concerned it will target the wrong set of folders.

I quit kontact, went back to Akonadi Control, and deleted the resource that was named something like ~/.local/share/akonadi_resource_6 or something. (Not my ".local/share/local-mail" one.) Then I restarted mysql to see if it would created a 2nd resource again. This time it did what it had done at the beginning:  it gave me a startup error, and clicking on the link showed a file with lines like
    InnoDB: Unable to lock .libdata1, error:11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.

I'm going to try logging out and logging back in again, so I'll hit submit here.
Comment 23 Tim Holy 2014-06-09 16:26:15 UTC
Well, in fact just waiting longer and/or stopping mysql made the InnoDB error go away, and now things seem to be mostly working. The worst consequences I've noticed so far are that:

 - My filter rules seem broken. All the old filters exist, but they ask me to specify the target directory. I presume this is a consequence of having gone through a period where certain folders didn't exist. This is a little sad, since I have something like 300 filters.
 - My addressbook settings seem to have been lost. I have an old (from 2012) backup std.vcf file, so I can recover some but not all.

If anyone has tips about getting past these, I'm happy to hear about it.

On the plus side: things seem noticeably faster, I am really looking forward to that.
Comment 24 Unknown 2014-06-10 09:12:58 UTC
As I get something like you, I make a check about the versionnumber auf the packages. And found some bugs. These lead to a lot of bugsby some filterdefinitions also.
Have a look such as:
 starting akonadi_control from a console:
/usr/local/bin/akonadi_control
I got:
 error while loading shared libraries: libboost_program_options.so.1.54.0: cannot open 
shared object file: No such file or directory
If one/some background process(es) don't run, the rest isn't stable.
Comment 25 m.eik michalke 2015-07-11 08:59:18 UTC
this should be reopened.

i'm getting a kmail2 crash with this "Timeout trying to get lock" error message almost daily when kmail2 is launched automatically after login. i have to stop and restart akonadi then and then start kmail manually for it to finally work.

it's going on for weeks now.

this is with kubuntu 14.04 packages (kontact 4.14.2)
Comment 26 Nancy Anthracite 2015-12-23 15:39:26 UTC
(In reply to m.eik michalke from comment #25)
> this should be reopened.
> 
> i'm getting a kmail2 crash with this "Timeout trying to get lock" error
> message almost daily when kmail2 is launched automatically after login. i
> have to stop and restart akonadi then and then start kmail manually for it
> to finally work.
> 
> it's going on for weeks now.
> 
> this is with kubuntu 14.04 packages (kontact 4.14.2)

The exact same thing is true for me.  It forces  me to close kmail but when I restart kmail, it is fine.
Comment 27 David Faure 2016-02-25 07:44:35 UTC
Timeout increased from 10s to 30s, to help with the morning-session-restore case: https://git.reviewboard.kde.org/r/127175/
Comment 28 David Faure 2016-02-25 07:45:52 UTC
*** Bug 288892 has been marked as a duplicate of this bug. ***
Comment 29 David Faure 2016-02-27 10:44:20 UTC
Git commit cdc600992f8d281fe8f5c92f59ea5c303a70bb49 by David Faure.
Committed on 27/02/2016 at 10:44.
Pushed by dfaure into branch 'KDE/4.14'.

Akonadi::SpecialCollectionsRequestJob: increase timeout from 10s to 30s

When KMail is started as part of session restoration, many things are
happening at the same time, and it can happen that another program has
the lock for more than 10 seconds.

This reduces the risk of being greeted in the morning by a suicide note:
"The EMail program encountered a fatal error and will terminate now.
The error was: Timeout trying to get lock"
REVIEW: 127175

M  +1    -1    akonadi/specialcollectionshelperjobs.cpp

http://commits.kde.org/kdepimlibs/cdc600992f8d281fe8f5c92f59ea5c303a70bb49
Comment 30 David Faure 2016-02-27 10:45:31 UTC
Git commit 12f594dc74d4e7169497c7ee2286fdf113d36c5f by David Faure.
Committed on 27/02/2016 at 10:45.
Pushed by dfaure into branch 'Applications/15.12'.

Akonadi::SpecialCollectionsRequestJob: increase timeout from 10s to 30s

When KMail is started as part of session restoration, many things are
happening at the same time, and it can happen that another program has
the lock for more than 10 seconds.

This reduces the risk of being greeted in the morning by a suicide note:
"The EMail program encountered a fatal error and will terminate now.
The error was: Timeout trying to get lock"
REVIEW: 127175

M  +1    -1    akonadi/src/core/jobs/specialcollectionshelperjobs.cpp

http://commits.kde.org/kdepimlibs/12f594dc74d4e7169497c7ee2286fdf113d36c5f
Comment 31 David Faure 2016-02-27 10:46:21 UTC
Git commit 9eca06b50cbd695f1cc586e93bdd26c548608e7d by David Faure.
Committed on 27/02/2016 at 10:46.
Pushed by dfaure into branch 'master'.

Akonadi::SpecialCollectionsRequestJob: increase timeout from 10s to 30s

When KMail is started as part of session restoration, many things are
happening at the same time, and it can happen that another program has
the lock for more than 10 seconds.

This reduces the risk of being greeted in the morning by a suicide note:
"The EMail program encountered a fatal error and will terminate now.
The error was: Timeout trying to get lock"
REVIEW: 127175

M  +1    -1    src/core/jobs/specialcollectionshelperjobs.cpp

http://commits.kde.org/akonadi/9eca06b50cbd695f1cc586e93bdd26c548608e7d
Comment 32 Nancy Anthracite 2016-02-28 00:33:00 UTC
Is there a way a user can add this fix in a config file or something like that?
Comment 33 David Faure 2016-02-28 12:35:13 UTC
Nope, it's in the code. You can however rebuild your distro package with a patch added.

On rpm-based distros it's as easy as installing the source package (e.g. zypper si kdepim), adding a patch in the .spec file, then rpm -ba kdepim.spec.

For deb-based distros I find it a bit more involved, but doable still. I bookmarked https://wiki.ubuntu.com/UbuntuPackagingGuide/BuildFromDebdiff
http://www.debian.org/doc/manuals/apt-howto/ch-sourcehandling.en.html

I won't provide assistance on this though, it's not really my area and there are plenty more resources on the internet on this topic.
Comment 34 Eric 2016-04-23 02:23:25 UTC
For the past few months, Kmail keep doing that. In fact, since the first day I gave Kmail a try I've had different problems with it. It's unfriendly and take up so much storage space !
Anyway, when I start it it keep saying that error message,
I close it, reopen it, and then it kinda work, at least it doesn't repeat the same error message, it just work badly, like not filtering incoming messages, or freezing on refreshing an imap account, etc ...
I have 7 main email addresses in 7 imap account, with all the aliases, and all including local folder are simlinked to a separate drive.

I've zypper kdepim just now, and it says:
Problem: kdepim-15.12.3-18.5.src requires kalarmcal-devel, but this requirement cannot be provided
So I zypper Kalarmcal and it says:
Problem: kalarmcal-15.12.3-15.1.src requires libKF5AkonadiPrivate-devel >= 1.72.43, but this requirement cannot be provided
So I zypper si libKF5AkonadiPrivate-devel and it says:
The following 73 NEW packages are going to be installed:
  Mesa-libEGL-devel Mesa-libGL-devel boost-devel cmake damageproto-devel extra-cmake-modules fixesproto-devel gcc gcc-c++ gcc48 gcc48-c++
  glibc-devel kbproto-devel kf5-filesystem libQt5Core-devel libQt5DBus-devel libQt5Gui-devel libQt5Network-devel libQt5Sql-devel
  libQt5Test-devel libQt5Widgets-devel libQt5Xml-devel libX11-devel libXau-devel libXdamage-devel libXext-devel libXfixes-devel
  libXxf86vm-devel libasan0 libatomic1 libboost_atomic1_54_0 libboost_chrono1_54_0 libboost_graph1_54_0 libboost_graph_parallel1_54_0
  libboost_locale1_54_0 libboost_log1_54_0 libboost_math1_54_0 libboost_mpi1_54_0 libboost_python1_54_0 libboost_random1_54_0
  libboost_regex1_54_0 libboost_serialization1_54_0 libboost_signals1_54_0 libboost_test1_54_0 libboost_timer1_54_0 libboost_wave1_54_0
  libdrm-devel libecpg6 libibverbs1 libitm1 libpq5 libqt5-qtbase-common-devel libstdc++-devel libstdc++48-devel libtsan0 libxcb-devel
  libxcb-res0 libxcb-screensaver0 libxcb-xevie0 libxcb-xf86dri0 libxcb-xinerama0 libxcb-xprint0 libxcb-xtest0 libxcb-xvmc0
  libxshmfence-devel linux-glibc-devel openmpi-libs postgresql94-devel pthread-stubs-devel sqlite3-devel xextproto-devel
  xf86vidmodeproto-devel xproto-devel

The following source package is going to be installed:
  akonadi-server

73 new packages to install, 1 source package.

Hopefully that will solve it all !!
Eric
Comment 35 Eric 2016-04-23 02:39:12 UTC
After the 73 new packages to install, 1 source package.
It keep telling me that I need to
Package 'libKF5AkonadiPrivate-devel' has source package 'akonadi-server'.
Resolving package dependencies...

The following source package is going to be installed:
  akonadi-server

1 source package to install.

I'm not even sure how my Kmail have been working so far, even if so-so ?