Heap exhausted after method redefinition and ignored related errors

Bug #1758878 reported by Siebe de Vos
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

Running the code in the attachment generates errors in PCL code (<bug to be reported>), which are then ignored. It runs out of heap after some time. Running the same with gc-logfile shows that GC is happening, but allocation increases.

sbcl --dynamic-space-size 160 --load method-heap-exhaust.lisp
This is SBCL 1.4.5, an implementation of ANSI Common Lisp.
[...]
Heap exhausted during garbage collection: 16 bytes available, 32 requested.
Gen Boxed Unboxed LgBox LgUnbox Pin Alloc Waste Trig WP GCs Mem-age
 0 0 0 0 0 0 0 0 1677721 0 0 0.0000
 1 0 0 0 0 0 0 0 1677721 0 0 0.0000
 2 0 0 0 0 0 0 0 1677721 0 0 0.0000
 3 0 0 0 0 0 0 0 1677721 0 0 0.0000
 4 1309 1 0 0 17 42518080 408000 1677721 0 0 1.2049
 5 1835 2 65 66 31 64043168 444256 2000000 1866 0 0.0000
 6 524 267 0 0 0 25083184 836304 2000000 499 0 0.0000
 7 792 0 129 130 0 34331632 107536 2000000 0 0 0.0000
           Total bytes allocated = 165976064
           Dynamic-space-size bytes = 167772160
GC control variables:
   *GC-INHIBIT* = true
   *GC-PENDING* = true
   *STOP-FOR-GC-PENDING* = false
fatal error encountered in SBCL pid 8277(tid 0x7ffff7fc9740):
Heap exhausted, game over.

Welcome to LDB, a low-level debugger for the Lisp runtime environment.
ldb>

uname -a
Linux si2l 4.4.92-31-default #1 SMP Sun Oct 22 06:56:24 UTC 2017 (1d80e8a) x86_64 x86_64 x86_64 GNU/Linux

*features* =>
(:64-BIT :64-BIT-REGISTERS :ALIEN-CALLBACKS :ANSI-CL :ASH-RIGHT-VOPS
 :C-STACK-IS-CONTROL-STACK :CALL-SYMBOL :COMMON-LISP :COMPACT-INSTANCE-HEADER
 :COMPARE-AND-SWAP-VOPS :COMPLEX-FLOAT-VOPS :CYCLE-COUNTER :ELF :FLOAT-EQL-VOPS
 :FP-AND-PC-STANDARD-SAVE :GCC-TLS :GENCGC :IEEE-FLOATING-POINT :IMMOBILE-CODE
 :IMMOBILE-SPACE :INLINE-CONSTANTS :INTEGER-EQL-VOP :LARGEFILE :LINKAGE-TABLE
 :LINUX :LITTLE-ENDIAN :MEMORY-BARRIER-VOPS :MULTIPLY-HIGH-VOPS
 :OS-PROVIDES-BLKSIZE-T :OS-PROVIDES-DLADDR :OS-PROVIDES-DLOPEN
 :OS-PROVIDES-GETPROTOBY-R :OS-PROVIDES-POLL :OS-PROVIDES-PUTWC
 :OS-PROVIDES-SUSECONDS-T :PACKAGE-LOCAL-NICKNAMES :RAW-INSTANCE-INIT-VOPS
 :RAW-SIGNED-WORD :RELOCATABLE-HEAP :SB-DOC :SB-EVAL :SB-FUTEX :SB-LDB
 :SB-PACKAGE-LOCKS :SB-SIMD-PACK :SB-SOURCE-LOCATIONS :SB-THREAD :SB-UNICODE
 :SBCL :STACK-ALLOCATABLE-CLOSURES :STACK-ALLOCATABLE-FIXED-OBJECTS
 :STACK-ALLOCATABLE-LISTS :STACK-ALLOCATABLE-VECTORS
 :STACK-GROWS-DOWNWARD-NOT-UPWARD :SYMBOL-INFO-VOPS :UNBIND-N-VOP
 :UNDEFINED-FUN-RESTARTS :UNIX :UNWIND-TO-FRAME-AND-CALL-VOP :X86-64)

Revision history for this message
Siebe de Vos (s.de.vos) wrote :
Revision history for this message
Siebe de Vos (s.de.vos) wrote :

The bug is not reproducible today.

The fix appears to be this commit:
commit 6c7536b0ac79d78868a0b24c71dd7f1dd7f47765
Author: Douglas Katzman <email address hidden>
Date: Thu Jun 11 23:30:01 2020 -0400

    Change *effective-method-cache* into a per-method slot

 src/pcl/boot.lisp | 9 ++++++++-
 src/pcl/defs.lisp | 1 +
 src/pcl/dfun.lisp | 36 +++++++++++++++---------------------
 3 files changed, 24 insertions(+), 22 deletions(-)

which corresponds to SBCL 2.0.5.57-6c7536b0a .

Changed in sbcl:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.