Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Created September 26, 2017 09:59
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/ead3d659b038b371b128cd9b12e41c0b to your computer and use it in GitHub Desktop.
Save dogbert17/ead3d659b038b371b128cd9b12e41c0b to your computer and use it in GitHub Desktop.
t/spec/S17-promise/nonblocking-await.t
dogbert@dogbert-VirtualBox ~/repos/rakudo $ MVM_SPESH_BLOCKING=1 ./perl6-gdb-m t/spec/S17-promise/nonblocking-await.t
================================================================================================
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.92.g.8.cf.083.c.70 built on MoarVM version 2017.09.1.32.g.9749.b.0.fa.1,
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 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 0xb707cb40 (LWP 12437)]
1..27
[New Thread 0xb2f79b40 (LWP 12438)]
[New Thread 0xb21feb40 (LWP 12439)]
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 0xb07fcb40 (LWP 12440)]
[New Thread 0xafbfab40 (LWP 12441)]
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
1..3
ok 1 - code dies
ok 2 - right exception type (Exception)
ok 3 - .message matches strewth
ok 9 - Hundred of outstanding awaits on supplies that die works
ok 10 - Hundred of outstanding awaits on channels works
1..2
ok 1 - code dies
ok 2 - right exception type (X::Channel::ReceiveOnClosed)
ok 11 - Hundred of outstanding awaits on channels that gets closed works
ok 12 - Exception from awaiting broken Promise does X::Await::Died
ok 13 - Exception contains original exception message
ok 14 - Exception contains stack location where Promise code died
ok 15 - Exception contains stack location where we awaited
ok 16 - Exception from awaiting many things, where on dies, does X::Await::Died
ok 17 - Exception contains original exception message
ok 18 - Exception contains stack location where Promise code died
ok 19 - Exception contains stack location where we awaited
[New Thread 0xad7feb40 (LWP 12442)]
[New Thread 0xac9feb40 (LWP 12443)]
ok 20 - No error due to trying to do non-blocking await when lock held
ok 21 - No error due to trying to do non-blocking await when lock held
[New Thread 0xabdfcb40 (LWP 12444)]
ok 22 - Server survived
ok 23 - Got 20 responses from async socket server that does non-blocking await
ok 24 - First response correct
ok 25 - Rest of responses also correct
ok 26 - slips awaited over get flattened out
ok 27 - slips awaited over get flattened out
[Thread 0xb07fcb40 (LWP 12440) exited]
[Thread 0xac9feb40 (LWP 12443) exited]
[Thread 0xb21feb40 (LWP 12439) exited]
[Thread 0xb2f79b40 (LWP 12438) exited]
[Thread 0xb707cb40 (LWP 12437) exited]
[Thread 0xafbfab40 (LWP 12441) exited]
[Thread 0xabdfcb40 (LWP 12444) exited]
[Thread 0xb78a0700 (LWP 12433) exited]
[Inferior 1 (process 12433) exited normally]
(gdb) b MVM_panic
Breakpoint 1 at 0xb7b84f75: file src/core/exceptions.c, line 688.
(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 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 0xb707cb40 (LWP 12574)]
1..27
[New Thread 0xb2f79b40 (LWP 12575)]
[New Thread 0xb21feb40 (LWP 12576)]
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 0xb07fcb40 (LWP 12577)]
[New Thread 0xafbfab40 (LWP 12578)]
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
1..3
ok 1 - code dies
ok 2 - right exception type (Exception)
ok 3 - .message matches strewth
ok 9 - Hundred of outstanding awaits on supplies that die works
Breakpoint 1, MVM_panic (exitCode=17, messageFormat=0xb7cb7eb0 "Internal error: zeroed target thread ID in work pass") at src/core/exceptions.c:688
688 fprintf(stderr, "MoarVM panic: ");
(gdb) bt
#0 MVM_panic (exitCode=17, messageFormat=0xb7cb7eb0 "Internal error: zeroed target thread ID in work pass") at src/core/exceptions.c:688
#1 0xb7bd9627 in pass_work_item (tc=0xb263b028, wtp=0xbfffdb48, item_ptr=0xb081c4d0) at src/gc/collect.c:446
#2 0xb7bd8550 in process_worklist (tc=0xb263b028, worklist=0xa118668, wtp=0xbfffdb48, gen=0 '\000') at src/gc/collect.c:213
#3 0xb7bd8008 in MVM_gc_collect (tc=0xb263b028, what_to_do=2 '\002', gen=0 '\000') at src/gc/collect.c:56
#4 0xb7bd3b5e in process_in_tray (tc=0xb263b028, gen=0 '\000') at src/gc/orchestrate.c:102
#5 0xb7bd3c38 in finish_gc (tc=0x804c5b8, gen=0 '\000', is_coordinator=1 '\001') at src/gc/orchestrate.c:133
#6 0xb7bd431c in run_gc (tc=0x804c5b8, what_to_do=0 '\000') at src/gc/orchestrate.c:363
#7 0xb7bd46e6 in MVM_gc_enter_from_allocator (tc=0x804c5b8) at src/gc/orchestrate.c:472
#8 0xb7bd4aa4 in MVM_gc_allocate_nursery (tc=0x804c5b8, size=28) at src/gc/allocation.c:32
#9 0xb7bd49b9 in MVM_gc_allocate (tc=0x804c5b8, size=28) at src/gc/allocation.h:13
#10 0xb7bd4b0c in MVM_gc_allocate_zeroed (tc=0x804c5b8, size=28) at src/gc/allocation.c:49
#11 0xb7bd4cb4 in MVM_gc_allocate_object (tc=0x804c5b8, st=0x8656b90) at src/gc/allocation.c:86
#12 0xb7c1d932 in lex_ref (tc=0x804c5b8, type=0x86580c0, f=0xb749f038, env_idx=0, reg_type=4) at src/6model/reprs/NativeRef.c:204
#13 0xb7c1db0d in MVM_nativeref_lex_i (tc=0x804c5b8, outers=0, idx=0) at src/6model/reprs/NativeRef.c:239
#14 0xb7ba40a2 in MVM_interp_run (tc=0x804c5b8, initial_invoke=0xb7c8bb93 <toplevel_initial_invoke>, invoke_data=0x80bb758) at src/core/interp.c:4566
#15 0xb7c8bcf2 in MVM_vm_run_file (instance=0x804c008, filename=0xbffff272 "/home/dogbert/repos/rakudo/perl6.moarvm") at src/moar.c:387
#16 0x08048f3f in main (argc=10, argv=0xbfffef74) at src/main.c:255
(gdb) info threads
Id Target Id Frame
6 Thread 0xafbfab40 (LWP 12578) "moar" 0xb7fdccb0 in ?? ()
5 Thread 0xb07fcb40 (LWP 12577) "moar" 0xb7fdccb0 in ?? ()
4 Thread 0xb21feb40 (LWP 12576) "moar" 0xb7fdccb0 in ?? ()
3 Thread 0xb2f79b40 (LWP 12575) "moar" 0xb7fdccb0 in ?? ()
2 Thread 0xb707cb40 (LWP 12574) "moar" 0xb7fdccb0 in ?? ()
* 1 Thread 0xb78a0700 (LWP 12573) "moar" MVM_panic (exitCode=17, messageFormat=0xb7cb7eb0 "Internal error: zeroed target thread ID in work pass") at src/core/exceptions.c:688
(gdb) f 1
#1 0xb7bd9627 in pass_work_item (tc=0xb263b028, wtp=0xbfffdb48, item_ptr=0xb081c4d0) at src/gc/collect.c:446
446 MVM_panic(MVM_exitcode_gcnursery, "Internal error: zeroed target thread ID in work pass");
(gdb) p MVM_dump_backtrace(tc)
at SETTING::src/core/ThreadPoolScheduler.pm:265 (./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