GNU bug report logs - #40194
Weak sets keep growing

Previous Next

Package: guile;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Mon, 23 Mar 2020 14:18:01 UTC

Severity: important

Full log


Message #8 received at 40194 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: 40194 <at> debbugs.gnu.org
Subject: Re: bug#40194: Weak sets keep growing
Date: Mon, 23 Mar 2020 22:57:33 +0100
Ludovic Courtès <ludo <at> 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’.




This bug report was last modified 5 years and 50 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.