X-Loop: help-debbugs@HIDDEN Subject: bug#40194: Weak sets keep growing Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-guile@HIDDEN Resent-Date: Mon, 23 Mar 2020 14:18:01 +0000 Resent-Message-ID: <handler.40194.B.158497307211100 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 40194 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: bug-Guile@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.158497307211100 (code B ref -1); Mon, 23 Mar 2020 14:18:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Mar 2020 14:17:52 +0000 Received: from localhost ([127.0.0.1]:53364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1jGNto-0002sy-2y for submit <at> debbugs.gnu.org; Mon, 23 Mar 2020 10:17:52 -0400 Received: from lists.gnu.org ([209.51.188.17]:50825) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1jGNtm-0002sr-T9 for submit <at> debbugs.gnu.org; Mon, 23 Mar 2020 10:17:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38683) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1jGNtl-000465-U2 for bug-Guile@HIDDEN; Mon, 23 Mar 2020 10:17:50 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53767) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>) id 1jGNtl-0007XT-Pf for bug-Guile@HIDDEN; Mon, 23 Mar 2020 10:17:49 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42988 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from <ludo@HIDDEN>) id 1jGNtl-0002mq-8B for bug-Guile@HIDDEN; Mon, 23 Mar 2020 10:17:49 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 4 Germinal an 228 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 Date: Mon, 23 Mar 2020 15:17:46 +0100 Message-ID: <87h7yfqho5.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) Hello, Consider this code: --8<---------------cut here---------------start------------->8--- (define (create-symbols) (let loop ((i 10000)) (unless (zero? i) (gensym) (loop (1- i))))) (let loop ((i 10)) (unless (zero? i) (pk i (%symbols)) (create-symbols) (loop (1- i)))) --8<---------------cut here---------------end--------------->8--- (You need to have the =E2=80=98%symbols=E2=80=99 procedure from libguile/sy= mbols.c compiled in.) In 3.0.1+, it prints: --8<---------------cut here---------------start------------->8--- ;;; (10 #<weak-set 3517/7027>) ;;; (9 #<weak-set 10271/14051>) ;;; (8 #<weak-set 11625/28099>) ;;; (7 #<weak-set 21625/28099>) ;;; (6 #<weak-set 11090/56197>) ;;; (5 #<weak-set 21090/56197>) ;;; (4 #<weak-set 31090/56197>) ;;; (3 #<weak-set 41090/56197>) ;;; (2 #<weak-set 5052/112363>) ;;; (1 #<weak-set 15052/112363>) --8<---------------cut here---------------end--------------->8--- The size of the weak set keeps growing, even when GC happens. Conversely, weak tables shrink upon GC. Ludo=E2=80=99.
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Subject: bug#40194: Acknowledgement (Weak sets keep growing) Message-ID: <handler.40194.B.158497307211100.ack <at> debbugs.gnu.org> References: <87h7yfqho5.fsf@HIDDEN> X-Gnu-PR-Message: ack 40194 X-Gnu-PR-Package: guile Reply-To: 40194 <at> debbugs.gnu.org Date: Mon, 23 Mar 2020 14:18:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-guile@HIDDEN If you wish to submit further information on this problem, please send it to 40194 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 40194: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D40194 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#40194: Weak sets keep growing Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-guile@HIDDEN Resent-Date: Mon, 23 Mar 2020 21:58:01 +0000 Resent-Message-ID: <handler.40194.B40194.1585000663846 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 40194 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 40194 <at> debbugs.gnu.org Received: via spool by 40194-submit <at> debbugs.gnu.org id=B40194.1585000663846 (code B ref 40194); Mon, 23 Mar 2020 21:58:01 +0000 Received: (at 40194) by debbugs.gnu.org; 23 Mar 2020 21:57:43 +0000 Received: from localhost ([127.0.0.1]:53644 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1jGV4o-0000Da-Tj for submit <at> debbugs.gnu.org; Mon, 23 Mar 2020 17:57:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53519) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1jGV4n-0000DN-5z for 40194 <at> debbugs.gnu.org; Mon, 23 Mar 2020 17:57:41 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35406) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>) id 1jGV4h-00050S-VQ for 40194 <at> debbugs.gnu.org; Mon, 23 Mar 2020 17:57:36 -0400 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 <ludo@HIDDEN>) id 1jGV4g-0006Lx-VY for 40194 <at> debbugs.gnu.org; Mon, 23 Mar 2020 17:57:35 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> References: <87h7yfqho5.fsf@HIDDEN> Date: Mon, 23 Mar 2020 22:57:33 +0100 In-Reply-To: <87h7yfqho5.fsf@HIDDEN> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Mon, 23 Mar 2020 15:17:46 +0100") Message-ID: <87y2rqpwdu.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) Ludovic Court=C3=A8s <ludo@HIDDEN> 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 #<weak-set 3517/7027>) ;;; (9 #<weak-set 10271/14051>) ;;; (8 #<weak-set 11711/14051>) ;;; (7 #<weak-set 9895/14051>) ;;; (6 #<weak-set 7697/14051>) ;;; (5 #<weak-set 11559/14051>) ;;; (4 #<weak-set 9220/14051>) ;;; (3 #<weak-set 6833/14051>) ;;; (2 #<weak-set 10637/14051>) ;;; (1 #<weak-set 8232/14051>) --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.
Received: (at control) by debbugs.gnu.org; 26 Apr 2020 17:14:42 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 26 13:14:42 2020 Received: from localhost ([127.0.0.1]:34799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1jSkra-00067z-E9 for submit <at> debbugs.gnu.org; Sun, 26 Apr 2020 13:14:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1jSkrY-00067l-PV for control <at> debbugs.gnu.org; Sun, 26 Apr 2020 13:14:41 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47348) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1jSkrT-00023r-Hj for control <at> debbugs.gnu.org; Sun, 26 Apr 2020 13:14:35 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=49292 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from <ludo@HIDDEN>) id 1jSkq4-00085G-W1 for control <at> debbugs.gnu.org; Sun, 26 Apr 2020 13:13:09 -0400 Date: Sun, 26 Apr 2020 19:13:07 +0200 Message-Id: <87imhm187w.fsf@HIDDEN> To: control <at> debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> Subject: control message for bug #40194 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) severity 40194 important quit
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.