From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.bugs Subject: bug#28590: Weak tables in 2.2.2 grow indefinitely Date: Mon, 25 Sep 2017 10:49:13 +0200 Message-ID: <87poafkvsm.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1506329416 29815 195.159.176.226 (25 Sep 2017 08:50:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 25 Sep 2017 08:50:16 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) To: 28590@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Sep 25 10:50:12 2017 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwP5e-0007Lw-0J for guile-bugs@m.gmane.org; Mon, 25 Sep 2017 10:50:10 +0200 Original-Received: from localhost ([::1]:41319 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwP5j-00044D-MP for guile-bugs@m.gmane.org; Mon, 25 Sep 2017 04:50:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51692) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwP5Z-0003wl-CZ for bug-guile@gnu.org; Mon, 25 Sep 2017 04:50:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwP5W-0007IV-38 for bug-guile@gnu.org; Mon, 25 Sep 2017 04:50:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48565) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dwP5V-0007IR-WF for bug-guile@gnu.org; Mon, 25 Sep 2017 04:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dwP5V-0008CM-Pz for bug-guile@gnu.org; Mon, 25 Sep 2017 04:50:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 25 Sep 2017 08:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 28590 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.150632936931470 (code B ref -1); Mon, 25 Sep 2017 08:50:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Sep 2017 08:49:29 +0000 Original-Received: from localhost ([127.0.0.1]:57246 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwP4y-0008BW-Vo for submit@debbugs.gnu.org; Mon, 25 Sep 2017 04:49:29 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwP4x-0008BJ-BN for submit@debbugs.gnu.org; Mon, 25 Sep 2017 04:49:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwP4r-0006wL-F0 for submit@debbugs.gnu.org; Mon, 25 Sep 2017 04:49:22 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:33424) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dwP4r-0006wA-CY for submit@debbugs.gnu.org; Mon, 25 Sep 2017 04:49:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51456) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwP4q-0003Wu-AY for bug-guile@gnu.org; Mon, 25 Sep 2017 04:49:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwP4n-0006u5-21 for bug-guile@gnu.org; Mon, 25 Sep 2017 04:49:20 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34829) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwP4m-0006tt-Vh for bug-guile@gnu.org; Mon, 25 Sep 2017 04:49:17 -0400 Original-Received: from [193.50.110.164] (port=33444 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dwP4m-0003vz-G1 for bug-guile@gnu.org; Mon, 25 Sep 2017 04:49:16 -0400 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 4 =?UTF-8?Q?Vend=C3=A9miaire?= an 226 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org 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" Xref: news.gmane.org gmane.lisp.guile.bugs:8838 Archived-At: Consider this program: --8<---------------cut here---------------start------------->8--- (use-modules (ice-9 format)) (define loops 3000000) (define table (make-weak-key-hash-table)) (let loop ((i loops)) (unless #f ;(zero? i) (when (zero? (modulo i 100000)) (format #t "heap-size: ~,2h MiB table: ~s~%" (/ (assoc-ref (gc-stats) 'heap-size) (expt 2. 20)) table)) (hashq-set! table (cons 1 2) #t) (loop (1- i)))) --8<---------------cut here---------------end--------------->8--- On 2.0.14, the heap size stays at around 24=C2=A0MiB, and the table size is stable at 224,717 buckets (?). On 2.2.2, the heap grows indefinitely (though logarithmically). It=E2=80= =99s not deterministic though: sometimes the heap size stabilizes in the 140=E2=80=93300=C2=A0MiB range, and sometimes it keeps growing endlessly ev= en though the table size reaches a maxium at 7,190,537 entries. Ludo=E2=80=99.