Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Created August 16, 2017 14:26
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/a09452b8044db07b9ec3cc5ed5edea59 to your computer and use it in GitHub Desktop.
Save dogbert17/a09452b8044db07b9ec3cc5ed5edea59 to your computer and use it in GitHub Desktop.
Don't Panic
(gdb) r
Starting program: /home/dogbert/repos/rakudo/install/bin/moar --execname=./perl6-gdb-m --libpath=/home/dogbert/repos/rakudo/install/share/nqp/lib --libpath=/home/dogbert/repos/rakudo/install/share/nqp/lib --libpath=/home/dogbert/repos/rakudo/install/share/nqp/lib --libpath=. /home/dogbert/repos/rakudo/perl6.moarvm --nqp-lib=blib t/spec/S17-promise/nonblocking-await.t
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xb7851b40 (LWP 26903)]
1..19
[New Thread 0xb4affb40 (LWP 26904)]
[New Thread 0xb42feb40 (LWP 26905)]
[New Thread 0xb38ffb40 (LWP 26906)]
[New Thread 0xb2cffb40 (LWP 26907)]
ok 1 - Recursion creating a deep await-tree completes correctly
1..3
ok 1 - code dies
ok 2 - right exception type (Exception)
ok 3 - .message matches oopsy
ok 2 - Deep Promise tree conveys exception up to the top
[New Thread 0xb1effb40 (LWP 26908)]
ok 3 - Hundreds of time-based Promises awaited completes correctly
ok 4 - await of multiple Promises suspends until all ready
ok 5 - Hundred of await on time/manual Promise completes corectly
ok 6 - await of multiple Promises suspends until all ready
1..3
ok 1 - code dies
ok 2 - right exception type (X::AdHoc)
ok 3 - .message matches bust
ok 7 - Multiple await also conveys errors correctly
ok 8 - Hundred of outstanding awaits on supplies works
Breakpoint 1, MVM_panic (exitCode=1, messageFormat=0xb7d1d4bc "Adding item to past fromspace to GC worklist") at src/core/exceptions.c:688
688 fprintf(stderr, "MoarVM panic: ");
(gdb) bt
#0 MVM_panic (exitCode=1, messageFormat=0xb7d1d4bc "Adding item to past fromspace to GC worklist") at src/core/exceptions.c:688
#1 0xb7c274bf in MVM_gc_root_add_frame_roots_to_worklist (tc=0x804c588, worklist=0xab4d340, cur_frame=0xb0d9cd48) at src/gc/roots.c:375
#2 0xb7c2a2bd in MVM_gc_mark_collectable (tc=0x804c588, worklist=0xab4d340, new_addr=0xb0d9cd48) at src/gc/collect.c:384
#3 0xb7c28b9b in process_worklist (tc=0x804c588, worklist=0xab4d340, wtp=0xbfffd6b8, gen=0 '\000') at src/gc/collect.c:314
#4 0xb7c28696 in MVM_gc_collect (tc=0x804c588, what_to_do=1 '\001', gen=0 '\000') at src/gc/collect.c:113
#5 0xb7c22a0d in run_gc (tc=0x804c588, what_to_do=1 '\001') at src/gc/orchestrate.c:354
#6 0xb7c22f9b in MVM_gc_enter_from_interrupt (tc=0x804c588) at src/gc/orchestrate.c:521
#7 0xb7c23180 in MVM_gc_allocate_nursery (tc=0x804c588, size=20) at src/gc/allocation.c:18
#8 0xb7c230c7 in MVM_gc_allocate (tc=0x804c588, size=20) at src/gc/allocation.h:13
#9 0xb7c2321a in MVM_gc_allocate_zeroed (tc=0x804c588, size=20) at src/gc/allocation.c:49
#10 0xb7bf711b in MVM_interp_run (tc=0x804c588, initial_invoke=0xb7cf1ad2 <toplevel_initial_invoke>, invoke_data=0x80b9a78) at src/core/interp.c:5397
#11 0xb7cf1c31 in MVM_vm_run_file (instance=0x804c008, filename=0xbffff289 "/home/dogbert/repos/rakudo/perl6.moarvm") at src/moar.c:349
#12 0x08048f3f in main (argc=9, argv=0xbfffef94) at src/main.c:253
(gdb) info threads
Id Target Id Frame
7 Thread 0xb1effb40 (LWP 26908) "moar" 0xb7fdccb0 in ?? ()
6 Thread 0xb2cffb40 (LWP 26907) "moar" 0xb7c26e68 in MVM_gc_root_add_frame_roots_to_worklist (tc=0xb4ce9ea8, worklist=0xb0da6f50, cur_frame=0xb0faeb30) at src/gc/roots.c:355
5 Thread 0xb38ffb40 (LWP 26906) "moar" 0xb7fdccb0 in ?? ()
4 Thread 0xb42feb40 (LWP 26905) "moar" 0xb7fdccb0 in ?? ()
3 Thread 0xb4affb40 (LWP 26904) "moar" 0xb7fdccb0 in ?? ()
2 Thread 0xb7851b40 (LWP 26903) "moar" 0xb7fdccb0 in ?? ()
* 1 Thread 0xb78f5700 (LWP 26902) "moar" MVM_panic (exitCode=1, messageFormat=0xb7d1d4bc "Adding item to past fromspace to GC worklist") at src/core/exceptions.c:688
(gdb) t 6
[Switching to thread 6 (Thread 0xb2cffb40 (LWP 26907))]
#0 0xb7c26e68 in MVM_gc_root_add_frame_roots_to_worklist (tc=0xb4ce9ea8, worklist=0xb0da6f50, cur_frame=0xb0faeb30) at src/gc/roots.c:355
355 if (cur_frame->caller && !MVM_FRAME_IS_ON_CALLSTACK(tc, cur_frame->caller))
(gdb) bt
#0 0xb7c26e68 in MVM_gc_root_add_frame_roots_to_worklist (tc=0xb4ce9ea8, worklist=0xb0da6f50, cur_frame=0xb0faeb30) at src/gc/roots.c:355
#1 0xb7c2a2bd in MVM_gc_mark_collectable (tc=0xb4ce9ea8, worklist=0xb0da6f50, new_addr=0xb0faeb30) at src/gc/collect.c:384
#2 0xb7c26c09 in MVM_gc_root_add_gen2s_to_worklist (tc=0xb4ce9ea8, worklist=0xb0da6f50) at src/gc/roots.c:294
#3 0xb7c286e9 in MVM_gc_collect (tc=0xb4ce9ea8, what_to_do=0 '\000', gen=0 '\000') at src/gc/collect.c:127
#4 0xb7c22a0d in run_gc (tc=0xb4ce9ea8, what_to_do=0 '\000') at src/gc/orchestrate.c:354
#5 0xb7c22df4 in MVM_gc_enter_from_allocator (tc=0xb4ce9ea8) at src/gc/orchestrate.c:466
#6 0xb7c231b2 in MVM_gc_allocate_nursery (tc=0xb4ce9ea8, size=112) at src/gc/allocation.c:32
#7 0xb7c230c7 in MVM_gc_allocate (tc=0xb4ce9ea8, size=112) at src/gc/allocation.h:13
#8 0xb7c2321a in MVM_gc_allocate_zeroed (tc=0xb4ce9ea8, size=112) at src/gc/allocation.c:49
#9 0xb7c2361f in MVM_gc_allocate_frame (tc=0xb4ce9ea8) at src/gc/allocation.c:99
#10 0xb7bffab9 in allocate_frame (tc=0xb4ce9ea8, static_frame=0x8980ed8, spesh_cand=0x0, heap=1) at src/core/frame.c:241
#11 0xb7c004d5 in MVM_frame_invoke (tc=0xb4ce9ea8, static_frame=0x8980ed8, callsite=0xb7fd6d84 <null_args_callsite>, args=0x8e6f730, outer=0xb2d00314, code_ref=0xb2d002ec, spesh_cand=-1) at src/core/frame.c:508
#12 0xb7c56466 in invoke_handler (tc=0xb4ce9ea8, invokee=0xb2dea438, callsite=0xb7fd6d84 <null_args_callsite>, args=0x8e6f730) at src/6model/reprs/MVMCode.c:10
#13 0xb7bcd44f in MVM_interp_run (tc=0xb4ce9ea8, initial_invoke=0xb7c09b9c <thread_initial_invoke>, invoke_data=0xb4ce9438) at src/core/interp.c:973
#14 0xb7c09cb4 in start_thread (data=0xb4ce9438) at src/core/threads.c:83
#15 0xb7d0d9c7 in uv.thread_start () from //home/dogbert/repos/rakudo/install/lib/libmoar.so
#16 0xb790bf72 in start_thread (arg=0xb2cffb40) at pthread_create.c:312
#17 0xb7a563ee in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment