Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Created November 18, 2021 12:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dogbert17/810f1471907e2c2fa433dde90bb57a19 to your computer and use it in GitHub Desktop.
Save dogbert17/810f1471907e2c2fa433dde90bb57a19 to your computer and use it in GitHub Desktop.
GC bug with small nursery
Starting program: /home/dogbert/repos/rakudo/install/bin/moar --execname=/home/dogbert/repos/rakudo/rakudo-gdb-m --libpath=/home/dogbert/repos/rakudo --libpath=/home/dogbert/repos/rakudo/blib --libpath=/home/dogbert/repos/rakudo/install/share/nqp/lib /home/dogbert/repos/rakudo/perl6.moarvm -Ilib t/spec/S04-blocks-and-statements/let.t
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff72f8700 (LWP 210684)]
Thread 1 "moar" hit Breakpoint 1, MVM_panic (exitCode=exitCode@entry=1, messageFormat=messageFormat@entry=0x7ffff7a4f118 "Adding pointer %p to past fromspace to GC worklist") at src/core/exceptions.c:840
840 MVM_NO_RETURN void MVM_panic(MVMint32 exitCode, const char *messageFormat, ...) {
(gdb) bt
#0 MVM_panic (exitCode=exitCode@entry=1, messageFormat=messageFormat@entry=0x7ffff7a4f118 "Adding pointer %p to past fromspace to GC worklist") at src/core/exceptions.c:840
#1 0x00007ffff78b99c4 in MVM_callsite_mark (tc=tc@entry=0x555555559e30, cs=0x5555594c6890, worklist=worklist@entry=0x5555594cbd90, snapshot=snapshot@entry=0x0) at src/core/callsite.c:127
#2 0x00007ffff78ba46d in MVM_callsite_mark_interns (tc=tc@entry=0x555555559e30, worklist=worklist@entry=0x5555594cbd90, snapshot=snapshot@entry=0x0) at src/core/callsite.c:319
#3 0x00007ffff7912471 in MVM_gc_root_add_instance_roots_to_worklist (tc=tc@entry=0x555555559e30, worklist=worklist@entry=0x5555594cbd90, snapshot=snapshot@entry=0x0) at src/gc/roots.c:141
#4 0x00007ffff7915833 in MVM_gc_collect (tc=tc@entry=0x555555559e30, what_to_do=what_to_do@entry=0 '\000', gen=<optimized out>) at src/gc/collect.c:115
#5 0x00007ffff790f43a in run_gc (tc=tc@entry=0x555555559e30, what_to_do=what_to_do@entry=0 '\000') at src/gc/orchestrate.c:444
#6 0x00007ffff79104ff in MVM_gc_enter_from_allocator (tc=tc@entry=0x555555559e30) at src/gc/orchestrate.c:599
#7 0x00007ffff7910821 in MVM_gc_allocate_nursery (tc=0x555555559e30, size=40) at src/gc/allocation.c:37
#8 0x00007ffff7910c48 in MVM_gc_allocate (size=<optimized out>, tc=0x555555559e30) at src/gc/allocation.c:94
#9 MVM_gc_allocate_zeroed (size=<optimized out>, tc=0x555555559e30) at src/gc/allocation.h:21
#10 MVM_gc_allocate_object (tc=0x555555559e30, st=<optimized out>) at src/gc/allocation.c:86
#11 0x00007ffff796513a in MVM_capture_insert_arg (tc=tc@entry=0x555555559e30, capture_obj=capture_obj@entry=0x55555555b520, idx=idx@entry=0, kind=kind@entry=MVM_CALLSITE_ARG_OBJ, value=...) at src/6model/reprs/MVMCapture.c:391
#12 0x00007ffff797f1a7 in MVM_disp_program_record_capture_insert_constant_arg (tc=tc@entry=0x555555559e30, capture=0x55555555b520, idx=0, kind=kind@entry=MVM_CALLSITE_ARG_OBJ, value=...) at src/disp/program.c:1483
#13 0x00007ffff7985773 in dispatcher_insert_arg_literal_obj_impl (tc=0x555555559e30, arg_info=...) at src/disp/syscall.c:246
#14 0x00007ffff78c6046 in MVM_interp_run (tc=0x1, initial_invoke=0x7ffff7a4f118, invoke_data=0x7ffff7a4f118, outer_runloop=0x0) at src/core/interp.c:6441
#15 0x00005555555557fb in main (argc=8, argv=0x7fffffffdd68) at src/main.c:307
(gdb) f 1
#1 0x00007ffff78b99c4 in MVM_callsite_mark (tc=tc@entry=0x555555559e30, cs=0x5555594c6890, worklist=worklist@entry=0x5555594cbd90, snapshot=snapshot@entry=0x0) at src/core/callsite.c:127
127 MVM_gc_worklist_add(tc, worklist, &(cs->arg_names[i]));
(gdb) l
122 MVMHeapSnapshotState *snapshot) {
123 MVMuint32 num_names = MVM_callsite_num_nameds(tc, cs);
124 MVMuint32 i;
125 for (i = 0; i < num_names; i++)
126 if (worklist)
127 MVM_gc_worklist_add(tc, worklist, &(cs->arg_names[i]));
128 else
129 MVM_profile_heap_add_collectable_rel_const_cstr(tc, snapshot,
130 (MVMCollectable *)cs->arg_names[i],
131 "Callsite named argument");
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment