Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Created July 30, 2019 13:45
Show Gist options
  • Save dogbert17/1efaa06662e336d537aa328472d4ea13 to your computer and use it in GitHub Desktop.
Save dogbert17/1efaa06662e336d537aa328472d4ea13 to your computer and use it in GitHub Desktop.
Don't panic
dogbert@dogbert-ubuntu:~/repos/rakudo$ ./perl6-gdb-m -Ilib t/spec/S32-io/socket-accept-and-working-threads.t
================================================================================================
This is Rakudo Perl 6 running in the debugger, which often allows the user to generate useful back-
traces to debug or report issues in Rakudo, the MoarVM backend or the currently running code.
This Rakudo version is 2019.07.1.99.g.1.d.5268352 built on MoarVM version 2019.07.1.54.g.4227.c.7137,
running on ubuntu (18.04.2.LTS.Bionic.Beaver) / linux (60.Ubuntu.SMP.Tue.Jul.2.18.22.20.UTC.2019)
Type `bt full` to generate a backtrace if applicable, type `q` to quit or `help` for help.
------------------------------------------------------------------------------------------------
Reading symbols from /home/dogbert/repos/rakudo/install/bin/moar...done.
Starting program: /home/dogbert/repos/rakudo/install/bin/moar --execname=/home/dogbert/repos/rakudo/perl6-gdb-m --libpath=/home/dogbert/repos/rakudo --libpath=/home/dogbert/repos/rakudo/blib --libpath= --libpath=/home/dogbert/repos/rakudo/install/share/nqp/lib /home/dogbert/repos/rakudo/perl6.moarvm --nqp-lib=/home/dogbert/repos/rakudo/blib -Ilib t/spec/S32-io/socket-accept-and-working-threads.t
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff64b7700 (LWP 241741)]
1..15
[New Thread 0x7fffefb08700 (LWP 241742)]
[New Thread 0x7fffef300700 (LWP 241743)]
[New Thread 0x7fffeeaff700 (LWP 241744)]
Thread 1 "moar" hit Breakpoint 1, MVM_panic (exitCode=1, messageFormat=0x7ffff767fda8 "Invalid owner in item added to GC worklist") at src/core/exceptions.c:832
832 MVM_NO_RETURN void MVM_panic(MVMint32 exitCode, const char *messageFormat, ...) {
(gdb) bt
#0 MVM_panic (exitCode=1, messageFormat=0x7ffff767fda8 "Invalid owner in item added to GC worklist") at src/core/exceptions.c:832
#1 0x00007ffff74dd20a in scan_lexicals (tc=0x555555758cc0, worklist=0x555558d3d260, frame=0x55555584b670) at src/gc/roots.c:496
#2 0x00007ffff74dc436 in MVM_gc_root_add_frame_roots_to_worklist (tc=0x555555758cc0, worklist=0x555558d3d260, cur_frame=0x55555584b670) at src/gc/roots.c:418
#3 0x00007ffff74e1016 in MVM_gc_mark_collectable (tc=0x555555758cc0, worklist=0x555558d3d260, new_addr=0x55555584b670) at src/gc/collect.c:423
#4 0x00007ffff74de36c in process_worklist (tc=0x555555758cc0, worklist=0x555558d3d260, wtp=0x7fffffffbdc0, gen=0 '\000') at src/gc/collect.c:348
#5 0x00007ffff74dde31 in MVM_gc_collect (tc=0x555555758cc0, what_to_do=1 '\001', gen=0 '\000') at src/gc/collect.c:147
#6 0x00007ffff74d2f7d in run_gc (tc=0x555555758cc0, what_to_do=1 '\001') at src/gc/orchestrate.c:414
#7 0x00007ffff74d378c in MVM_gc_enter_from_interrupt (tc=0x555555758cc0) at src/gc/orchestrate.c:618
#8 0x00007ffff74d2bcb in MVM_gc_mark_thread_blocked (tc=0x555555758cc0) at src/gc/orchestrate.c:297
#9 0x00007ffff75491ea in MVM_reentrantmutex_lock (tc=0x555555758cc0, rm=0x5555586e72b0) at src/6model/reprs/ReentrantMutex.c:136
#10 0x00007ffff7571968 in MVM_serialization_demand_object (tc=0x555555758cc0, sc=0x55555842dae0, idx=8) at src/6model/serialization.c:2815
#11 0x00007ffff7565b91 in MVM_sc_get_object (tc=0x555555758cc0, sc=0x55555842dae0, idx=8) at src/6model/sc.c:206
#12 0x00007ffff749876a in create_context_only (tc=0x555555758cc0, static_frame=0x55555763ee60, code_ref=0x55555865c048, autoclose=1) at src/core/frame.c:179
#13 0x00007ffff74989f3 in autoclose (tc=0x555555758cc0, needed=0x55555763ee60) at src/core/frame.c:233
#14 0x00007ffff7498bb1 in autoclose (tc=0x555555758cc0, needed=0x55555763ef48) at src/core/frame.c:246
#15 0x00007ffff7499724 in MVM_frame_invoke (tc=0x555555758cc0, static_frame=0x555557640338, callsite=0x7ffff7c984a0 <typecheck_callsite>, args=0x5555558e8540,
outer=0x0, code_ref=0x55555865c6c0, spesh_cand=-1) at src/core/frame.c:474
#16 0x00007ffff751e223 in invoke_handler (tc=0x555555758cc0, invokee=0x55555865c6c0, callsite=0x7ffff7c984a0 <typecheck_callsite>, args=0x5555558e8540)
at src/6model/reprs/MVMCode.c:10
#17 0x00007ffff7464385 in MVM_interp_run (tc=0x555555758cc0, initial_invoke=0x7ffff76160a3 <toplevel_initial_invoke>, invoke_data=0x5555557fb278)
at src/core/interp.c:1048
#18 0x00007ffff7616208 in MVM_vm_run_file (instance=0x555555758260, filename=0x7fffffffe323 "/home/dogbert/repos/rakudo/perl6.moarvm") at src/moar.c:444
#19 0x000055555555581a in main (argc=10, argv=0x7fffffffdea8) at src/main.c:302
(gdb) f 1
#1 0x00007ffff74dd20a in scan_lexicals (tc=0x555555758cc0, worklist=0x555558d3d260, frame=0x55555584b670) at src/gc/roots.c:496
496 MVM_gc_worklist_add(tc, worklist, &frame->env[i].o);
(gdb) l
491 type_map = frame->static_info->body.lexical_types;
492 count = frame->static_info->body.num_lexicals;
493 }
494 for (i = 0; i < count; i++)
495 if (type_map[i] == MVM_reg_str || type_map[i] == MVM_reg_obj)
496 MVM_gc_worklist_add(tc, worklist, &frame->env[i].o);
497 }
498 }
(gdb) p frame->env[i].o
$1 = (MVMObject *) 0x555558b01100
(gdb) p *frame->env[i].o
$2 = {header = {sc_forward_u = {forwarder = 0x555558b01460, sc = {sc_idx = 1487934560, idx = 21845}, st = 0x555558b01460}, owner = 1484182264, flags = 21845,
size = 0}, st = 0x5555557d1898}
(gdb) p i
$3 = 0
(gdb) p count
$4 = 12
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment