From owner-freebsd-current@FreeBSD.ORG Thu Oct 10 19:37:55 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7BE316A1 for ; Thu, 10 Oct 2013 19:37:55 +0000 (UTC) (envelope-from maciej@suszko.eu) Received: from archeo.suszko.eu (archeo.unixguru.pl [IPv6:2001:41d0:1:f47a::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3AF442700 for ; Thu, 10 Oct 2013 19:37:54 +0000 (UTC) Received: from archeo (localhost [127.0.0.1]) by archeo.suszko.eu (Postfix) with ESMTP id 538D0206381C; Thu, 10 Oct 2013 21:37:45 +0200 (CEST) X-Virus-Scanned: amavisd-new at archeo.local Received: from archeo.suszko.eu ([127.0.0.1]) by archeo (archeo.local [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id U4Z_-qMTgXIP; Thu, 10 Oct 2013 21:37:45 +0200 (CEST) Received: from arsenic (89-79-234-160.dynamic.chello.pl [89.79.234.160]) by archeo.suszko.eu (Postfix) with ESMTPSA id A9518206381B; Thu, 10 Oct 2013 21:37:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=suszko.eu; s=dkim; t=1381433864; bh=Qk2TVskY2g4ovrzisSXiju3Tsr8+8GvlX9NdZ8+FIHQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=PQHO6y93Ufrp/S9qKTCjw0RiCnWnIF1gZWH6Csy6/a4pOjSHqkCyde5ilrMnh6lLn m+X9T4mWg1y8N6kTDWTiG2QKgCcSzZz0KpxrlEuQ+h5cSs0OdqkAYfHMIc/73gCpyo 2ZmVGc1FOOwh8v/9TqAlTfuxYFD4FIOM6adFQm3I= Date: Thu, 10 Oct 2013 21:37:39 +0200 From: Maciej Suszko To: Fabian Keil Subject: Re: claws-mail deadlocking in iconv Message-ID: <20131010213739.19272554@arsenic> In-Reply-To: <73d40037.635a97ef@fabiankeil.de> References: <73d40037.635a97ef@fabiankeil.de> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.19; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/=f7XmLIyPcMGNb83o0DAfL3"; protocol="application/pgp-signature" Cc: FreeBSD Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Oct 2013 19:37:55 -0000 --Sig_/=f7XmLIyPcMGNb83o0DAfL3 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Fabian Keil 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. >=20 > 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. >=20 > 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. >=20 > 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_clos= e-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. >=20 > 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. --=20 regards, Maciej Suszko. --Sig_/=f7XmLIyPcMGNb83o0DAfL3 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iEYEARECAAYFAlJXAgcACgkQCikUk0l7iGrGCQCdGKNj7YMGqLuNKmB65RXaA8FA 7LwAn1SgDZgmNcE0QOjAxYDqBc0EsSt+ =fg2I -----END PGP SIGNATURE----- --Sig_/=f7XmLIyPcMGNb83o0DAfL3--