Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Created November 22, 2016 21:50
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/789bca68558a1b502e21731b3092aaff to your computer and use it in GitHub Desktop.
Save dogbert17/789bca68558a1b502e21731b3092aaff to your computer and use it in GitHub Desktop.
SEGV part II
dogbert@dogbert-VirtualBox ~/repos/rakudo $ ./perl6-valgrind-m -I lib t/spec/S04-declarations/constant.rakudo.moar
================================================================================================
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.31.g.17604.e.3 built on MoarVM version 2016.11,
running on ubuntu (14.04.3.LTS.Trusty.Tahr) / linux (3.19.0.32.generic)
------------------------------------------------------------------------------------------------
==6607== Memcheck, a memory error detector
==6607== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==6607== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==6607== Command: /home/dogbert/repos/rakudo/install/bin/moar --full-cleanup --execname=./perl6-valgrind-m --libpath=/home/dogbert/repos/rakudo/install/share/nqp/lib --libpath=. /home/dogbert/repos/rakudo/perl6.moarvm -I lib t/spec/S04-declarations/constant.rakudo.moar
==6607==
==6607== Invalid free() / delete / delete[] / realloc()
==6607== at 0x4105E53: MVM_fixed_size_free_at_safepoint (fixedsizealloc.c:286)
==6607== by 0x4197E79: twiddle_trie_node (nfg.c:132)
==6607== by 0x4197EC2: add_synthetic_to_trie (nfg.c:138)
==6607== by 0x419809F: add_synthetic (nfg.c:188)
==6607== by 0x4198135: lookup_or_add_synthetic (nfg.c:202)
==6607== by 0x419818C: MVM_nfg_codes_to_grapheme (nfg.c:217)
==6607== by 0x41AC963: grapheme_composition (normalize.c:558)
==6607== by 0x41ACD0B: MVM_unicode_normalizer_process_codepoint_full (normalize.c:661)
==6607== by 0x4194E5A: MVM_unicode_normalizer_process_codepoint (normalize.h:111)
==6607== by 0x4194E86: MVM_unicode_normalizer_process_codepoint_to_grapheme (normalize.h:119)
==6607== by 0x419573F: MVM_string_utf8_decode (utf8.c:198)
==6607== by 0x40E882E: MVM_cu_obtain_string (compunit.c:228)
==6607== Address 0x46890c4 is 0 bytes inside a block of size 16 client-defined
==6607== at 0x41059B3: alloc_slow_path (fixedsizealloc.c:131)
==6607== by 0x4105B3E: MVM_fixed_size_alloc (fixedsizealloc.c:181)
==6607== by 0x4197B6B: twiddle_trie_node (nfg.c:46)
==6607== by 0x4197EC2: add_synthetic_to_trie (nfg.c:138)
==6607== by 0x419809F: add_synthetic (nfg.c:188)
==6607== by 0x4198135: lookup_or_add_synthetic (nfg.c:202)
==6607== by 0x41981FA: MVM_nfg_crlf_grapheme (nfg.c:232)
==6607== by 0x4193D26: MVM_string_decode_stream_sep_default (decode_stream.c:522)
==6607== by 0x411A3BA: MVM_io_syncstream_from_uvstream (syncstream.c:347)
==6607== by 0x411C763: MVM_file_get_stdstream (fileops.c:357)
==6607== by 0x41BBCA6: setup_std_handles (moar.c:270)
==6607== by 0x41BBC5B: MVM_vm_create_instance (moar.c:260)
==6607==
==6607== Invalid free() / delete / delete[] / realloc()
==6607== at 0x4105E53: MVM_fixed_size_free_at_safepoint (fixedsizealloc.c:286)
==6607== by 0x4197E79: twiddle_trie_node (nfg.c:132)
==6607== by 0x4197BDD: twiddle_trie_node (nfg.c:52)
==6607== by 0x4197EC2: add_synthetic_to_trie (nfg.c:138)
==6607== by 0x419809F: add_synthetic (nfg.c:188)
==6607== by 0x4198135: lookup_or_add_synthetic (nfg.c:202)
==6607== by 0x419818C: MVM_nfg_codes_to_grapheme (nfg.c:217)
==6607== by 0x41AC963: grapheme_composition (normalize.c:558)
==6607== by 0x41ACD0B: MVM_unicode_normalizer_process_codepoint_full (normalize.c:661)
==6607== by 0x4194E5A: MVM_unicode_normalizer_process_codepoint (normalize.h:111)
==6607== by 0x4194E86: MVM_unicode_normalizer_process_codepoint_to_grapheme (normalize.h:119)
==6607== by 0x419573F: MVM_string_utf8_decode (utf8.c:198)
==6607== Address 0x89b2f3c is 0 bytes inside a block of size 16 client-defined
==6607== at 0x41059B3: alloc_slow_path (fixedsizealloc.c:131)
==6607== by 0x4105B3E: MVM_fixed_size_alloc (fixedsizealloc.c:181)
==6607== by 0x4197B6B: twiddle_trie_node (nfg.c:46)
==6607== by 0x4197BDD: twiddle_trie_node (nfg.c:52)
==6607== by 0x4197EC2: add_synthetic_to_trie (nfg.c:138)
==6607== by 0x419809F: add_synthetic (nfg.c:188)
==6607== by 0x4198135: lookup_or_add_synthetic (nfg.c:202)
==6607== by 0x419818C: MVM_nfg_codes_to_grapheme (nfg.c:217)
==6607== by 0x41AC963: grapheme_composition (normalize.c:558)
==6607== by 0x41ACD0B: MVM_unicode_normalizer_process_codepoint_full (normalize.c:661)
==6607== by 0x4194E5A: MVM_unicode_normalizer_process_codepoint (normalize.h:111)
==6607== by 0x4194E86: MVM_unicode_normalizer_process_codepoint_to_grapheme (normalize.h:119)
==6607==
==6607== Invalid free() / delete / delete[] / realloc()
==6607== at 0x4105E53: MVM_fixed_size_free_at_safepoint (fixedsizealloc.c:286)
==6607== by 0x4197E79: twiddle_trie_node (nfg.c:132)
==6607== by 0x4197BDD: twiddle_trie_node (nfg.c:52)
==6607== by 0x4197BDD: twiddle_trie_node (nfg.c:52)
==6607== by 0x4197EC2: add_synthetic_to_trie (nfg.c:138)
==6607== by 0x419809F: add_synthetic (nfg.c:188)
==6607== by 0x4198135: lookup_or_add_synthetic (nfg.c:202)
==6607== by 0x419818C: MVM_nfg_codes_to_grapheme (nfg.c:217)
==6607== by 0x41AC963: grapheme_composition (normalize.c:558)
==6607== by 0x41ACD0B: MVM_unicode_normalizer_process_codepoint_full (normalize.c:661)
==6607== by 0x4194E5A: MVM_unicode_normalizer_process_codepoint (normalize.h:111)
==6607== by 0x4194E86: MVM_unicode_normalizer_process_codepoint_to_grapheme (normalize.h:119)
==6607== Address 0x89b30a4 is 0 bytes inside a block of size 16 client-defined
==6607== at 0x41059B3: alloc_slow_path (fixedsizealloc.c:131)
==6607== by 0x4105B3E: MVM_fixed_size_alloc (fixedsizealloc.c:181)
==6607== by 0x4197B6B: twiddle_trie_node (nfg.c:46)
==6607== by 0x4197BDD: twiddle_trie_node (nfg.c:52)
==6607== by 0x4197BDD: twiddle_trie_node (nfg.c:52)
==6607== by 0x4197EC2: add_synthetic_to_trie (nfg.c:138)
==6607== by 0x419809F: add_synthetic (nfg.c:188)
==6607== by 0x4198135: lookup_or_add_synthetic (nfg.c:202)
==6607== by 0x419818C: MVM_nfg_codes_to_grapheme (nfg.c:217)
==6607== by 0x41AC963: grapheme_composition (normalize.c:558)
==6607== by 0x41ACD0B: MVM_unicode_normalizer_process_codepoint_full (normalize.c:661)
==6607== by 0x4194E5A: MVM_unicode_normalizer_process_codepoint (normalize.h:111)
==6607==
==6614== Memcheck, a memory error detector
==6614== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==6614== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==6614== Command: /home/dogbert/repos/rakudo/install/bin/moar --full-cleanup --execname=./perl6-valgrind-m --libpath=/home/dogbert/repos/rakudo/install/share/nqp/lib --libpath=. /home/dogbert/repos/rakudo/perl6.moarvm --target=mbc --output=/home/dogbert/repos/rakudo/lib/.precomp/F0A740B460EBBFD6453D5130FA482D73FB62CF2F.1479834515.74086/64/640AB2BAE07BEDC4C163F679A746F7AB7FB5D1FA.bc --source-name=/home/dogbert/repos/rakudo/lib/Test.pm6\ (Test) /home/dogbert/repos/rakudo/lib/Test.pm6
==6614==
==6614== Invalid free() / delete / delete[] / realloc()
==6614== at 0x4105E53: MVM_fixed_size_free_at_safepoint (fixedsizealloc.c:286)
==6614== by 0x4197E79: twiddle_trie_node (nfg.c:132)
==6614== by 0x4197EC2: add_synthetic_to_trie (nfg.c:138)
==6614== by 0x419809F: add_synthetic (nfg.c:188)
==6614== by 0x4198135: lookup_or_add_synthetic (nfg.c:202)
==6614== by 0x419818C: MVM_nfg_codes_to_grapheme (nfg.c:217)
==6614== by 0x41AC963: grapheme_composition (normalize.c:558)
==6614== by 0x41ACD0B: MVM_unicode_normalizer_process_codepoint_full (normalize.c:661)
==6614== by 0x4194E5A: MVM_unicode_normalizer_process_codepoint (normalize.h:111)
==6614== by 0x4194E86: MVM_unicode_normalizer_process_codepoint_to_grapheme (normalize.h:119)
==6614== by 0x419573F: MVM_string_utf8_decode (utf8.c:198)
==6614== by 0x40E882E: MVM_cu_obtain_string (compunit.c:228)
==6614== Address 0x46890c4 is 0 bytes inside a block of size 16 client-defined
==6614== at 0x41059B3: alloc_slow_path (fixedsizealloc.c:131)
==6614== by 0x4105B3E: MVM_fixed_size_alloc (fixedsizealloc.c:181)
==6614== by 0x4197B6B: twiddle_trie_node (nfg.c:46)
==6614== by 0x4197EC2: add_synthetic_to_trie (nfg.c:138)
==6614== by 0x419809F: add_synthetic (nfg.c:188)
==6614== by 0x4198135: lookup_or_add_synthetic (nfg.c:202)
==6614== by 0x41981FA: MVM_nfg_crlf_grapheme (nfg.c:232)
==6614== by 0x4193D26: MVM_string_decode_stream_sep_default (decode_stream.c:522)
==6614== by 0x411A3BA: MVM_io_syncstream_from_uvstream (syncstream.c:347)
==6614== by 0x411C763: MVM_file_get_stdstream (fileops.c:357)
==6614== by 0x41BBCA6: setup_std_handles (moar.c:270)
==6614== by 0x41BBC5B: MVM_vm_create_instance (moar.c:260)
==6614==
==6614== Invalid free() / delete / delete[] / realloc()
==6614== at 0x4105E53: MVM_fixed_size_free_at_safepoint (fixedsizealloc.c:286)
==6614== by 0x4197E79: twiddle_trie_node (nfg.c:132)
==6614== by 0x4197BDD: twiddle_trie_node (nfg.c:52)
==6614== by 0x4197EC2: add_synthetic_to_trie (nfg.c:138)
==6614== by 0x419809F: add_synthetic (nfg.c:188)
==6614== by 0x4198135: lookup_or_add_synthetic (nfg.c:202)
==6614== by 0x419818C: MVM_nfg_codes_to_grapheme (nfg.c:217)
==6614== by 0x41AC963: grapheme_composition (normalize.c:558)
==6614== by 0x41ACD0B: MVM_unicode_normalizer_process_codepoint_full (normalize.c:661)
==6614== by 0x4194E5A: MVM_unicode_normalizer_process_codepoint (normalize.h:111)
==6614== by 0x4194E86: MVM_unicode_normalizer_process_codepoint_to_grapheme (normalize.h:119)
==6614== by 0x419573F: MVM_string_utf8_decode (utf8.c:198)
==6614== Address 0x89dfb4c is 0 bytes inside a block of size 16 client-defined
==6614== at 0x41059B3: alloc_slow_path (fixedsizealloc.c:131)
==6614== by 0x4105B3E: MVM_fixed_size_alloc (fixedsizealloc.c:181)
==6614== by 0x4197B6B: twiddle_trie_node (nfg.c:46)
==6614== by 0x4197BDD: twiddle_trie_node (nfg.c:52)
==6614== by 0x4197EC2: add_synthetic_to_trie (nfg.c:138)
==6614== by 0x419809F: add_synthetic (nfg.c:188)
==6614== by 0x4198135: lookup_or_add_synthetic (nfg.c:202)
==6614== by 0x419818C: MVM_nfg_codes_to_grapheme (nfg.c:217)
==6614== by 0x41AC963: grapheme_composition (normalize.c:558)
==6614== by 0x41ACD0B: MVM_unicode_normalizer_process_codepoint_full (normalize.c:661)
==6614== by 0x4194E5A: MVM_unicode_normalizer_process_codepoint (normalize.h:111)
==6614== by 0x4194E86: MVM_unicode_normalizer_process_codepoint_to_grapheme (normalize.h:119)
==6614==
==6614== Invalid free() / delete / delete[] / realloc()
==6614== at 0x4105E53: MVM_fixed_size_free_at_safepoint (fixedsizealloc.c:286)
==6614== by 0x4197E79: twiddle_trie_node (nfg.c:132)
==6614== by 0x4197BDD: twiddle_trie_node (nfg.c:52)
==6614== by 0x4197BDD: twiddle_trie_node (nfg.c:52)
==6614== by 0x4197EC2: add_synthetic_to_trie (nfg.c:138)
==6614== by 0x419809F: add_synthetic (nfg.c:188)
==6614== by 0x4198135: lookup_or_add_synthetic (nfg.c:202)
==6614== by 0x419818C: MVM_nfg_codes_to_grapheme (nfg.c:217)
==6614== by 0x41AC963: grapheme_composition (normalize.c:558)
==6614== by 0x41ACD0B: MVM_unicode_normalizer_process_codepoint_full (normalize.c:661)
==6614== by 0x4194E5A: MVM_unicode_normalizer_process_codepoint (normalize.h:111)
==6614== by 0x4194E86: MVM_unicode_normalizer_process_codepoint_to_grapheme (normalize.h:119)
==6614== Address 0x89dfcb4 is 0 bytes inside a block of size 16 client-defined
==6614== at 0x41059B3: alloc_slow_path (fixedsizealloc.c:131)
==6614== by 0x4105B3E: MVM_fixed_size_alloc (fixedsizealloc.c:181)
==6614== by 0x4197B6B: twiddle_trie_node (nfg.c:46)
==6614== by 0x4197BDD: twiddle_trie_node (nfg.c:52)
==6614== by 0x4197BDD: twiddle_trie_node (nfg.c:52)
==6614== by 0x4197EC2: add_synthetic_to_trie (nfg.c:138)
==6614== by 0x419809F: add_synthetic (nfg.c:188)
==6614== by 0x4198135: lookup_or_add_synthetic (nfg.c:202)
==6614== by 0x419818C: MVM_nfg_codes_to_grapheme (nfg.c:217)
==6614== by 0x41AC963: grapheme_composition (normalize.c:558)
==6614== by 0x41ACD0B: MVM_unicode_normalizer_process_codepoint_full (normalize.c:661)
==6614== by 0x4194E5A: MVM_unicode_normalizer_process_codepoint (normalize.h:111)
==6614==
==6614== Syscall param write(buf) points to uninitialised byte(s)
==6614== at 0x44BC003: __write_nocancel (syscall-template.S:81)
==6614== by 0x444FD20: _IO_file_write@@GLIBC_2.1 (fileops.c:1261)
==6614== by 0x444EF5E: new_do_write (fileops.c:538)
==6614== by 0x44503D1: _IO_file_xsputn@@GLIBC_2.1 (fileops.c:1343)
==6614== by 0x4445891: fwrite (iofwrite.c:43)
==6614== by 0x4171EF7: MVM_mast_to_file (driver.c:75)
==6614== by 0x40D5F3B: MVM_interp_run (interp.c:3102)
==6614== by 0x41BBE9F: MVM_vm_run_file (moar.c:309)
==6614== by 0x8048EA5: main (main.c:192)
==6614== Address 0xc1eb597 is 31,607 bytes inside a block of size 143,308 alloc'd
==6614== at 0x402A17C: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==6614== by 0x416B95F: MVM_malloc (alloc.h:2)
==6614== by 0x4170CC0: form_bytecode_output (compiler.c:1427)
==6614== by 0x41717C8: MVM_mast_compile (compiler.c:1602)
==6614== by 0x4171E8A: MVM_mast_to_file (driver.c:75)
==6614== by 0x40D5F3B: MVM_interp_run (interp.c:3102)
==6614== by 0x41BBE9F: MVM_vm_run_file (moar.c:309)
==6614== by 0x8048EA5: main (main.c:192)
==6614==
==6614==
==6614== HEAP SUMMARY:
==6614== in use at exit: 152,912 bytes in 4,612 blocks
==6614== total heap usage: 1,932,359 allocs, 625,639 frees, 411,749,889 bytes allocated
==6614==
==6614== LEAK SUMMARY:
==6614== definitely lost: 5,474 bytes in 182 blocks
==6614== indirectly lost: 14,052 bytes in 670 blocks
==6614== possibly lost: 120,032 bytes in 3,751 blocks
==6614== still reachable: 13,354 bytes in 9 blocks
==6614== suppressed: 0 bytes in 0 blocks
==6614== Rerun with --leak-check=full to see details of leaked memory
==6614==
==6614== For counts of detected and suppressed errors, rerun with: -v
==6614== Use --track-origins=yes to see where uninitialised values come from
==6614== ERROR SUMMARY: 9 errors from 4 contexts (suppressed: 0 from 0)
================================================================================================
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.31.g.17604.e.3 built on MoarVM version 2016.11,
running on ubuntu (14.04.3.LTS.Trusty.Tahr) / linux (3.19.0.32.generic)
------------------------------------------------------------------------------------------------
MoarVM panic: Internal error: invalid thread ID 201287872 in GC work pass
==6607==
==6607== HEAP SUMMARY:
==6607== in use at exit: 77,924,943 bytes in 372,357 blocks
==6607== total heap usage: 2,132,188 allocs, 284,958 frees, 387,170,470 bytes allocated
==6607==
==6607== Block 0x46890c4..0x46890d3 overlaps with block 0x46890c4..0x46890cb
==6607== Blocks allocation contexts:
==6607== at 0x41059B3: alloc_slow_path (fixedsizealloc.c:131)
==6607== by 0x4105B3E: MVM_fixed_size_alloc (fixedsizealloc.c:181)
==6607== by 0x4197B6B: twiddle_trie_node (nfg.c:46)
==6607== by 0x4197EC2: add_synthetic_to_trie (nfg.c:138)
==6607== by 0x419809F: add_synthetic (nfg.c:188)
==6607== by 0x4198135: lookup_or_add_synthetic (nfg.c:202)
==6607== by 0x41981FA: MVM_nfg_crlf_grapheme (nfg.c:232)
==6607== by 0x4193D26: MVM_string_decode_stream_sep_default (decode_stream.c:522)
==6607== by 0x411A3BA: MVM_io_syncstream_from_uvstream (syncstream.c:347)
==6607== by 0x411C763: MVM_file_get_stdstream (fileops.c:357)
==6607== by 0x41BBCA6: setup_std_handles (moar.c:270)
==6607== by 0x41BBC5B: MVM_vm_create_instance (moar.c:260)
==6607==
==6607== at 0x4105B1B: MVM_fixed_size_alloc (fixedsizealloc.c:175)
==6607== by 0x4197CD9: twiddle_trie_node (nfg.c:82)
==6607== by 0x4197BDD: twiddle_trie_node (nfg.c:52)
==6607== by 0x4197BDD: twiddle_trie_node (nfg.c:52)
==6607== by 0x4197BDD: twiddle_trie_node (nfg.c:52)
==6607== by 0x4197BDD: twiddle_trie_node (nfg.c:52)
==6607== by 0x4197BDD: twiddle_trie_node (nfg.c:52)
==6607== by 0x4197BDD: twiddle_trie_node (nfg.c:52)
==6607== by 0x4197BDD: twiddle_trie_node (nfg.c:52)
==6607== by 0x4197BDD: twiddle_trie_node (nfg.c:52)
==6607== by 0x4197BDD: twiddle_trie_node (nfg.c:52)
==6607== by 0x4197EC2: add_synthetic_to_trie (nfg.c:138)
==6607== This is usually caused by using VALGRIND_MALLOCLIKE_BLOCKin an inappropriate way.
Memcheck: mc_leakcheck.c:1777 (vgMemCheck_detect_memory_leaks): the 'impossible' happened.
host stacktrace:
==6607== at 0x3805A504: ??? (in /usr/lib/valgrind/memcheck-x86-linux)
sched status:
running_tid=1
Note: see also the FAQ in the source distribution.
It contains workarounds to several common problems.
In particular, if Valgrind aborted or crashed after
identifying problems in your program, there's a good chance
that fixing those problems will prevent Valgrind aborting or
crashing, especially if it happened in m_mallocfree.c.
If that doesn't help, please report this bug to: www.valgrind.org
In the bug report, send all the above text, the valgrind
version, and what OS and version you are using. Thanks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment