>> (gdb) p jmp_table >> $1 = make_number(514) >> (gdb) p *top >> $3 = XIL(0x42b4d0) >> (gdb) pp *top >> remove > > Which one of these is the one that triggers the assertion violation? jmp_table. The assertion violation is at line 1403 in bytecode.c: struct Lisp_Hash_Table *h = XHASH_TABLE (jmp_table); >> Thread 1 "monitor" hit Hardware watchpoint 7: *(EMACS_INT *) 0x16eac38 >> >> Old value = 60897760 >> New value = 24075314 >> setup_on_free_list (v=v@entry=0x16eac30 , >> nbytes=nbytes@entry=272) at alloc.c:3060 >> 3060 total_free_vector_slots += nbytes / word_size; >> (gdb) bt 10 >> #0 setup_on_free_list (v=v@entry=0x16eac30 , >> nbytes=nbytes@entry=272) at alloc.c:3060 >> #1 0x00000000005a9a24 in sweep_vectors () at alloc.c:3297 >> #2 0x00000000005adb2e in gc_sweep () at alloc.c:6872 >> #3 garbage_collect_1 (end=) at alloc.c:5860 >> #4 Fgarbage_collect () at alloc.c:5989 >> #5 0x00000000005ca478 in maybe_gc () at lisp.h:4804 >> #6 Ffuncall (nargs=4, args=args@entry=0x7fff210a3bc8) at eval.c:2838 >> #7 0x0000000000611e00 in exec_byte_code (bytestr=..., vector=..., maxdepth=..., >> args_template=..., nargs=nargs@entry=2, args=, >> args@entry=0x9bd128 ) at bytecode.c:632 >> #8 0x00000000005cdd32 in funcall_lambda (fun=XIL(0x7fff210a3bc8), >> nargs=nargs@entry=2, arg_vector=0x9bd128 , >> arg_vector@entry=0x7fff210a3f00) at eval.c:3057 >> #9 0x00000000005ca54b in Ffuncall (nargs=3, args=args@entry=0x7fff210a3ef8) >> at eval.c:2870 >> (More stack frames follow...) > > Can you show the Lisp backtrace for the above? (gdb) xbacktrace "Automatic GC" (0x0) "string-match" (0x210a3bd0) "completion-pcm--string->pattern" (0x210a3f00) "completion-pcm--find-all-completions" (0x210a43a0) "completion-pcm-try-completion" (0x210a4668) 0x1723c30 PVEC_COMPILED "completion--some" (0x210a4b60) "completion--nth-completion" (0x210a4e68) "completion-try-completion" (0x210a50f0) "execute-extended-command--shorter" (0x210a5390) "execute-extended-command" (0x210a5760) "funcall-interactively" (0x210a5758) "call-interactively" (0x210a5a90) "command-execute" (0x210a5d48) >> Am I correct that the next step is to figure out why the garbage >> collector is not marking this vector? Presumably it's no longer >> attached to the function definition for erb--benchmark-monitor-func by >> the time the garbage collector runs, but it's supposed to be found by >> mark_stack when called from mark_one_thread for Thread 7, right? > > Is this vector the byte-code of erb--benchmark-monitor-func? If so, > how come it is no longer attached to the function, as long as the > function does exist? This vector is the constants vector for the byte-code of erb--benchmark-monitor-func. When eval-region evaluates the defun for erb--benchmark-monitor-func, it replaces the symbol's function definition, so it removes that reference to the byte-code. AFAIK the only other reference to the byte-code is on the stack of Thread 7, which is running the byte-code.