Skip to content

Instantly share code, notes, and snippets.

@MasterDuke17
Created August 19, 2017 15:38
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 MasterDuke17/7a62c88617e9dfa1f27e7031574a5177 to your computer and use it in GitHub Desktop.
Save MasterDuke17/7a62c88617e9dfa1f27e7031574a5177 to your computer and use it in GitHub Desktop.
SEGV in t/spec/S17-promise/nonblocking-await.t
================================================================================================
This is Rakudo Perl 6 running in valgrind, a tool for debugging and profiling programs.
Running a program in valgrind usually takes *a lot* more time than running it directly,
so please be patient.
This Rakudo version is 2017.07.208.gccf.6.da.9.e.4 built on MoarVM version 2017.07.467.gf.22.f.8.d.7.c,
running on ubuntu (17.04.Zesty.Zapus) / linux (4.10.0.28.generic)
------------------------------------------------------------------------------------------------
==19564== Memcheck, a memory error detector
==19564== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==19564== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info
==19564== Command: /home/dan/Source/perl6/install/bin/moar --full-cleanup --execname=./perl6-valgrind-m --libpath=/home/dan/Source/perl6/install/share/nqp/lib --libpath=/home/dan/Source/perl6/install/share/nqp/lib --libpath=. /home/dan/Source/perl6/rakudo/perl6.moarvm --nqp-lib=blib t/spec/S17-promise/nonblocking-await.t
==19564==
1..19
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
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
==19564== Thread 2:
==19564== Invalid read of size 8
==19564== at 0x5018F8D: shift (ConcBlockingQueue.c:205)
==19564== by 0x4FFA2F1: MVM_repr_shift_o (reprconv.c:425)
==19564== by 0x50482CA: worker (worker.c:13)
==19564== by 0x4FD4AA0: thread_initial_invoke (threads.c:59)
==19564== by 0x4FB29FE: MVM_interp_run (interp.c:88)
==19564== by 0x4FD4B07: start_thread (threads.c:83)
==19564== by 0x50A9326: uv__thread_start (in /home/dan/Source/perl6/install/lib/libmoar.so)
==19564== by 0x5D026D9: start_thread (pthread_create.c:456)
==19564== Address 0x8 is not stack'd, malloc'd or (recently) free'd
==19564==
==19564==
==19564== Process terminating with default action of signal 11 (SIGSEGV)
==19564== Access not within mapped region at address 0x8
==19564== at 0x5018F8D: shift (ConcBlockingQueue.c:205)
==19564== by 0x4FFA2F1: MVM_repr_shift_o (reprconv.c:425)
==19564== by 0x50482CA: worker (worker.c:13)
==19564== by 0x4FD4AA0: thread_initial_invoke (threads.c:59)
==19564== by 0x4FB29FE: MVM_interp_run (interp.c:88)
==19564== by 0x4FD4B07: start_thread (threads.c:83)
==19564== by 0x50A9326: uv__thread_start (in /home/dan/Source/perl6/install/lib/libmoar.so)
==19564== by 0x5D026D9: start_thread (pthread_create.c:456)
==19564== If you believe this happened as a result of a stack
==19564== overflow in your program's main thread (unlikely but
==19564== possible), you can try to increase the size of the
==19564== main thread stack using the --main-stacksize= flag.
==19564== The main thread stack size used in this run was 8388608.
==19564==
==19564== HEAP SUMMARY:
==19564== in use at exit: 129,635,775 bytes in 239,963 blocks
==19564== total heap usage: 943,509 allocs, 703,546 frees, 347,894,115 bytes allocated
==19564==
==19564== LEAK SUMMARY:
==19564== definitely lost: 143,496 bytes in 4,596 blocks
==19564== indirectly lost: 856 bytes in 30 blocks
==19564== possibly lost: 406,856 bytes in 7,245 blocks
==19564== still reachable: 129,084,567 bytes in 228,092 blocks
==19564== suppressed: 0 bytes in 0 blocks
==19564== Rerun with --leak-check=full to see details of leaked memory
==19564==
==19564== For counts of detected and suppressed errors, rerun with: -v
==19564== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Segmentation fault (core dumped)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment