Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Created December 2, 2019 18:45
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/bb53b67527bdfd603c5606abbbc337fc to your computer and use it in GitHub Desktop.
Save dogbert17/bb53b67527bdfd603c5606abbbc337fc to your computer and use it in GitHub Desktop.
SEGV when running t/spec/S17-promise/start.t as part of spectest using a small nursery and MVM_GC_DEBUG = 1
dogbert@dogbert-VirtualBox ~/repos/rakudo $ gdb install/bin/moar core_start
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 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 install/bin/moar...done.
[New LWP 18138]
[New LWP 18148]
[New LWP 18162]
[New LWP 18137]
[New LWP 18158]
[New LWP 18157]
[New LWP 18147]
[New LWP 18159]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/home/dogbert/repos/rakudo/nqp/MoarVM/../../install/bin/moar --execname=/home/d'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 by_offset (tc=tc@entry=0x12e9280, tss=tss@entry=0x7f4770393c90, bytecode_offset=232) at src/spesh/stats.c:122
122 if (tss->by_offset[found].bytecode_offset == bytecode_offset)
[Current thread is 1 (Thread 0x7f477871c700 (LWP 18138))]
(gdb) bt
#0 by_offset (tc=tc@entry=0x12e9280, tss=tss@entry=0x7f4770393c90, bytecode_offset=232) at src/spesh/stats.c:122
#1 0x00007f47796d50c8 in incorporate_stats (tc=tc@entry=0x12e9280, simf=0x7f477156d8e0, frame_depth=frame_depth@entry=0, caller=caller@entry=0x0, sf_updated=sf_updated@entry=0x1bc8a28)
at src/spesh/stats.c:338
#2 0x00007f47796d5bbe in save_or_free_sim_stack (sf_updated=0x1bc8a28, save_on_tc=0x7f4768121db0, sims=0x7f477161afd0, tc=0x12e9280) at src/spesh/stats.c:502
#3 MVM_spesh_stats_update (tc=tc@entry=0x12e9280, sl=<optimized out>, sf_updated=0x1bc8a28, in_newly_seen=in_newly_seen@entry=0x7f477871bb40, in_updated=in_updated@entry=0x7f477871bb48)
at src/spesh/stats.c:643
#4 0x00007f47796d3938 in worker (tc=0x12e9280, callsite=<optimized out>, args=<optimized out>) at src/spesh/worker.c:20
#5 0x00007f477962ce41 in thread_initial_invoke (tc=0x12e9280, data=<optimized out>) at src/core/threads.c:59
#6 0x00007f4779603e7c in MVM_interp_run (tc=0x0, tc@entry=0x12e9280, initial_invoke=0x7, invoke_data=0xe8, invoke_data@entry=0x12eb1d0) at src/core/interp.c:149
#7 0x00007f477962cec6 in start_thread (data=0x12eb1d0) at src/core/threads.c:87
#8 0x00007f4778b306ba in start_thread (arg=0x7f477871c700) at pthread_create.c:333
#9 0x00007f477915641d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
(gdb) info threads
Id Target Id Frame
* 1 Thread 0x7f477871c700 (LWP 18138) by_offset (tc=tc@entry=0x12e9280, tss=tss@entry=0x7f4770393c90, bytecode_offset=232) at src/spesh/stats.c:122
2 Thread 0x7f477504f700 (LWP 18148) 0x00007f477911b30d in nanosleep () at ../sysdeps/unix/syscall-template.S:84
3 Thread 0x7f476e7fc700 (LWP 18162) pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
4 Thread 0x7f477a0d0700 (LWP 18137) pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
5 Thread 0x7f476f7fe700 (LWP 18158) pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
6 Thread 0x7f476ffff700 (LWP 18157) pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
7 Thread 0x7f4775850700 (LWP 18147) pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
8 Thread 0x7f476effd700 (LWP 18159) __lll_lock_wait () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
(gdb) l
117 MVMuint32 bytecode_offset) {
118 /* See if we already have it. */
119 MVMuint32 found;
120 MVMuint32 n = tss->num_by_offset;
121 for (found = 0; found < n; found++)
122 if (tss->by_offset[found].bytecode_offset == bytecode_offset)
123 return &(tss->by_offset[found]);
124
125 /* If not, we need a new record. */
126 found = tss->num_by_offset;
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment