Re: Patch: imap idle loops stop_idle_connect_lock while it cannot get the lock
- From: Philip Van Hoof <spam pvanhoof be>
- To: José Dapena Paz <jdapena igalia com>
- Cc: tinymail-devel-list <tinymail-devel-list gnome org>
- Subject: Re: Patch: imap idle loops stop_idle_connect_lock while it cannot get the lock
- Date: Thu, 08 Jan 2009 19:56:05 +0100
Approved
On Thu, 2009-01-08 at 19:31 +0100, José Dapena Paz wrote:
> Hi,
>
> This patch should fix a deathlock in IMAP IDLE code. This happens
> mainly on move to operation.
>
> Description of the problem:
> * We have two IMAP IDLE accounts, A and B.
> * We move a folder from account A to account B. This operation occurs
> in the thread of the camel queue for account A.
> * In the same time, camel queue of account B is doing operations (for
> example a poke status).
>
> Ok, in this case we have the camel queues for accounts A and B trying
> to stop the IDLE and get the connection lock. This operation can easily
> cause deathlocks.
>
> To avoid this, we add an active wait (with usleep) for tryint to get
> the lock. This avoids this race condition.
>
> Changelog entry:
> * libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c:
> now *_stop_idle_connect_lock loops if it cannot get the connect lock
> to avoid interlocks if two concurrent threads try to get the lock.
>
> _______________________________________________
> tinymail-devel-list mailing list
> tinymail-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/tinymail-devel-list
--
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
http://pvanhoof.be/blog
http://codeminded.be
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]