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 Subject: Re: possible gc/weak hash table bug Date: Thu, 28 Apr 2011 11:52:46 +0200 Message-ID: References: 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 1303992993 17261 80.91.229.12 (28 Apr 2011 12:16:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 28 Apr 2011 12:16:33 +0000 (UTC) Cc: bug-guile@gnu.org To: michaelawells Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Apr 28 14:16:28 2011 Return-path: Envelope-to: guile-bugs@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 1QFQ8x-000538-NO for guile-bugs@m.gmane.org; Thu, 28 Apr 2011 14:16:27 +0200 Original-Received: from localhost ([::1]:42433 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFQ8x-000061-60 for guile-bugs@m.gmane.org; Thu, 28 Apr 2011 08:16:27 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:51665) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFQ8r-0008Ti-Qd for bug-guile@gnu.org; Thu, 28 Apr 2011 08:16:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QFQ8p-0004hN-I4 for bug-guile@gnu.org; Thu, 28 Apr 2011 08:16:21 -0400 Original-Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:41426 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFQ8p-0004h5-EE for bug-guile@gnu.org; Thu, 28 Apr 2011 08:16:19 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 5BD404476; Thu, 28 Apr 2011 08:18:02 -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:content-transfer-encoding; s=sasl; bh=yfevv1E0ffZv rzP5Qvlhzp5Lb3A=; b=fzF32fRJZLeXGKoFTvYkW4/qzi/Fcj+IflbPODCzufQV Kua8XmdPHz7zu/dz5X8mxoGBanrhbxdh2HaVWz5XfsXz0up/1z8mpFFPDA7QPP5Z 2O8DddSpKXBRLHmcwEDwHAqlpnlfvIR0bxH/TCv1rkoUVwSD+5eSyV/5FYHkxM8= 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:content-transfer-encoding; q=dns; s=sasl; b=uZZ/pL C4wXOpLkLh5RVK1f+aGgTsCYpQqgf+41qIp0uPv4hKIW9eDII44GpBUItHpu0Jz7 tckJEivkt/BhRxSrQS+OgHfTjeB1yi7jTXaEMPHu4QB5SYH4E9xKHGIo65CK1BWg VQJ50lBYmrJj7gRAXbSMFSqs4Z6zEHWkq6O8o= 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 43A914475; Thu, 28 Apr 2011 08:18:00 -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 6CBB84473; Thu, 28 Apr 2011 08:17:58 -0400 (EDT) In-Reply-To: (michaelawells@gmail.com's message of "Fri, 25 Mar 2011 16:48:19 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: 8ED05C5A-7191-11E0-B896-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.14 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:5531 Archived-At: Hi Michael, On Fri 25 Mar 2011 22:48, michaelawells writes: > On Fri 18 Mar 2011 12:51, address@hidden (Ludovic Court=C3=83s) write= s: >=20=20=20=20=20 > > michaelawells writes: > > > >>> size_t len =3D SCM_HASHTABLE_N_ITEMS (table); > >>>=20 > >>> while (k--) > >>> { > >>> size_t removed; > >>> SCM alist =3D SCM_SIMPLE_VECTOR_REF (buckets, k); > >>> alist =3D scm_fixup_weak_alist (alist, &removed); <<<**** = FAILS HERE > >>> assert (removed <=3D len); > > > Michael, how are you using this hash table? Are you accessing it from > different pthreads? What version of libgc are you using? (Did you > enable parallel collection?) >=20=20=20=20=20 > I'm not using weak hash tables in my code. Weak hash tables are used > in modules such as (ice-9 boot-9) and (ice-9 popen), and from C code, > such as libguile/symbols.c. > > I'm using gc-7.1. I didn't use any special options when building > libgc. I'll try rebuilding libgc using the "--enable-threads=3Dposix" > configure option and see if I still see the problem. (Is that what > you meant by enabling parallel collection? If so, perhaps the README > file should updated to say this is necessary.) I referred to an option of libgc called "parallel marking", which you have to enable when you build libgc. I'm assuming you did not enable it. (What platform are you on? I suspect that we have not tested all of the possible gentoo configurations, for example.) You can find this out by calling GC_get_parallel() once guile is initialized. The --enable-threads=3Dposix is indeed the default, and makes Guile threadsafe and adds support for threads within Guile. > I'm not using guile from multiple threads, but I am running guile from > a thread in a multi-threaded program. (I've been using guile since > before it had support for multiple threads. So, I constructed the > test harness so that guile is called from a single thread.) OK, this is good. Can you test again with 2.0.1?=20=20 Cheers, Andy --=20 http://wingolog.org/