From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs,gmane.comp.programming.garbage-collection.boehmgc Subject: Re: [Gc] further pthread foo Date: Sun, 20 Mar 2011 00:34:30 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1300577682 22523 80.91.229.12 (19 Mar 2011 23:34:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 19 Mar 2011 23:34:42 +0000 (UTC) Cc: bug-guile , gc@linux.hpl.hp.com To: Ivan Maidanski Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sun Mar 20 00:34:38 2011 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q15fH-0000Ol-Tc for guile-bugs@m.gmane.org; Sun, 20 Mar 2011 00:34:36 +0100 Original-Received: from localhost ([127.0.0.1]:34229 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q15fH-0006pl-5L for guile-bugs@m.gmane.org; Sat, 19 Mar 2011 19:34:35 -0400 Original-Received: from [140.186.70.92] (port=56669 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q15f8-0006ox-UL for bug-guile@gnu.org; Sat, 19 Mar 2011 19:34:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q15f7-0001cT-Mj for bug-guile@gnu.org; Sat, 19 Mar 2011 19:34:26 -0400 Original-Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:62404 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q15f7-0001cN-KE for bug-guile@gnu.org; Sat, 19 Mar 2011 19:34:25 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 2A0DF4D45; Sat, 19 Mar 2011 19:36:01 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=17mmtFAQVWNWYTfnlv/LXSEVGKs=; b=p40BjE sdoIbEY8g2/yFZmZ+nUlCu0pFgXgab6+jWQqKxNpfUxR/XA7XWxhwAamOGyrTa8a HO6uBhph9tzw8yarZqpsiFte6tN3zFPIjfbJBciEMAseDTWvsXqVbtF7UzYYlnQ/ WBzte7g5DcekkgFZ7/qaer1LWZSmdBrOB3kZU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=eyzEDjfRKzpklmqBtmlwTwQGbGMJProB kfBtkhwNNcUTBObRsbMPdc3aD4wqJUeObWGBlLvmgkbw1GAbt6BKfNWDHVodCqeP Bh5H0v7XIhxRW9pPkm4ysnjsgvleJfqoXg48s9cI/pJZt5V/xx/WAHAS7l+OafOh xcs8k72zr1k= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 022D24D42; Sat, 19 Mar 2011 19:35:57 -0400 (EDT) Original-Received: from unquote.localdomain (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 2E9E54D3F; Sat, 19 Mar 2011 19:35:54 -0400 (EDT) In-Reply-To: (Ivan Maidanski's message of "Sun, 20 Mar 2011 00:25:52 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: A4246C4C-5281-11E0-B04B-E8AB60295C12-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 64.74.157.62 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:5348 gmane.comp.programming.garbage-collection.boehmgc:4438 Archived-At: Hi Ivan, On Sat 19 Mar 2011 22:25, Ivan Maidanski writes: > Try to compile libgc with -DGC_ASSERTIONS but without > -DTHREAD_LOCAL_ALLOC -DPARALLEL_MARK. OK, will do. Thanks for the suggestion, and sorry for the burden. You must get the worst bugs! > BTW. Why do you use GC_call_with_gc_active()? It should be no-op in your > case - the thread is stopped and scanned after you call > GC_register_my_thread. (GC_call_with_gc_active is used primarily inside > GC_do_blocking calls). We have scm_with_guile and scm_without_guile, which invoke a procedure in and out of Guile mode. scm_with_guile nests as you would think it would, and scm_without_guile can only be called in Guile mode. If a thread is not in Guile mode, it shouldn't be active for GC purposes -- shouldn't be in the thread set to stop -- so it goes through a do_blocking. scm_with_guile therefore goes through a GC_call_with_gc_active, even in the case that it's not in the extent of a GC_do_blocking context call. So yes, it's a no-op, and harmles in this case. Regards, Andy -- http://wingolog.org/