From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: michaelawells Newsgroups: gmane.lisp.guile.bugs Subject: Re: possible gc/weak hash table bug Date: Thu, 17 Mar 2011 19:09:17 -0500 Message-ID: <2A90EE37-595C-40D2-9EFC-E4E166F94CE2@gmail.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1300432609 17632 80.91.229.12 (18 Mar 2011 07:16:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 18 Mar 2011 07:16:49 +0000 (UTC) Cc: bug-guile@gnu.org To: Andy Wingo Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Fri Mar 18 08:16:45 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 1Q0TvQ-0004e1-Lf for guile-bugs@m.gmane.org; Fri, 18 Mar 2011 08:16:45 +0100 Original-Received: from localhost ([127.0.0.1]:51054 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0TvQ-0002z8-88 for guile-bugs@m.gmane.org; Fri, 18 Mar 2011 03:16:44 -0400 Original-Received: from [140.186.70.92] (port=52673 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0NFr-0006tC-Rn for bug-guile@gnu.org; Thu, 17 Mar 2011 20:09:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0NFq-0007Zd-LN for bug-guile@gnu.org; Thu, 17 Mar 2011 20:09:23 -0400 Original-Received: from mail-iy0-f169.google.com ([209.85.210.169]:45504) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0NFq-0007ZV-Bx for bug-guile@gnu.org; Thu, 17 Mar 2011 20:09:22 -0400 Original-Received: by iyf13 with SMTP id 13so4228193iyf.0 for ; Thu, 17 Mar 2011 17:09:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to:x-mailer; bh=4s4BLVUd59fM2l1D+UnxRZR/pO2057P85oKPbMGiGJo=; b=f0oc5zAMurUaSoNX7rtnp0nX6ZPCaVeKuC+kODKhD424Os25MBksAxBnDyofaorSvZ /ZCi5rYLcZoOvtZp2mT448CYN0MSXr+jn2ruQIrpyuXYD+nAIx48DxD/LzYWID4QnnIm zeoEYuq868OZL1dVC1SWgxSL3NoJ4OBiHCm+0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=s3wpLNpEr+WKd5mZ4dqfUI1KPoUB2PUL8oe36UC7Gvd8qJwoxg1Dp3YdA5KG+8MlbS THyt2Rb/XcTEZCnMFs1XTwyWFRkDAFltSWlwPFFr4c3rUk9PY3fpokF/I1JXtbBOhGYq P12Pz+DVext1ftpfVpkimx+pFCweTBB4SjMOQ= Original-Received: by 10.42.147.9 with SMTP id l9mr500803icv.476.1300406961085; Thu, 17 Mar 2011 17:09:21 -0700 (PDT) Original-Received: from [192.168.2.104] (adsl-99-11-51-29.dsl.chcgil.sbcglobal.net [99.11.51.29]) by mx.google.com with ESMTPS id i20sm924334iby.48.2011.03.17.17.09.19 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 17 Mar 2011 17:09:19 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.1082) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.169 X-Mailman-Approved-At: Fri, 18 Mar 2011 03:16:33 -0400 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:5337 Archived-At: As requested, I'm posting this to bug-guile@gnu.org. I'm now seeing this assertion failure, using a guile development = snapshot (guile-2.0.0.104-f5fc7): > dpm.linux: hashtab.c:136: vacuum_weak_hash_table: Assertion `removed = <=3D len' failed. > static void > vacuum_weak_hash_table (SCM table) > { > SCM buckets =3D SCM_HASHTABLE_VECTOR (table); > unsigned long k =3D SCM_SIMPLE_VECTOR_LENGTH (buckets); > 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); > len -=3D removed; > SCM_SIMPLE_VECTOR_SET (buckets, k, alist); > } >=20 > SCM_SET_HASHTABLE_N_ITEMS (table, len); > } >=20 Unfortunately, this problem is infrequent and intermittent. In my case, = it happened in 10 out of 1000 runs. =20 Currently, I don't know of a way to reproduce the problem. On Mar 17, 2011, at 4:43 AM, Andy Wingo wrote: > Hi Michael, >=20 > Thanks for the report. In the future, please copy bug-guile@gnu.org; = it > doesn't hurt. >=20 > On Thu 17 Mar 2011 00:56, michaelawells = writes: >=20 >> hashtab.c:203: weak_bucket_assoc: Assertion `(((scm_t_hashtable *) >> ((((scm_t_bits) (0? (*(SCM*)0=3D((((SCM *)((scm_t_cell *) = (((scm_t_bits) >> (0? (*(SCM*)0=3D((((table))))): (((table)))))))) [((2))]))): (((SCM >> *)((scm_t_cell *) (((scm_t_bits) (0? (*(SCM*)0=3D((((table))))): >> (((table)))))))) [((2))]))))))->n_items) >=3D args.removed_items' >> failed. >>=20 >> Did you ever see this assertion fail? =20 >=20 > No I didn't, and that bothers me a little. >=20 >> I tried using a development snapshot (guile-2.0.0.104-f5fc7). When I >> use this snapshot, I do not see this problem. >=20 > There were certainly some bugs fixed. Let's assume that it's fixed in > git, and in the upcoming 2.0.1 (should be a week or so). There are > still some lingering issues with weak hash tables, but we are working = on > them; and certainly no crashes that we know of. >=20 > Have fun with Guile, >=20 > Andy > --=20 > http://wingolog.org/