From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: Trouble joining with threads from C Date: Mon, 25 Apr 2011 16:49:10 +0200 Message-ID: <87tydmjsih.fsf@gnu.org> References: <87y64rzd5p.fsf@netris.org> <8762rswzzf.fsf@netris.org> <87vczdqtdx.fsf@gnu.org> <87ipuhzvvk.fsf@gnu.org> <877haxzvh6.fsf@gnu.org> <87vcy2mo8j.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1303742966 10194 80.91.229.12 (25 Apr 2011 14:49:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 25 Apr 2011 14:49:26 +0000 (UTC) Cc: guile-devel@gnu.org To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Apr 25 16:49:22 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QEN6H-0008OY-G6 for guile-devel@m.gmane.org; Mon, 25 Apr 2011 16:49:21 +0200 Original-Received: from localhost ([::1]:49973 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEN6G-0002xB-JN for guile-devel@m.gmane.org; Mon, 25 Apr 2011 10:49:20 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:45513) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEN6E-0002x6-CB for guile-devel@gnu.org; Mon, 25 Apr 2011 10:49:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QEN6D-0000Mr-1z for guile-devel@gnu.org; Mon, 25 Apr 2011 10:49:18 -0400 Original-Received: from solo.fdn.fr ([80.67.169.19]:56493) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEN6C-0000Mg-Ty for guile-devel@gnu.org; Mon, 25 Apr 2011 10:49:17 -0400 Original-Received: from nixey (reverse-83.fdn.fr [80.67.176.83]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) (Authenticated sender: lcourtes) by smtp.fdn.fr (Postfix) with ESMTPSA id 6DA164444F; Mon, 25 Apr 2011 16:49:13 +0200 (CEST) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 6 =?iso-8859-1?Q?Flor=E9al?= an 219 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: (Andy Wingo's message of "Mon, 25 Apr 2011 16:19:40 +0200") User-Agent: Gnus/5.110015 (No Gnus v0.15) Emacs/23.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 80.67.169.19 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:12344 Archived-At: Hello! Andy Wingo writes: > On Mon 25 Apr 2011 15:53, ludo@gnu.org (Ludovic Court=C3=A8s) writes: [...] >> Currently they all pass, but =E2=80=98test-scm-spawn-thread=E2=80=99 hit= s a libgc >> assertion failure (=E2=80=9CDuplicate large block deallocation=E2=80=9D)= once every 5 >> runs or so: > > I guess we disable this one then? > > That code always seemed a little fishy to me: > > /* Ensure the signal handling thread has been launched, because we migh= t be > shutting it down. */ > scm_i_ensure_signal_delivery_thread (); > > Perhaps we can avoid spawning a thread in the key destructor. I apparently found a fix: calling =E2=80=98scm_i_ensure_signal_delivery_thr= ead=E2=80=99 in Guile mode. I *think* the stack of =E2=80=98GC_pthread_create=E2=80=99 wasn=E2=80=99t s= canned, so the area pointed to by its variable =E2=80=98si=E2=80=99 would be reclaimed before t= he function completes, leading to the =E2=80=9Cduplicate deallocation=E2=80=9D error. Pfffeww. Thanks, Ludo=E2=80=99.