Skip to content

Instantly share code, notes, and snippets.

@MasterDuke17
Last active October 9, 2017 21:32
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/5ca4c5507dd034ee0d0fc9c515c8ab76 to your computer and use it in GitHub Desktop.
Save MasterDuke17/5ca4c5507dd034ee0d0fc9c515c8ab76 to your computer and use it in GitHub Desktop.
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7661449 in MVM_fixed_size_free (tc=0x5555557589f0, al=0x55555575aee0, bytes=0, to_free=0x0) at src/core/fixedsizealloc.c:280
280 if (dbg->alloc_size != bytes) {
(gdb) bt
#0 0x00007ffff7661449 in MVM_fixed_size_free (tc=0x5555557589f0, al=0x55555575aee0, bytes=0, to_free=0x0) at src/core/fixedsizealloc.c:280
#1 0x00007ffff768dbb9 in gc_free (tc=0x5555557589f0, obj=0x5555557596f0) at src/6model/reprs/MVMString.c:87
#2 0x00007ffff76713c5 in MVM_gc_collect_free_nursery_uncopied (tc=0x5555557589f0, limit=0x555555759d30) at src/gc/collect.c:609
#3 0x00007ffff766a3d1 in finish_gc (tc=0x5555557589f0, gen=0 '\000', is_coordinator=1 '\001') at src/gc/orchestrate.c:230
#4 0x00007ffff766a839 in run_gc (tc=0x5555557589f0, what_to_do=0 '\000') at src/gc/orchestrate.c:373
#5 0x00007ffff766ac7b in MVM_gc_enter_from_allocator (tc=0x5555557589f0) at src/gc/orchestrate.c:486
#6 0x00007ffff766b093 in MVM_gc_allocate_nursery (tc=0x5555557589f0, size=48) at src/gc/allocation.c:32
#7 0x00007ffff766af96 in MVM_gc_allocate (tc=0x5555557589f0, size=48) at src/gc/allocation.h:13
#8 0x00007ffff766b113 in MVM_gc_allocate_zeroed (tc=0x5555557589f0, size=48) at src/gc/allocation.c:49
#9 0x00007ffff766b2da in MVM_gc_allocate_object (tc=0x5555557589f0, st=0x55555579e040) at src/gc/allocation.c:86
#10 0x00007ffff768796f in MVM_repr_alloc_init (tc=0x5555557589f0, type=0x5555557aa870) at src/6model/reprconv.c:17
#11 0x00007ffff770bd04 in MVM_string_substring (tc=0x5555557589f0, a=0x5555584bab30, offset=2, length=-1) at src/strings/ops.c:567
#12 0x00007ffff770c010 in MVM_string_replace (tc=0x5555557589f0, original=0x5555584bab30, start=1, count=1, replacement=0x5555560439c0) at src/strings/ops.c:621
#13 0x00007ffff762d990 in MVM_interp_run (tc=0x5555557589f0, initial_invoke=0x7ffff7735a97 <toplevel_initial_invoke>, invoke_data=0x5555557cf780) at src/core/interp.c:3918
#14 0x00007ffff7735bfc in MVM_vm_run_file (instance=0x555555758010, filename=0x7fffffffe061 "perl6.moarvm") at src/moar.c:401
#15 0x00005555555556ab in main (argc=17, argv=0x7fffffffdbb8) at src/main.c:257g
(gdb) call MVM_dump_backtrace(tc)
at SETTING::src/core/stubs.pm:41 (CORE.setting.moarvm:DYNAMIC)
from tools/build/create-moar-runner.pl:11 (<ephemeral file>:<unit>)
from tools/build/create-moar-runner.pl:1 (<ephemeral file>:<unit-outer>)
from gen/moar/stage2/NQPHLL.nqp:1542 (/home/dan/Source/perl6/install/share/nqp/lib/NQPHLL.moarvm:eval)
from gen/moar/stage2/NQPHLL.nqp:1779 (/home/dan/Source/perl6/install/share/nqp/lib/NQPHLL.moarvm:evalfiles)
from gen/moar/stage2/NQPHLL.nqp:1671 (/home/dan/Source/perl6/install/share/nqp/lib/NQPHLL.moarvm:command_eval)
from src/Perl6/Compiler.nqp:42 (blib/Perl6/Compiler.moarvm:command_eval)
from gen/moar/stage2/NQPHLL.nqp:1630 (/home/dan/Source/perl6/install/share/nqp/lib/NQPHLL.moarvm:command_line)
from gen/moar/main.nqp:47 (perl6.moarvm:MAIN)
from gen/moar/main.nqp:38 (perl6.moarvm:<mainline>)
from <unknown>:1 (perl6.moarvm:<main>)
from <unknown>:1 (perl6.moarvm:<entry>)
MVM_SPESH_DISABLE=1 MVM_GC_DEBUG=2 gdb --args /home/dan/Source/perl6/install/bin/moar --libpath="blib" --libpath="/home/dan/Source/perl6/install/share/nqp/lib" --libpath="/home/dan/Source/perl6/install/share/nqp/lib" perl6.moarvm --nqp-lib=blib tools/build/create-moar-runner.pl "/home/dan/Source/perl6/install/bin/moar" perl6.moarvm /home/dan/Source/perl6/install/bin/perl6-m "/home/dan/Source/perl6/install/share/perl6/runtime" "" "" "/home/dan/Source/perl6/install/share/nqp/lib" "/home/dan/Source/perl6/install/share/nqp/lib" "/home/dan/Source/perl6/install/share/perl6/lib" "/home/dan/Source/perl6/install/share/perl6/runtime"
dan@hermes:~/Source/perl6/rakudo$ rr replay
rr: Warning: Your CPU frequency governor is 'powersave'. rr strongly
recommends that you use the 'performance' governor. Not using the
'performance' governor can cause rr to be at least 2x slower
on laptops.
On Fedora-based systems, you can enable the 'performance' governor
by running the following commands:
$ sudo dnf install kernel-tools
$ sudo cpupower frequency-set -g performance
GNU gdb (Ubuntu 7.12.50.20170314-0ubuntu1.1) 7.12.50.20170314-git
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/dan/.local/share/rr/latest-trace/mmap_hardlink_4_moar...done.
Really redefine built-in command "restart"? (y or n) [answered Y; input not from terminal]
>>> >>> >>> >>> ... ... >>> ... ... >>> ... ... ...
>>>
Remote debugging using :29279
warning: unable to open /proc file '/proc/29236/task/29236/maps'
warning: remote target does not support file transfer, attempting to access files from local filesystem.
Reading symbols from /lib64/ld-linux-x86-64.so.2...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/ld-2.24.so...done.
done.
0x00007f23f7d08c20 in _start () from /lib64/ld-linux-x86-64.so.2
(rr) run
0x00007f23f7d08c23 in _start () from /lib64/ld-linux-x86-64.so.2
The program being debugged has been started already.
Start it from the beginning? (y or n) n
Program not restarted.
(rr) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0x00007f23f7365449 in MVM_fixed_size_free (tc=0x56283adbda20, al=0x56283adbef00, bytes=0, to_free=0x0) at src/core/fixedsizealloc.c:280
280 if (dbg->alloc_size != bytes) {
(rr) up
#1 0x00007f23f7391bcc in gc_free (tc=0x56283adbda20, obj=0x7f23f634e8d8) at src/6model/reprs/MVMString.c:87
87 MVM_fixed_size_free(tc, tc->instance->fsa, (str->body.storage_type == MVM_STRING_STRAND ? str->body.num_strands : str->body.num_graphs) * type , str->body.storage.any);
(rr) p &(str->body.storage.any)
$1 = (void **) 0x7f23f634e8f0
(rr) watch *((void **) 0x7f23f634e8f0)
Hardware watchpoint 1: *((void **) 0x7f23f634e8f0)
(rr) reverse-continue
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0x00007f23f7365449 in MVM_fixed_size_free (tc=0x56283adbda20, al=0x56283adbef00, bytes=0, to_free=0x0) at src/core/fixedsizealloc.c:280
280 if (dbg->alloc_size != bytes) {
(rr) reverse-continue
Continuing.
Hardware watchpoint 1: *((void **) 0x7f23f634e8f0)
Old value = (void *) 0x0
New value = (void *) 0x100
__memset_avx2_erms () at ../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S:116
116 ../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S: No such file or directory.
(rr) bt
#0 __memset_avx2_erms () at ../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S:116
#1 0x00007f23f7373739 in MVM_gc_collect (tc=0x56283adbda20, what_to_do=0 '\000', gen=0 '\000') at src/gc/collect.c:168
#2 0x00007f23f736e811 in run_gc (tc=0x56283adbda20, what_to_do=0 '\000') at src/gc/orchestrate.c:369
#3 0x00007f23f736ec7b in MVM_gc_enter_from_allocator (tc=0x56283adbda20) at src/gc/orchestrate.c:486
#4 0x00007f23f736f093 in MVM_gc_allocate_nursery (tc=0x56283adbda20, size=72) at src/gc/allocation.c:32
#5 0x00007f23f736ef96 in MVM_gc_allocate (tc=0x56283adbda20, size=72) at src/gc/allocation.h:13
#6 0x00007f23f736f113 in MVM_gc_allocate_zeroed (tc=0x56283adbda20, size=72) at src/gc/allocation.c:49
#7 0x00007f23f736f2da in MVM_gc_allocate_object (tc=0x56283adbda20, st=0x56283ae02768) at src/gc/allocation.c:86
#8 0x00007f23f7348f6d in MVM_frame_takeclosure (tc=0x56283adbda20, code=0x56283afd4fe8) at src/core/frame.c:1071
#9 0x00007f23f731c5d0 in MVM_interp_run (tc=0x56283adbda20, initial_invoke=0x7f23f7439a41 <toplevel_initial_invoke>, invoke_data=0x56283ae337a0) at src/core/interp.c:1182
#10 0x00007f23f7439ba6 in MVM_vm_run_file (instance=0x56283adbd040, filename=0x7fff5ca8efb9 "perl6.moarvm") at src/moar.c:401
#11 0x0000562839e236ab in main (argc=17, argv=0x7fff5ca8e408) at src/main.c:257
ools/build/create-moar-runner.pl "/home/dan/Source/perl6/install/bin/moar" perl6.moarvm /home/dan/Source/perl6/install/bin/perl6-m "/home/dan/Source/perl6/install/share/perl6/runtime" "" "" "/home/dan/Source/perl6/install/share/nqp/lib" "/home/dan/Source/perl6/install/share/nqp/lib" "/home/dan/Source/perl6/install/share/perl6/lib" "/home/dan/Source/perl6/install/share/perl6/runtime"
==20652== Memcheck, a memory error detector
==20652== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==20652== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info
==20652== Command: /home/dan/Source/perl6/install/bin/moar --libpath=blib --libpath=/home/dan/Source/perl6/install/share/nqp/lib --libpath=/home/dan/Source/perl6/install/share/nqp/lib perl6.moarvm --nqp-lib=blib tools/build/create-moar-runner.pl /home/dan/Source/perl6/install/bin/moar perl6.moarvm /home/dan/Source/perl6/install/bin/perl6-m /home/dan/Source/perl6/install/share/perl6/runtime /home/dan/Source/perl6/install/share/nqp/lib /home/dan/Source/perl6/install/share/nqp/lib /home/dan/Source/perl6/install/share/perl6/lib /home/dan/Source/perl6/install/share/perl6/runtime
==20652==
==20652== Invalid read of size 8
==20652== at 0x504A3EE: MVM_fixed_size_free (fixedsizealloc.c:277)
==20652== by 0x5076B70: gc_free (MVMString.c:87)
==20652== by 0x505A37C: MVM_gc_collect_free_nursery_uncopied (collect.c:609)
==20652== by 0x5053375: finish_gc (orchestrate.c:230)
==20652== by 0x50537DD: run_gc (orchestrate.c:373)
==20652== by 0x5053C1F: MVM_gc_enter_from_allocator (orchestrate.c:486)
==20652== by 0x5054037: MVM_gc_allocate_nursery (allocation.c:32)
==20652== by 0x5053F3A: MVM_gc_allocate (allocation.h:13)
==20652== by 0x50540B7: MVM_gc_allocate_zeroed (allocation.c:49)
==20652== by 0x505427E: MVM_gc_allocate_object (allocation.c:86)
==20652== by 0x502DF6C: MVM_frame_takeclosure (frame.c:1071)
==20652== by 0x50015CF: MVM_interp_run (interp.c:1182)
==20652== Address 0xfffffffffffffff8 is not stack'd, malloc'd or (recently) free'd
==20652==
==20652==
==20652== Process terminating with default action of signal 11 (SIGSEGV)
==20652== Access not within mapped region at address 0xFFFFFFFFFFFFFFF8
==20652== at 0x504A3EE: MVM_fixed_size_free (fixedsizealloc.c:277)
==20652== by 0x5076B70: gc_free (MVMString.c:87)
==20652== by 0x505A37C: MVM_gc_collect_free_nursery_uncopied (collect.c:609)
==20652== by 0x5053375: finish_gc (orchestrate.c:230)
==20652== by 0x50537DD: run_gc (orchestrate.c:373)
==20652== by 0x5053C1F: MVM_gc_enter_from_allocator (orchestrate.c:486)
==20652== by 0x5054037: MVM_gc_allocate_nursery (allocation.c:32)
==20652== by 0x5053F3A: MVM_gc_allocate (allocation.h:13)
==20652== by 0x50540B7: MVM_gc_allocate_zeroed (allocation.c:49)
==20652== by 0x505427E: MVM_gc_allocate_object (allocation.c:86)
==20652== by 0x502DF6C: MVM_frame_takeclosure (frame.c:1071)
==20652== by 0x50015CF: MVM_interp_run (interp.c:1182)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment