Last active
December 10, 2016 23:17
-
-
Save dogbert17/a73858a3b218df8bd967d921585ef345 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dogbert@dogbert-VirtualBox ~/repos/rakudo $ ./perl6-gdb-m t/spec/S32-io/socket-recv-vs-read.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 2016.11.173.ga.8.ba.26.bbe built on MoarVM version 2016.11.41.gd.2139.b.52, | |
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=/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/S32-io/socket-recv-vs-read.t | |
[Thread debugging using libthread_db enabled] | |
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1". | |
1..11 | |
[New Thread 0xb6626b40 (LWP 20396)] | |
[New Thread 0xb5cffb40 (LWP 20397)] | |
[New Thread 0xb52ffb40 (LWP 20398)] | |
ok 1 - can recv immediately with recv (chars) | |
[New Thread 0xb4afeb40 (LWP 20399)] | |
ok 2 - can recv rest afterwards (chars) | |
*** Error in `/home/dogbert/repos/rakudo/install/bin/moar': double free or corruption (fasttop): 0xb5d358f0 *** | |
Program received signal SIGABRT, Aborted. | |
[Switching to Thread 0xb5cffb40 (LWP 20397)] | |
0xb7fdccb0 in ?? () | |
(gdb) bt | |
#0 0xb7fdccb0 in ?? () | |
#1 0xb7af34ba in malloc_printerr (action=<optimized out>, str=0xb7be5e80 "double free or corruption (fasttop)", ptr=0xb5d358f0) at malloc.c:4996 | |
#2 0xb7af412d in _int_free (av=0xb5d00010, p=<optimized out>, have_lock=0) at malloc.c:3840 | |
#3 0xb7d6293a in MVM_free (p=0xb5d358f0) at src/core/alloc.h:29 | |
#4 0xb7d6323e in MVM_concblockingqueue_poll (tc=0xa2b0cc0, queue=0x804c664) at src/6model/reprs/ConcBlockingQueue.c:278 | |
#5 0xb7d27cd5 in setup_work (tc=0xa2b0cc0) at src/io/eventloop.c:18 | |
#6 0xb7d27dc2 in async_handler (handle=0xb5300468) at src/io/eventloop.c:41 | |
#7 0xb7dde325 in uv.async_event () from //home/dogbert/repos/rakudo/install/lib/libmoar.so | |
#8 0xb7dde426 in uv.async_io () from //home/dogbert/repos/rakudo/install/lib/libmoar.so | |
#9 0xb7dda912 in uv.io_poll () from //home/dogbert/repos/rakudo/install/lib/libmoar.so | |
#10 0xb7dded13 in uv_run () from //home/dogbert/repos/rakudo/install/lib/libmoar.so | |
#11 0xb7d27e68 in enter_loop (tc=0xa2b0cc0, callsite=0xb7fd7604 <null_args_callsite>, args=0x0) at src/io/eventloop.c:60 | |
#12 0xb7d43acb in invoke_handler (tc=0xa2b0cc0, invokee=0x8106778, callsite=0xb7fd7604 <null_args_callsite>, args=0x0) at src/6model/reprs/MVMCFunction.c:9 | |
#13 0xb7d05a84 in thread_initial_invoke (tc=0xa2b0cc0, data=0xa2b1290) at src/core/threads.c:56 | |
#14 0xb7cd1dd1 in MVM_interp_run (tc=0xa2b0cc0, initial_invoke=0xb7d059c0 <thread_initial_invoke>, invoke_data=0xa2b1290) at src/core/interp.c:74 | |
#15 0xb7d05b02 in start_thread (data=0xa2b1290) at src/core/threads.c:77 | |
#16 0xb7de8607 in uv.thread_start () from //home/dogbert/repos/rakudo/install/lib/libmoar.so | |
#17 0xb7a23f72 in start_thread (arg=0xb5cffb40) at pthread_create.c:312 | |
#18 0xb7b6bf8e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129 | |
# valgrind | |
dogbert@dogbert-VirtualBox ~/repos/rakudo $ ./perl6-valgrind-m t/spec/S32-io/socket-recv-vs-read.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 2016.11.179.ga.34.f.0.afe.7 built on MoarVM version 2016.11.45.g.8627.dd.13, | |
running on ubuntu (14.04.3.LTS.Trusty.Tahr) / linux (3.19.0.32.generic) | |
------------------------------------------------------------------------------------------------ | |
==4294== Memcheck, a memory error detector | |
==4294== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. | |
==4294== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info | |
==4294== Command: /home/dogbert/repos/rakudo/install/bin/moar --execname=./perl6-ugga --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/S32-io/socket-recv-vs-read.t | |
==4294== | |
1..11 | |
ok 1 - can recv immediately with recv (chars) | |
ok 2 - can recv rest afterwards (chars) | |
ok 3 - recv char count is not lower limit (chars) | |
ok 4 - recv argument serves as upper limit (chars) | |
==4294== Thread 3: | |
==4294== Invalid read of size 4 | |
==4294== at 0x4161E23: MVM_concblockingqueue_poll (ConcBlockingQueue.c:277) | |
==4294== by 0x411D0E4: setup_work (eventloop.c:18) | |
==4294== by 0x411D1D1: async_handler (eventloop.c:41) | |
==4294== by 0x41E0654: uv__async_event (in /home/dogbert/repos/rakudo/install/lib/libmoar.so) | |
==4294== by 0x41E0755: uv__async_io (in /home/dogbert/repos/rakudo/install/lib/libmoar.so) | |
==4294== by 0x41DCC41: uv__io_poll (in /home/dogbert/repos/rakudo/install/lib/libmoar.so) | |
==4294== by 0x41E1042: uv_run (in /home/dogbert/repos/rakudo/install/lib/libmoar.so) | |
==4294== by 0x411D277: enter_loop (eventloop.c:60) | |
==4294== by 0x413C844: invoke_handler (MVMCFunction.c:9) | |
==4294== by 0x40F8F0C: thread_initial_invoke (threads.c:56) | |
==4294== by 0x40C2175: MVM_interp_run (interp.c:74) | |
==4294== by 0x40F8F8A: start_thread (threads.c:77) | |
==4294== Address 0x72642d4 is 4 bytes inside a block of size 8 free'd | |
==4294== at 0x402B3D8: free (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) | |
==4294== by 0x41613A6: MVM_free (alloc.h:29) | |
==4294== by 0x4161E36: MVM_concblockingqueue_poll (ConcBlockingQueue.c:278) | |
==4294== by 0x411D0E4: setup_work (eventloop.c:18) | |
==4294== by 0x411D1D1: async_handler (eventloop.c:41) | |
==4294== by 0x41E0654: uv__async_event (in /home/dogbert/repos/rakudo/install/lib/libmoar.so) | |
==4294== by 0x41E0755: uv__async_io (in /home/dogbert/repos/rakudo/install/lib/libmoar.so) | |
==4294== by 0x41DCC41: uv__io_poll (in /home/dogbert/repos/rakudo/install/lib/libmoar.so) | |
==4294== by 0x41E1042: uv_run (in /home/dogbert/repos/rakudo/install/lib/libmoar.so) | |
==4294== by 0x411D277: enter_loop (eventloop.c:60) | |
==4294== by 0x413C844: invoke_handler (MVMCFunction.c:9) | |
==4294== by 0x40F8F0C: thread_initial_invoke (threads.c:56) | |
==4294== | |
==4294== Invalid free() / delete / delete[] / realloc() | |
==4294== at 0x402B3D8: free (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) | |
==4294== by 0x41613A6: MVM_free (alloc.h:29) | |
==4294== by 0x4161E36: MVM_concblockingqueue_poll (ConcBlockingQueue.c:278) | |
==4294== by 0x411D0E4: setup_work (eventloop.c:18) | |
==4294== by 0x411D1D1: async_handler (eventloop.c:41) | |
==4294== by 0x41E0654: uv__async_event (in /home/dogbert/repos/rakudo/install/lib/libmoar.so) | |
==4294== by 0x41E0755: uv__async_io (in /home/dogbert/repos/rakudo/install/lib/libmoar.so) | |
==4294== by 0x41DCC41: uv__io_poll (in /home/dogbert/repos/rakudo/install/lib/libmoar.so) | |
==4294== by 0x41E1042: uv_run (in /home/dogbert/repos/rakudo/install/lib/libmoar.so) | |
==4294== by 0x411D277: enter_loop (eventloop.c:60) | |
==4294== by 0x413C844: invoke_handler (MVMCFunction.c:9) | |
==4294== by 0x40F8F0C: thread_initial_invoke (threads.c:56) | |
==4294== Address 0x72642d0 is 0 bytes inside a block of size 8 free'd | |
==4294== at 0x402B3D8: free (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) | |
==4294== by 0x41613A6: MVM_free (alloc.h:29) | |
==4294== by 0x4161E36: MVM_concblockingqueue_poll (ConcBlockingQueue.c:278) | |
==4294== by 0x411D0E4: setup_work (eventloop.c:18) | |
==4294== by 0x411D1D1: async_handler (eventloop.c:41) | |
==4294== by 0x41E0654: uv__async_event (in /home/dogbert/repos/rakudo/install/lib/libmoar.so) | |
==4294== by 0x41E0755: uv__async_io (in /home/dogbert/repos/rakudo/install/lib/libmoar.so) | |
==4294== by 0x41DCC41: uv__io_poll (in /home/dogbert/repos/rakudo/install/lib/libmoar.so) | |
==4294== by 0x41E1042: uv_run (in /home/dogbert/repos/rakudo/install/lib/libmoar.so) | |
==4294== by 0x411D277: enter_loop (eventloop.c:60) | |
==4294== by 0x413C844: invoke_handler (MVMCFunction.c:9) | |
==4294== by 0x40F8F0C: thread_initial_invoke (threads.c:56) | |
==4294== | |
ok 5 - can recv immediately with recv (bytes) | |
ok 6 - can recv rest afterwards (bytes) | |
ok 7 - recv char count is not lower limit (bytes) | |
ok 8 - recv argument serves as upper limit (bytes) | |
ok 9 - read blocks until it has enough data | |
ok 10 - read gets the chars from across low level socket reads | |
ok 11 - read stops blocking when server closes connection | |
==4294== | |
==4294== HEAP SUMMARY: | |
==4294== in use at exit: 40,584,435 bytes in 298,863 blocks | |
==4294== total heap usage: 616,285 allocs, 317,423 frees, 115,263,659 bytes allocated | |
==4294== | |
==4294== LEAK SUMMARY: | |
==4294== definitely lost: 5,858 bytes in 184 blocks | |
==4294== indirectly lost: 14,596 bytes in 677 blocks | |
==4294== possibly lost: 5,492,930 bytes in 88,459 blocks | |
==4294== still reachable: 35,071,051 bytes in 209,543 blocks | |
==4294== suppressed: 0 bytes in 0 blocks | |
==4294== Rerun with --leak-check=full to see details of leaked memory | |
==4294== | |
==4294== For counts of detected and suppressed errors, rerun with: -v | |
==4294== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment