Ticket #1613 (closed bug: fixed)

Opened 5 years ago

Last modified 4 years ago

Random segfault in rakudo spectests

Reported by: moritz Owned by:
Priority: normal Milestone:
Component: none Version: 2.3.0
Severity: high Keywords:
Cc: Language: perl6
Patch status: Platform:

Description

For maybe two weeks now rakudo spectests segfault randomly, triggered without any changes in Rakudo's C code. For some specific combinations of Rakudo and Parrot revisions some of these segfaults are reproducible. Here's one from t/spec/S06-signature/unspecified.rakudo (generate that file by running make t/spec/S06-signature/unspecified.t):

(gdb) run t/spec/S06-signature/unspecified.rakudo
Starting program: /nocrypt-home/moritz/source/rakudo/perl6 t/spec/S06-signature/unspecified.rakudo
[Thread debugging using libthread_db enabled]
warning: Lowest section in /usr/lib/libicudata.so.36 is .hash at 0000000000000120
[New Thread 0x7fb9a473a6f0 (LWP 12057)]
ok 1 - # SKIP siglist
ok 2 - can call sub with no signature specified
ok 3 - sub with no signature dies when given a named argument
ok 4 - sub with no signature dies when given positional argument
ok 5 - # SKIP siglist
ok 6 - can call sub with positional param used
ok 7 - sub using positional param called with no params
ok 8 - sub using positional param called with named param
ok 9 - # SKIP siglist
ok 10 - can call sub with named param used
ok 11 - named param sub is callable with no params
ok 12 - named param sub dies with positional param
ok 13 - # SKIP siglist
ok 14 - can call sub with both named and positional params used

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fb9a473a6f0 (LWP 12057)]
Parrot_str_copy (interp=<value optimized out>, s=0x4dd7328)
    at src/string/api.c:366
366             *buffer_flags |= Buffer_shared_FLAG;
(gdb) bt
#0  Parrot_str_copy (interp=<value optimized out>, s=0x4dd7328)
    at src/string/api.c:366
#1  0x00007fb9a4186cbb in Parrot_str_concat (interp=0x2862010, a=0x4dd7328, 
    b=0x4dd72e0) at src/string/api.c:407
#2  0x00007fb9a41a455f in Parrot_concat_s_s_s (cur_opcode=0x7fb9a185cc68, 
    interp=0x4dd72e0) at src/ops/string.ops:104
#3  0x00007fb9a41f1b3d in runops_fast_core (interp=0x2862010, 
    runcore_unused=<value optimized out>, pc=0x4dd72e0)
    at src/runcore/cores.c:514
#4  0x00007fb9a41f155d in runops_int (interp=0x2862010, offset=273809)
    at src/runcore/main.c:237
#5  0x00007fb9a41ca251 in runops (interp=0x2862010, offs=<value optimized out>)
    at src/call/ops.c:113
#6  0x00007fb9a41c5fc0 in Parrot_pcc_invoke_from_sig_object (interp=0x2862010, 
    sub_obj=<value optimized out>, call_object=<value optimized out>)
    at src/call/pcc.c:359
#7  0x00007fb9a41c60fb in Parrot_pcc_invoke_sub_from_c_args (interp=0x2862010, 
    sub_obj=0x2e45220, sig=<value optimized out>) at src/call/pcc.c:87
#8  0x0000000000400e23 in main ()
(gdb) 

Change History

Changed 5 years ago by moritz

Most segfaults are gone now, only one remaining in t/spec/S06-signature/named-parameters.rakudo

ok 82 - parameter rename appears in .signature.perl

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ff7a55cd6f0 (LWP 13401)]
0x0000000002c678d0 in ?? ()
(gdb) bt
#0  0x0000000002c678d0 in ?? ()
#1  0x00007ff7a5022db0 in Parrot_can_i_p_sc (cur_opcode=0x7ff7a0f35ca8, interp=0x2c0b010)
    at src/ops/object.ops:199
#2  0x00007ff7a508470d in runops_fast_core (interp=0x2c0b010, runcore_unused=<value optimized out>, 
    pc=0x2c0b010) at src/runcore/cores.c:514
#3  0x00007ff7a508413d in runops_int (interp=0x2c0b010, offset=1341) at src/runcore/main.c:237
#4  0x00007ff7a505cca1 in runops (interp=0x2c0b010, offs=<value optimized out>) at src/call/ops.c:113
#5  0x00007ff7a5058a20 in Parrot_pcc_invoke_from_sig_object (interp=0x2c0b010, 
    sub_obj=<value optimized out>, call_object=<value optimized out>) at src/call/pcc.c:359
#6  0x00007ff7a504d01d in Parrot_ext_call (interp=0x2c0b010, sub_pmc=0x47f6740, 
    signature=<value optimized out>) at src/extend.c:1062
#7  0x00007ff7a226a453 in Rakudo_binding_bind_one_param () from dynext/perl6_group.so
#8  0x00007ff7a22697df in Rakudo_binding_bind_signature () from dynext/perl6_group.so
#9  0x00007ff7a2039680 in Parrot_bind_signature_p () from dynext/perl6_ops.so
#10 0x00007ff7a508470d in runops_fast_core (interp=0x2c0b010, runcore_unused=<value optimized out>, 
    pc=0x2c0b010) at src/runcore/cores.c:514
#11 0x00007ff7a508413d in runops_int (interp=0x2c0b010, offset=48) at src/runcore/main.c:237
#12 0x00007ff7a505cca1 in runops (interp=0x2c0b010, offs=<value optimized out>) at src/call/ops.c:113
#13 0x00007ff7a5058a20 in Parrot_pcc_invoke_from_sig_object (interp=0x2c0b010, 
    sub_obj=<value optimized out>, call_object=<value optimized out>) at src/call/pcc.c:359
#14 0x00007ff7a5058b5b in Parrot_pcc_invoke_sub_from_c_args (interp=0x2c0b010, sub_obj=0x31f0db0, 
    sig=<value optimized out>) at src/call/pcc.c:87
#15 0x0000000000400e23 in main ()

Changed 5 years ago by bacek

moritz, can you reproduce it after r47380?

-- Bacek

Changed 4 years ago by moritz

  • status changed from new to closed
  • resolution set to fixed

This segfault is gone, ++ to everyone who was involved in fixing.

Note: See TracTickets for help on using tickets.