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] pthreads and libgc Date: Fri, 25 Mar 2011 15:48:11 +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 1301064500 18094 80.91.229.12 (25 Mar 2011 14:48:20 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 25 Mar 2011 14:48:20 +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 Fri Mar 25 15:48:15 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 1Q38JA-0005i1-Nc for guile-bugs@m.gmane.org; Fri, 25 Mar 2011 15:48:13 +0100 Original-Received: from localhost ([127.0.0.1]:39025 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q38J9-0003BU-Ia for guile-bugs@m.gmane.org; Fri, 25 Mar 2011 10:48:11 -0400 Original-Received: from [140.186.70.92] (port=51477 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q38Iz-0003A8-4Y for bug-guile@gnu.org; Fri, 25 Mar 2011 10:48:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q38Ix-0005e3-Tj for bug-guile@gnu.org; Fri, 25 Mar 2011 10:48:00 -0400 Original-Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:34731 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q38Ix-0005dy-RT for bug-guile@gnu.org; Fri, 25 Mar 2011 10:47:59 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 55E034E2A; Fri, 25 Mar 2011 10:49:41 -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=OTyz+5BRBDQDgny7jW7NaOKqACw=; b=SfTe1v zMRSsEvunv5N8HT01t9sRbQ1qddLsJq9G8V5BYDjepP8DuZs+D38qFilxkbk0wJ3 J8zdXjYGLxkSAo/rwEtlvPg9OVIKCHykGlWPTRR0b6wnTPqrSpKc6TmOA4ePq4dR iYsczi2NAC/cDxIfQrQUK0bLhghAjnP7GPZ6Y= 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=Ku4zTc7SdLF1uToYY14WaHy1N7NYVUU+ dumxi2DQpXKDckde3F1d82aGbZz8q/YoOH/YA2sDAs6GvnpHaD8SIBrb9gGPvo1Q p1FzyjvDVjoWLR42cQhvqL1ltUPcRf9FzCxHEZevqmwzUgpxzKSF21Thf4d3UsoA 3U2jCCbqFTs= 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 33A754E29; Fri, 25 Mar 2011 10:49:38 -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 596F44E28; Fri, 25 Mar 2011 10:49:35 -0400 (EDT) In-Reply-To: (Ivan Maidanski's message of "Sun, 20 Mar 2011 13:45:12 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: 1B97DBF8-56EF-11E0-A505-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:5368 gmane.comp.programming.garbage-collection.boehmgc:4442 Archived-At: Greets, On Sun 20 Mar 2011 11:45, Ivan Maidanski writes: > If you already care about threads registering then you can compile your > app with -D GC_NO_THREAD_REDIRECTS (thus avoiding GC initialization in > response to a pthread_create). Thanks for the pointer. We were mistakenly redirecting pthread functions not only in libguile, but also for our users. I have fixed that, and that helps this issue. In addition, we were not calling GC_allow_register_threads(). I changed to do so, and now the code in the original report (both with and without GC_INIT in the main thread) works. However it is now leaking memory. I cannot reproduce the issue with just libgc though, so it must be a Guile problem. Thanks for the help! Andy -- http://wingolog.org/