Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Created August 2, 2021 09:26
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/6cafae9e06e6b4e3be60d0c063708d63 to your computer and use it in GitHub Desktop.
Save dogbert17/6cafae9e06e6b4e3be60d0c063708d63 to your computer and use it in GitHub Desktop.
Another SEGV ?
dogbert@dogbert-VirtualBox:~/repos/rakudo$ gdb install/bin/moar core.moar.1000.f4e1afea0509471c9f4e9e8a321dd81a.1909739.1627896250000000000000
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 1909742]
[New LWP 1909739]
[New LWP 1909740]
[New LWP 1909744]
[New LWP 1909743]
[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 try_capture_lex_impl (tc=0x560137d77600, arg_info=...) at src/disp/syscall.c:867
867 if (((MVMCode *)code)->body.sf->body.outer == tc->cur_frame->static_info)
[Current thread is 1 (Thread 0x7f862fe0e700 (LWP 1909742))]
(gdb) bt
#0 try_capture_lex_impl (tc=0x560137d77600, arg_info=...) at src/disp/syscall.c:867
#1 0x00007f86374a2f19 in MVM_disp_program_run (tc=0x560137d77600, dp=0x7f8628136600, record=0x7f86282acbe0, spesh_cid=6349, bytecode_offset=206, dp_index=0) at src/disp/program.c:2829
#2 0x00007f8637496fad in dispatch_monomorphic (tc=0x560137d77600, entry_ptr=0x7f8628135278, seen=0x7f8628132490, id=0x5601369c6f50, callsite=0x7f86379cea00 <obj_callsite>, arg_indices=0x7f8635728252,
source=0x5601348d2fc0, sf=0x56013606e4c0, bytecode_offset=206) at src/disp/inline_cache.c:107
#3 0x00007f8637397f5b in MVM_interp_run (tc=0x560137d77600, initial_invoke=0x7f86373bfb9f <thread_initial_invoke>, invoke_data=0x560137daae10, outer_runloop=0x0) at src/core/interp.c:5437
#4 0x00007f86373bfd03 in start_thread (data=0x560137daae10) at src/core/threads.c:92
#5 0x00007f8636df2609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#6 0x00007f863707d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) l
862 /* try-capture-lex */
863 static void try_capture_lex_impl(MVMThreadContext *tc, MVMArgs arg_info) {
864 MVMArgProcContext arg_ctx;
865 MVM_args_proc_setup(tc, &arg_ctx, arg_info);
866 MVMObject *code = MVM_args_get_required_pos_obj(tc, &arg_ctx, 0);
867 if (((MVMCode *)code)->body.sf->body.outer == tc->cur_frame->static_info)
868 MVM_frame_capturelex(tc, code);
869 MVM_args_set_result_obj(tc, tc->instance->VMNull, MVM_RETURN_CURRENT_FRAME);
870 }
871 static MVMDispSysCall try_capture_lex = {
(gdb) info threads
Id Target Id Frame
* 1 Thread 0x7f862fe0e700 (LWP 1909742) try_capture_lex_impl (tc=0x560137d77600, arg_info=...) at src/disp/syscall.c:867
2 Thread 0x7f8636de2440 (LWP 1909739) futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x560137db6c38) at ../sysdeps/nptl/futex-internal.h:183
3 Thread 0x7f8636d9e700 (LWP 1909740) MVM_spesh_stats_update (tc=0x560134022a60, sl=0x5601376c7e70, sf_updated=0x7f8630000b80, in_newly_seen=0x7f8636d9c290, in_updated=0x7f8636d9c298) at src/spesh/stats.c:600
4 Thread 0x7f862ee0b700 (LWP 1909744) 0x00007f86373825a5 in MVM_interp_run (tc=0x7f86200f2af0, initial_invoke=0x7f86373bfb9f <thread_initial_invoke>, invoke_data=0x7f86200beec0, outer_runloop=0x0)
at src/core/interp.c:2835
5 Thread 0x7f862f60d700 (LWP 1909743) 0x00007f863703b3bf in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=0x7f862f60b3c0, rem=0x7f862f60b3c0)
at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:78
(gdb) p ((MVMCode *)code)->body
$1 = {sf = 0x0, outer = 0x0, code_object = 0x0, name = 0x0, state_vars = 0x0, is_static = 0, is_compiler_stub = 0}
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment