Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Created December 17, 2019 18:37
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/b40c303369b096b8ef992863e0fa3a89 to your computer and use it in GitHub Desktop.
Save dogbert17/b40c303369b096b8ef992863e0fa3a89 to your computer and use it in GitHub Desktop.
SEGV when running csv-ip5xs.pl with a small (65536 * 10) nursery
dogbert@dogbert-VirtualBox ~/repos/CSV $ perl6 -v
This is Rakudo version 2019.11-271-g0e2485a built on MoarVM version 2019.11-93-g7a93b28
implementing Perl 6.d.
dogbert@dogbert-VirtualBox ~/repos/CSV $ gdb ~/.rakudobrew/versions/moar-master/install/bin/perl6 core
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 /home/dogbert/.rakudobrew/versions/moar-master/install/bin/perl6...(no debugging symbols found)...done.
[New LWP 13323]
[New LWP 13324]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `perl6 -Ilib csv-ip5xs.pl'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007fdc64e77586 in MVM_serialization_demand_object (tc=0x6f8d60, sc=0x7fdc65859608, idx=85) at src/6model/serialization.c:2848
2848 MVM_reentrantmutex_unlock(tc, (MVMReentrantMutex *)sc->body->mutex);
[Current thread is 1 (Thread 0x7fdc658e8700 (LWP 13323))]
(gdb) bt
#0 0x00007fdc64e77586 in MVM_serialization_demand_object (tc=0x6f8d60, sc=0x7fdc65859608, idx=85) at src/6model/serialization.c:2848
#1 0x00007fdc64e6b57c in MVM_sc_get_object (tc=0x6f8d60, sc=0x7fdc65859608, idx=85) at src/6model/sc.c:206
#2 0x00007fdc64d5cc37 in MVM_sc_get_sc_object (tc=0x6f8d60, cu=0x7c7c38, dep=0, idx=85) at src/6model/sc.h:33
#3 0x00007fdc64d76802 in MVM_interp_run (tc=0x6f8d60, initial_invoke=0x7fdc64f0ea8c <toplevel_initial_invoke>, invoke_data=0x7d6b68) at src/core/interp.c:3229
#4 0x00007fdc64f0ec2a in MVM_vm_run_file (instance=0x6f8260, filename=0x6f81e0 "/home/dogbert/.rakudobrew/versions/moar-master/install/share/perl6/runtime/perl6.moarvm") at src/moar.c:461
#5 0x00000000004011e2 in main ()
(gdb) l
2843 work_loop(tc, sr);
2844
2845 /* Clear up. */
2846 MVM_gc_allocate_gen2_default_clear(tc);
2847 sr->working--;
2848 MVM_reentrantmutex_unlock(tc, (MVMReentrantMutex *)sc->body->mutex);
2849
2850 /* Return the (perhaps just stubbed) object. */
2851 return sc->body->root_objects[idx];
2852 }
(gdb) info threads
Id Target Id Frame
* 1 Thread 0x7fdc658e8700 (LWP 13323) 0x00007fdc64e77586 in MVM_serialization_demand_object (tc=0x6f8d60, sc=0x7fdc65859608, idx=85) at src/6model/serialization.c:2848
2 Thread 0x7fdc63e73700 (LWP 13324) at_pos (tc=0x800784570, st=0x763120, root=0x7fdc64e0d69a <bind_pos+1734>, data=0x7fdc63e71220, index=7882096, value=0x2b88e08, kind=0)
at src/6model/reprs/VMArray.c:138
(gdb) t 2
[Switching to thread 2 (Thread 0x7fdc63e73700 (LWP 13324))]
#0 at_pos (tc=0x800784570, st=0x763120, root=0x7fdc64e0d69a <bind_pos+1734>, data=0x7fdc63e71220, index=7882096, value=0x2b88e08, kind=0) at src/6model/reprs/VMArray.c:138
138 static void at_pos(MVMThreadContext *tc, MVMSTable *st, MVMObject *root, void *data, MVMint64 index, MVMRegister *value, MVMuint16 kind) {
(gdb) bt
#0 at_pos (tc=0x800784570, st=0x763120, root=0x7fdc64e0d69a <bind_pos+1734>, data=0x7fdc63e71220, index=7882096, value=0x2b88e08, kind=0) at src/6model/reprs/VMArray.c:138
#1 0x00007fdc64e0ca6e in MVM_VMArray_at_pos (tc=0x784570, st=0x763120, root=0x2b88df0, data=0x2b88e08, index=2102, value=0x7fdc63e71260, kind=8) at src/6model/reprs/VMArray.c:258
#2 0x00007fdc64e03703 in MVM_repr_at_pos_o (tc=0x784570, obj=0x2b88df0, idx=2102) at src/6model/reprconv.c:138
#3 0x00007fdc64ea9611 in MVM_spesh_stats_cleanup (tc=0x784570, check_frames=0x2b88df0) at src/spesh/stats.c:661
#4 0x00007fdc64ea63af in worker (tc=0x784570, callsite=0x7fdc656dfc00 <null_args_callsite>, args=0x0) at src/spesh/worker.c:20
#5 0x00007fdc64e14799 in invoke_handler (tc=0x784570, invokee=0x777a00, callsite=0x7fdc656dfc00 <null_args_callsite>, args=0x0) at src/6model/reprs/MVMCFunction.c:9
#6 0x00007fdc64da76a8 in thread_initial_invoke (tc=0x784570, data=0x7c5cd0) at src/core/threads.c:59
#7 0x00007fdc64d5da24 in MVM_interp_run (tc=0x784570, initial_invoke=0x7fdc64da761d <thread_initial_invoke>, invoke_data=0x7c5cd0) at src/core/interp.c:162
#8 0x00007fdc64da7766 in start_thread (data=0x7c5cd0) at src/core/threads.c:87
#9 0x00007fdc642876ba in start_thread (arg=0x7fdc63e73700) at pthread_create.c:333
#10 0x00007fdc648ad41d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
(gdb) l
133 /* Gets the storage specification for this representation. */
134 static const MVMStorageSpec * get_storage_spec(MVMThreadContext *tc, MVMSTable *st) {
135 return &storage_spec;
136 }
137
138 static void at_pos(MVMThreadContext *tc, MVMSTable *st, MVMObject *root, void *data, MVMint64 index, MVMRegister *value, MVMuint16 kind) {
139 MVMArrayREPRData *repr_data = (MVMArrayREPRData *)st->REPR_data;
140 MVMArrayBody *body = (MVMArrayBody *)data;
141 MVMuint64 real_index;
142
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment