From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.devel Subject: (no subject) Date: Wed, 30 Sep 2009 21:59:49 +0100 Message-ID: <87tyykw3lm.fsf@ossau.uklinux.net> References: <0489FB6F-567B-4967-9703-1A3D89462A37@raeburn.org> <79F7A852-10ED-46DF-9D41-ED545493E8FE@raeburn.org> <87pr9dpgfw.fsf@gnu.org> <871vlr6l2p.fsf@ossau.uklinux.net> <87k4zi6h3q.fsf@gnu.org> <87eipqn12l.fsf@ossau.uklinux.net> <87eipqzmdr.fsf_-_@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1261399823 27911 80.91.229.12 (21 Dec 2009 12:50:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Dec 2009 12:50:23 +0000 (UTC) Cc: guile-devel@gnu.org To: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=), Ken Raeburn Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Dec 21 13:50:13 2009 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NMhh0-0008W2-IY for guile-devel@m.gmane.org; Mon, 21 Dec 2009 13:48:54 +0100 Original-Received: from localhost ([127.0.0.1]:44115 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NMhh0-00059t-68 for guile-devel@m.gmane.org; Mon, 21 Dec 2009 07:48:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mt6Iy-0003We-Gq for guile-devel@gnu.org; Wed, 30 Sep 2009 17:01:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mt6It-0003Tt-Me for guile-devel@gnu.org; Wed, 30 Sep 2009 17:01:44 -0400 Original-Received: from [199.232.76.173] (port=50894 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mt6It-0003TW-BG for guile-devel@gnu.org; Wed, 30 Sep 2009 17:01:39 -0400 Original-Received: from mail3.uklinux.net ([80.84.72.33]:45986) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mt6Io-0007BG-CD; Wed, 30 Sep 2009 17:01:34 -0400 Original-Received: from arudy (host86-145-159-48.range86-145.btcentralplus.com [86.145.159.48]) by mail3.uklinux.net (Postfix) with ESMTP id 864EE1F69DD; Wed, 30 Sep 2009 22:00:56 +0100 (BST) Original-Received: from arudy (arudy [127.0.0.1]) by arudy (Postfix) with ESMTP id 0452238021; Wed, 30 Sep 2009 21:59:49 +0100 (BST) In-Reply-To: <87eipqzmdr.fsf_-_@gnu.org> ("Ludovic =?iso-8859-1?Q?Court=E8?= =?iso-8859-1?Q?s=22's?= message of "Tue, 29 Sep 2009 01:21:20 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:9778 Archived-At: ludo@gnu.org (Ludovic Court=E8s) writes: > I should have mentioned this one: > http://thread.gmane.org/gmane.comp.programming.garbage-collection.boehmgc= /3185 . > > This is normally somewhat fixed in current BDW-GC CVS, but Guile itself > may have troubles of its own dealing with cancellation. Thanks. I thought already about cancellation, but I couldn't see anything in the test program that would do that. Do you know of anything in that program, or in BDW-GC, that does a pthread_cancel? > The critical section issue should be orthogonal, though. Yes. > Here it is: Thanks, and thanks to Ken also. I've cherry-picked the following branch_release-1-8 fixes. commit 499c43b03225abb8d3af9087b7630d523b74e13a Author: Neil Jerram Date: Thu Mar 5 20:03:33 2009 +0000 Avoid throw from critical section, given invalid sigaction call (This is for a different critical section problem, but which still occurs (prior to this commit) in master.) commit 3009b5d557e1ebfd828fd0de9b1da5abb2f6ec9a Author: Neil Jerram Date: Tue Mar 10 23:55:31 2009 +0000 Fix spurious `throw from within critical section' errors (This is the commit that I hope will fix the errors that you're seeing.) Can you see how the test runs now? Also, can I check my thinking on one other fix, and how it interacts with BDW-GC? commit 2bfcaf2605f8366d8c708c148bde5313b88497e0 Author: Neil Jerram Date: Wed Mar 4 23:45:11 2009 +0000 Lock ordering: don't allocate when in critical section (scm_sigaction_f= or_thread) With BDW-GC I believe that allocation in a critical section is no longer a problem, specifically because - the stop-the-world mechanism uses signals and sigsuspend - whereas Guile GC used mutexes - and hence there are no concerns about lock ordering - it doesn't matter if there are threads waiting for the critical section when a GC happens, because the signal mechanism will still interrupt them. Is that right? Thanks! Neil