From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Newsgroups: gmane.lisp.guile.bugs Subject: bug#40194: Weak sets keep growing Date: Mon, 23 Mar 2020 22:57:33 +0100 Message-ID: <87y2rqpwdu.fsf@gnu.org> References: <87h7yfqho5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="42656"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) To: 40194@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Mon Mar 23 22:58:09 2020 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jGV5E-000AxV-5a for guile-bugs@m.gmane-mx.org; Mon, 23 Mar 2020 22:58:08 +0100 Original-Received: from localhost ([::1]:40116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGV5D-0005g4-7K for guile-bugs@m.gmane-mx.org; Mon, 23 Mar 2020 17:58:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40451) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGV59-0005fx-3f for bug-guile@gnu.org; Mon, 23 Mar 2020 17:58:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jGV58-000599-5g for bug-guile@gnu.org; Mon, 23 Mar 2020 17:58:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47671) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jGV58-00058w-2s for bug-guile@gnu.org; Mon, 23 Mar 2020 17:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jGV57-0000E8-W9 for bug-guile@gnu.org; Mon, 23 Mar 2020 17:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 23 Mar 2020 21:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40194 X-GNU-PR-Package: guile Original-Received: via spool by 40194-submit@debbugs.gnu.org id=B40194.1585000663846 (code B ref 40194); Mon, 23 Mar 2020 21:58:01 +0000 Original-Received: (at 40194) by debbugs.gnu.org; 23 Mar 2020 21:57:43 +0000 Original-Received: from localhost ([127.0.0.1]:53644 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jGV4o-0000Da-Tj for submit@debbugs.gnu.org; Mon, 23 Mar 2020 17:57:43 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53519) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jGV4n-0000DN-5z for 40194@debbugs.gnu.org; Mon, 23 Mar 2020 17:57:41 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35406) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jGV4h-00050S-VQ for 40194@debbugs.gnu.org; Mon, 23 Mar 2020 17:57:36 -0400 Original-Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=43880 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jGV4g-0006Lx-VY for 40194@debbugs.gnu.org; Mon, 23 Mar 2020 17:57:35 -0400 In-Reply-To: <87h7yfqho5.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Mon, 23 Mar 2020 15:17:46 +0100") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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: 209.51.188.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-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:9689 Archived-At: Ludovic Court=C3=A8s skribis: > The size of the weak set keeps growing, even when GC happens. Commit 02e3dc6ab95fe51786b68a8200322e163f8da478 mostly addresses it: --8<---------------cut here---------------start------------->8--- $ ./meta/guile -s ~/src/guile-debugging/weak-set-growth.scm ;;; (10 #) ;;; (9 #) ;;; (8 #) ;;; (7 #) ;;; (6 #) ;;; (5 #) ;;; (4 #) ;;; (3 #) ;;; (2 #) ;;; (1 #) --8<---------------cut here---------------end--------------->8--- It turns out that the core issue is that =E2=80=98vacuum_all_weak_sets=E2= =80=99 is only ever called a couple of times at the beginning of the execution, and that=E2=80=99s it. So it seems that the trick of =E2=80=98scm_i_register_async_gc_callback=E2= =80=99 no longer works as expected. Thoughts? Incidentally, in the reproducer I posted, if you insert (gc) after (create-symbols), then the weak set grows a bit more! Which makes me wonder if we=E2=80=99re not leaking entries due to messed up disappearing l= inks or something. Ludo=E2=80=99.