Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Created January 16, 2022 15:02
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/6b316ea9bbc836f4506657a08197e87f to your computer and use it in GitHub Desktop.
Save dogbert17/6b316ea9bbc836f4506657a08197e87f to your computer and use it in GitHub Desktop.
Mysterious SEGV when running spectest
dogbert@dogbert-VirtualBox:~/repos/rakudo$ gdb install/bin/moar core.moar.1000.fe02281e586e4bf7a95818aee37796e3.500627.1642345053000000000000
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2
Copyright (C) 2020 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...
[New LWP 500627]
[New LWP 500628]
[New LWP 500632]
[New LWP 500631]
[New LWP 500633]
[New LWP 500635]
[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 __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:65
65 ../sysdeps/x86_64/multiarch/strlen-avx2.S: No such file or directory.
[Current thread is 1 (Thread 0x7f7529d60440 (LWP 500627))]
(gdb) bt
#0 __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:65
#1 0x00007f7529f7b503 in __GI___strdup (s=0x0) at strdup.c:41
#2 0x00007f752a451513 in dcCall_x64_sysv () from //home/dogbert/repos/rakudo/nqp/MoarVM/../../install/lib/libmoar.so
#3 0x0000000000000000 in ?? ()
(gdb) info threads
Id Target Id Frame
* 1 Thread 0x7f7529d60440 (LWP 500627) __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:65
2 Thread 0x7f7529d5e700 (LWP 500628) merge_graph (cs=0x7f752a922d20 <obj_callsite>, bytecode_size=0, inline_boundary_handler=<synthetic pointer>, resume_init=0x0, code_ref_reg=...,
runbytecode_ins=0x461c8e7ab70, runbytecode_bb=0x461c81eec60, inlinee_sf=0x461c4cb0f00, inlinee=0x461c80e2880, inliner=<optimized out>, tc=0x461c4030780) at src/spesh/inline.c:589
3 Thread 0x7f7526b7f700 (LWP 500632) 0x00007f7529fb93bf in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=req@entry=0x7f7526b7e9f0, rem=rem@entry=0x7f7526b7e9f0)
at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:78
4 Thread 0x7f7527382700 (LWP 500631) futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x461c45da38c) at ../sysdeps/nptl/futex-internal.h:183
5 Thread 0x7f752637c700 (LWP 500633) 0x00007f7529ffb5ce in epoll_wait (epfd=4, events=0x7f7526378900, maxevents=1024, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
6 Thread 0x7f7525b79700 (LWP 500635) futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x461c45da5e8) at ../sysdeps/nptl/futex-internal.h:183
(gdb) t 2
[Switching to thread 2 (Thread 0x7f7529d5e700 (LWP 500628))]
#0 merge_graph (cs=0x7f752a922d20 <obj_callsite>, bytecode_size=0, inline_boundary_handler=<synthetic pointer>, resume_init=0x0, code_ref_reg=..., runbytecode_ins=0x461c8e7ab70,
runbytecode_bb=0x461c81eec60, inlinee_sf=0x461c4cb0f00, inlinee=0x461c80e2880, inliner=<optimized out>, tc=0x461c4030780) at src/spesh/inline.c:589
589 while (due) {
(gdb) l
584 MVM_VECTOR_INIT(regs_for_deopt, 0);
585 for (i = 0; i < inliner->sf->body.num_locals; i++) {
586 MVMuint16 vers = inliner->fact_counts[i];
587 for (j = 0; j < vers; j++) {
588 MVMSpeshDeoptUseEntry *due = inliner->facts[i][j].usage.deopt_users;
589 while (due) {
590 if ((MVMuint32)due->deopt_idx == impl_deopt_idx) {
591 MVMSpeshOperand o;
592 o.reg.orig = i;
593 o.reg.i = j;
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment