GNU bug report logs - #76069
31.0.50; Hash tables not collected

Previous Next

Package: emacs;

Reported by: Helmut Eller <eller.helmut <at> gmail.com>

Date: Wed, 5 Feb 2025 14:38:02 UTC

Severity: normal

Found in version 31.0.50

Done: Pip Cet <pipcet <at> protonmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 76069 in the body.
You can then email your comments to 76069 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#76069; Package emacs. (Wed, 05 Feb 2025 14:38:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Helmut Eller <eller.helmut <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 05 Feb 2025 14:38:03 GMT) Full text and rfc822 format available.

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

From: Helmut Eller <eller.helmut <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; Hash tables not collected
Date: Wed, 05 Feb 2025 15:36:44 +0100
If the current feature/igc branch is configured without MPS, then it
seems that hash tables aren't collected properly.  When executing this
file

;;; -*- lexical-binding: t -*-

(defun hash-integers (n)
  (let ((table (make-hash-table :test 'eql)))
    (dotimes (i n)
      (puthash i i table))))

(defun main ()
  (dotimes (_ 300)
    (hash-integers 100000))
  (kill-emacs))

;; EOF

with:  /usr/bin/time emacs -Q -batch -l httest.el -f main

I see:

15.35user 2.40system 0:35.18elapsed 50%CPU (0avgtext+0avgdata 2429884maxresident)k
65152inputs+0outputs (443major+675016minor)pagefaults 0swaps

This is the output of GNU time (not the bash builtin).  Note the ~2.3GB
maxresident.  Also, when I set a breakpoint in gdb at alloc.c:3389 it is
hit only once while executing this file.





In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.38, cairo version 1.16.0) of 2025-02-05 built on caladan
Repository revision: 4c97d39b16a75411ccfdcf16d0871a77ff41785c
Repository branch: feature/igc
System Description: Debian GNU/Linux 12 (bookworm)

Configured using:
 'configure --with-mps=no --with-xpm=ifavailable --with-gif=ifavailable
 --with-native-compilation=no 'CFLAGS=-g -O2 -fno-omit-frame-pointer
 --std=gnu99 -I/scratch/emacs/mps-install/include
 -L/scratch/emacs/mps-install/lib''

Configured features:
CAIRO DBUS FREETYPE GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG LIBSELINUX
LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG SECCOMP SOUND
SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM
XINPUT2 GTK3 ZLIB

Important settings:
  value of $LANG: C.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  whitespace-mode: t
  outline-minor-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76069; Package emacs. (Wed, 05 Feb 2025 17:21:01 GMT) Full text and rfc822 format available.

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

From: Pip Cet <pipcet <at> protonmail.com>
To: Helmut Eller <eller.helmut <at> gmail.com>
Cc: 76069 <at> debbugs.gnu.org
Subject: Re: bug#76069: 31.0.50; Hash tables not collected
Date: Wed, 05 Feb 2025 17:19:58 +0000
"Helmut Eller" <eller.helmut <at> gmail.com> writes:

> If the current feature/igc branch is configured without MPS, then it
> seems that hash tables aren't collected properly.  When executing this
> file

Will fix in a bit, thanks for the report.

Pip





Reply sent to Pip Cet <pipcet <at> protonmail.com>:
You have taken responsibility. (Wed, 05 Feb 2025 18:12:02 GMT) Full text and rfc822 format available.

Notification sent to Helmut Eller <eller.helmut <at> gmail.com>:
bug acknowledged by developer. (Wed, 05 Feb 2025 18:12:02 GMT) Full text and rfc822 format available.

Message #13 received at 76069-done <at> debbugs.gnu.org (full text, mbox):

From: Pip Cet <pipcet <at> protonmail.com>
To: Helmut Eller <eller.helmut <at> gmail.com>
Cc: 76069-done <at> debbugs.gnu.org
Subject: Re: bug#76069: 31.0.50; Hash tables not collected
Date: Wed, 05 Feb 2025 18:11:47 +0000
Pip Cet <pipcet <at> protonmail.com> writes:

> "Helmut Eller" <eller.helmut <at> gmail.com> writes:
>
>> If the current feature/igc branch is configured without MPS, then it
>> seems that hash tables aren't collected properly.  When executing this
>> file
>
> Will fix in a bit, thanks for the report.

Hopefully fixed now, closing.  Please reopen or revert if I messed up :-)

Pip





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76069; Package emacs. (Fri, 07 Feb 2025 09:24:01 GMT) Full text and rfc822 format available.

Message #16 received at 76069-done <at> debbugs.gnu.org (full text, mbox):

From: Helmut Eller <eller.helmut <at> gmail.com>
To: Pip Cet <pipcet <at> protonmail.com>
Cc: 76069-done <at> debbugs.gnu.org
Subject: Re: bug#76069: 31.0.50; Hash tables not collected
Date: Fri, 07 Feb 2025 10:23:42 +0100
On Wed, Feb 05 2025, Pip Cet wrote:

> Pip Cet <pipcet <at> protonmail.com> writes:
>
>> "Helmut Eller" <eller.helmut <at> gmail.com> writes:
>>
>>> If the current feature/igc branch is configured without MPS, then it
>>> seems that hash tables aren't collected properly.  When executing this
>>> file
>>
>> Will fix in a bit, thanks for the report.
>
> Hopefully fixed now, closing.  Please reopen or revert if I messed up :-)

I think, in hash_table_free_kv you forgot to update
hash_table_allocated_bytes.  It would probably best to call
hash_table_free_bytes.

Helmut




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76069; Package emacs. (Fri, 07 Feb 2025 09:43:02 GMT) Full text and rfc822 format available.

Message #19 received at 76069-done <at> debbugs.gnu.org (full text, mbox):

From: Pip Cet <pipcet <at> protonmail.com>
To: Helmut Eller <eller.helmut <at> gmail.com>
Cc: 76069-done <at> debbugs.gnu.org
Subject: Re: bug#76069: 31.0.50; Hash tables not collected
Date: Fri, 07 Feb 2025 09:42:10 +0000
"Helmut Eller" <eller.helmut <at> gmail.com> writes:

> On Wed, Feb 05 2025, Pip Cet wrote:
>
>> Pip Cet <pipcet <at> protonmail.com> writes:
>>
>>> "Helmut Eller" <eller.helmut <at> gmail.com> writes:
>>>
>>>> If the current feature/igc branch is configured without MPS, then it
>>>> seems that hash tables aren't collected properly.  When executing this
>>>> file
>>>
>>> Will fix in a bit, thanks for the report.
>>
>> Hopefully fixed now, closing.  Please reopen or revert if I messed up :-)
>
> I think, in hash_table_free_kv you forgot to update
> hash_table_allocated_bytes.  It would probably best to call
> hash_table_free_bytes.

Thanks, did that!

Pip





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 07 Mar 2025 12:24:16 GMT) Full text and rfc822 format available.

This bug report was last modified 162 days ago.

Previous Next


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