Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Created September 22, 2017 17:24
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/d018b0f6f57f01f0726b6c0f734d0dbc to your computer and use it in GitHub Desktop.
Save dogbert17/d018b0f6f57f01f0726b6c0f734d0dbc to your computer and use it in GitHub Desktop.
Failing syntax test
dogbert@dogbert-VirtualBox ~/repos/rakudo $ cat ~/scratch.pl6
use Test;
lives-ok {
my $s = supply { whenever Supply.interval(0.001) { done } }
await do for ^4 {
start {
for ^500 {
react { whenever $s { } }
}
}
}
}, 'No races/crashes around interval that emits done (used to SEGV and various errors)';
dogbert@dogbert-VirtualBox ~/repos/rakudo $ MVM_SPESH_BLOCKING=1 ./perl6-gdb-m ~/scratch.pl6
================================================================================================
This is Rakudo Perl 6 running in the GNU 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 2017.09.75.gc.46.de.00.f.0 built on MoarVM version 2017.09.1.32.g.9749.b.0.fa,
running on ubuntu (14.04.3.LTS.Trusty.Tahr) / linux (3.19.0.32.generic)
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=./perl6-gdb-m --libpath=. --libpath=blib --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 /home/dogbert/repos/rakudo/perl6.moarvm --nqp-lib=blib /home/dogbert/scratch.pl6
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xb707cb40 (LWP 21357)]
[New Thread 0xb372ab40 (LWP 21358)]
[New Thread 0xb29feb40 (LWP 21359)]
[New Thread 0xb1bfeb40 (LWP 21360)]
[New Thread 0xb0dfeb40 (LWP 21361)]
[New Thread 0xafffeb40 (LWP 21362)]
[New Thread 0xaeffeb40 (LWP 21363)]
[New Thread 0xae3fcb40 (LWP 21364)]
[New Thread 0xab3f6b40 (LWP 21365)]
ok 1 - No races/crashes around interval that emits done (used to SEGV and various errors)
[Thread 0xb29feb40 (LWP 21359) exited]
[Thread 0xab3f6b40 (LWP 21365) exited]
[Thread 0xae3fcb40 (LWP 21364) exited]
[Thread 0xaeffeb40 (LWP 21363) exited]
[Thread 0xb0dfeb40 (LWP 21361) exited]
[Thread 0xb1bfeb40 (LWP 21360) exited]
[Thread 0xb372ab40 (LWP 21358) exited]
[Thread 0xb707cb40 (LWP 21357) exited]
[Thread 0xb78a0700 (LWP 21356) exited]
[Inferior 1 (process 21356) exited normally]
(gdb) r
Starting program: /home/dogbert/repos/rakudo/install/bin/moar --execname=./perl6-gdb-m --libpath=. --libpath=blib --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 /home/dogbert/repos/rakudo/perl6.moarvm --nqp-lib=blib /home/dogbert/scratch.pl6
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xb707cb40 (LWP 21367)]
[New Thread 0xb372ab40 (LWP 21368)]
[New Thread 0xb29feb40 (LWP 21369)]
[New Thread 0xb1bfeb40 (LWP 21370)]
[New Thread 0xb0dfeb40 (LWP 21371)]
[New Thread 0xafffeb40 (LWP 21372)]
[New Thread 0xaf1feb40 (LWP 21373)]
[New Thread 0xae1feb40 (LWP 21374)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb1bfeb40 (LWP 21370)]
0xb7bd77f0 in MVM_gc_root_add_frame_registers_to_worklist (tc=0xa5434e8, worklist=0xad84b9c0, frame=0xab7fb6f4) at src/gc/roots.c:404
404 type_map = frame->static_info->body.local_types;
(gdb) bt
#0 0xb7bd77f0 in MVM_gc_root_add_frame_registers_to_worklist (tc=0xa5434e8, worklist=0xad84b9c0, frame=0xab7fb6f4) at src/gc/roots.c:404
#1 0xb7bd7776 in MVM_gc_root_add_frame_roots_to_worklist (tc=0xa5434e8, worklist=0xad84b9c0, cur_frame=0xab7fb6f4) at src/gc/roots.c:386
#2 0xb7bd9448 in MVM_gc_mark_collectable (tc=0xa5434e8, worklist=0xad84b9c0, new_addr=0xab7fb6f4) at src/gc/collect.c:384
#3 0xb7bd8842 in process_worklist (tc=0xa5434e8, worklist=0xad84b9c0, wtp=0xb1bfcfe8, gen=0 '\000') at src/gc/collect.c:314
#4 0xb7bd8378 in MVM_gc_collect (tc=0xa5434e8, what_to_do=1 '\001', gen=0 '\000') at src/gc/collect.c:119
#5 0xb7bd42ff in run_gc (tc=0xb2ea5308, what_to_do=0 '\000') at src/gc/orchestrate.c:359
#6 0xb7bd46f6 in MVM_gc_enter_from_allocator (tc=0xb2ea5308) at src/gc/orchestrate.c:472
#7 0xb7bd4ab4 in MVM_gc_allocate_nursery (tc=0xb2ea5308, size=112) at src/gc/allocation.c:32
#8 0xb7bd49c9 in MVM_gc_allocate (tc=0xb2ea5308, size=112) at src/gc/allocation.h:13
#9 0xb7bd4b1c in MVM_gc_allocate_zeroed (tc=0xb2ea5308, size=112) at src/gc/allocation.c:49
#10 0xb7bd4d65 in MVM_gc_allocate_frame (tc=0xb2ea5308) at src/gc/allocation.c:99
#11 0xb7bb1d1a in allocate_frame (tc=0xb2ea5308, static_frame=0x8a96c98, spesh_cand=0xb6767cf0, heap=1) at src/core/frame.c:241
#12 0xb7bb255d in MVM_frame_invoke (tc=0xb2ea5308, static_frame=0x8a96c98, callsite=0xb7fd7444 <null_args_callsite>, args=0x9018978, outer=0xad3ffec4, code_ref=0xad3ffe9c, spesh_cand=0) at src/core/frame.c:484
#13 0xb7c01c40 in invoke_handler (tc=0xb2ea5308, invokee=0xb1ffef64, callsite=0xb7fd7444 <null_args_callsite>, args=0x9018978) at src/6model/reprs/MVMCode.c:10
#14 0xb7b8c16a in MVM_interp_run (tc=0xb2ea5308, initial_invoke=0xb7bbaf39 <thread_initial_invoke>, invoke_data=0xb2ea4fd0) at src/core/interp.c:990
#15 0xb7bbb059 in start_thread (data=0xb2ea4fd0) at src/core/threads.c:83
#16 0xb78b6f72 in start_thread (arg=0xb1bfeb40) at pthread_create.c:312
#17 0xb7a013ee in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129
(gdb) info threads
Id Target Id Frame
9 Thread 0xae1feb40 (LWP 21374) "moar" 0xb7fdccb0 in ?? ()
8 Thread 0xaf1feb40 (LWP 21373) "moar" 0xb7fdccb0 in ?? ()
7 Thread 0xafffeb40 (LWP 21372) "moar" 0xb7fdccb0 in ?? ()
6 Thread 0xb0dfeb40 (LWP 21371) "moar" 0xb7fdccb0 in ?? ()
* 5 Thread 0xb1bfeb40 (LWP 21370) "moar" 0xb7bd77f0 in MVM_gc_root_add_frame_registers_to_worklist (tc=0xa5434e8, worklist=0xad84b9c0, frame=0xab7fb6f4) at src/gc/roots.c:404
4 Thread 0xb29feb40 (LWP 21369) "moar" 0xb7fdccb0 in ?? ()
3 Thread 0xb372ab40 (LWP 21368) "moar" 0xb7fdccb0 in ?? ()
2 Thread 0xb707cb40 (LWP 21367) "moar" 0xb7fdccb0 in ?? ()
1 Thread 0xb78a0700 (LWP 21366) "moar" 0xb7fdccb0 in ?? ()
(gdb) p MVM_dump_backtrace(tc)
at SETTING::src/core/ThreadPoolScheduler.pm:645 (./CORE.setting.moarvm:to-millis)
from SETTING::src/core/ThreadPoolScheduler.pm:608 (./CORE.setting.moarvm:)
from SETTING::src/core/ThreadPoolScheduler.pm:581 (./CORE.setting.moarvm:cue)
from SETTING::src/core/Supply.pm:146 (./CORE.setting.moarvm:)
from SETTING::src/core/Lock/Async.pm:123 (./CORE.setting.moarvm:protect)
from SETTING::src/core/Supply.pm:145 (./CORE.setting.moarvm:tap)
from SETTING::src/core/Supply.pm:78 (./CORE.setting.moarvm:tap)
from SETTING::src/core/Supply.pm:1857 (./CORE.setting.moarvm:)
from <unknown>:1 (./CORE.setting.moarvm:)
from SETTING::src/core/Lock/Async.pm:202 (./CORE.setting.moarvm:)
from SETTING::src/core/Lock/Async.pm:200 (./CORE.setting.moarvm:with-lock-hidden-from-recursion-check)
from SETTING::src/core/Supply.pm:1854 (./CORE.setting.moarvm:add-whenever)
from SETTING::src/core/Supply.pm:2005 (./CORE.setting.moarvm:WHENEVER)
from /home/dogbert/scratch.pl6:3 (<ephemeral file>:)
from SETTING::src/core/Supply.pm:1912 (./CORE.setting.moarvm:)
from SETTING::src/core/Supply.pm:1943 (./CORE.setting.moarvm:)
from SETTING::src/core/Lock/Async.pm:182 (./CORE.setting.moarvm:)
from SETTING::src/core/Lock/Async.pm:179 (./CORE.setting.moarvm:run-with-updated-recursion-list)
from SETTING::src/core/Lock/Async.pm:141 (./CORE.setting.moarvm:)
from SETTING::src/core/Lock/Async.pm:138 (./CORE.setting.moarvm:protect-or-queue-on-recursion)
from SETTING::src/core/Supply.pm:1921 (./CORE.setting.moarvm:run-supply-code)
from SETTING::src/core/Supply.pm:1911 (./CORE.setting.moarvm:tap)
from SETTING::src/core/Supply.pm:78 (./CORE.setting.moarvm:tap)
from SETTING::src/core/Supply.pm:1857 (./CORE.setting.moarvm:)
from <unknown>:1 (./CORE.setting.moarvm:)
from SETTING::src/core/Lock/Async.pm:202 (./CORE.setting.moarvm:)
from SETTING::src/core/Lock/Async.pm:200 (./CORE.setting.moarvm:with-lock-hidden-from-recursion-check)
from SETTING::src/core/Supply.pm:1854 (./CORE.setting.moarvm:add-whenever)
from SETTING::src/core/Supply.pm:2005 (./CORE.setting.moarvm:WHENEVER)
from /home/dogbert/scratch.pl6:7 (<ephemeral file>:)
from SETTING::src/core/Supply.pm:1912 (./CORE.setting.moarvm:)
from SETTING::src/core/Supply.pm:1943 (./CORE.setting.moarvm:)
from SETTING::src/core/Lock/Async.pm:182 (./CORE.setting.moarvm:)
from SETTING::src/core/Lock/Async.pm:179 (./CORE.setting.moarvm:run-with-updated-recursion-list)
from SETTING::src/core/Lock/Async.pm:141 (./CORE.setting.moarvm:)
from SETTING::src/core/Lock/Async.pm:138 (./CORE.setting.moarvm:protect-or-queue-on-recursion)
from SETTING::src/core/Supply.pm:1921 (./CORE.setting.moarvm:run-supply-code)
from SETTING::src/core/Supply.pm:1911 (./CORE.setting.moarvm:tap)
from SETTING::src/core/Supply.pm:78 (./CORE.setting.moarvm:tap)
from SETTING::src/core/Supply.pm:2013 (./CORE.setting.moarvm:REACT)
from /home/dogbert/scratch.pl6:7 (<ephemeral file>:)
from /home/dogbert/scratch.pl6:6 (<ephemeral file>:)
from SETTING::src/core/Promise.pm:217 (./CORE.setting.moarvm:)
from SETTING::src/core/ThreadPoolScheduler.pm:634 (./CORE.setting.moarvm:)
from SETTING::src/core/ThreadPoolScheduler.pm:221 (./CORE.setting.moarvm:)
from SETTING::src/core/ThreadPoolScheduler.pm:215 (./CORE.setting.moarvm:run-one)
from SETTING::src/core/Mu.pm:734 (./CORE.setting.moarvm:dispatch:<!>)
from SETTING::src/core/ThreadPoolScheduler.pm:252 (./CORE.setting.moarvm:)
from SETTING::src/core/Thread.pm:30 (./CORE.setting.moarvm:THREAD-ENTRY)
$1 = void
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment