unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 40194@debbugs.gnu.org
Subject: bug#40194: Weak sets keep growing
Date: Mon, 23 Mar 2020 22:57:33 +0100	[thread overview]
Message-ID: <87y2rqpwdu.fsf@gnu.org> (raw)
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")

Ludovic Courtès <ludo@gnu.org> 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 ‘vacuum_all_weak_sets’ is only
ever called a couple of times at the beginning of the execution, and
that’s it.

So it seems that the trick of ‘scm_i_register_async_gc_callback’ 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’re not leaking entries due to messed up disappearing links
or something.

Ludo’.





      reply	other threads:[~2020-03-23 21:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-23 14:17 bug#40194: Weak sets keep growing Ludovic Courtès
2020-03-23 21:57 ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y2rqpwdu.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=40194@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).