claws-mail deadlocking in iconv

Maciej Suszko maciej at suszko.eu
Thu Oct 10 19:37:55 UTC 2013


Fabian Keil <freebsd-listen at fabiankeil.de> wrote:
> After the iconv import claws-mail started to deadlock in iconv every
> now and then on my system, which prevented claws-mail from rendering
> windows or reacting to input.
> 
> So far I haven't been able to reproduce this intentionally and various
> rebuilds of ports, kernel and userland (mainly for other reasons) had
> no effect.
> 
> When the problem occurs, trying to attach to the process causes
> gdb and gdb76 to crash which also crashes claws-mail, but sending
> SIGABRT causes a proper core dump that can be analysed with gdb.
> 
> The backtraces always show that there is only one thread running and
> it's trying to lock cm_lock in _citrus_mapper_close(), which
> apparently is already locked due to a _citrus_mapper_close()
> recursion. Examples:

[...]

> This patch:
> http://www.fabiankeil.de/sourcecode/freebsd/iconv-Let-_citrus_mapper_close-unlock-cm_lock-before-calli.diff
> seems to prevent the deadlock, but I'm not 100% sure that it's
> correct and I'm also a bit surprised by the lack of reports from
> other claws-mail users.
> 
> Did anyone else run into this or can comment on the patch or
> the backtraces?


In my case Claws Mail was hanging everytime I tried to access one of
my bigger IMAP folders (50k+ messages). It was 100% reproducible.

The patch seems to solve the problem for me - Claws is running now
smooth, without any locks.
-- 
regards, Maciej Suszko.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20131010/76e7138c/attachment.sig>


More information about the freebsd-current mailing list