On 2017-07-20, at 10:23 PM, John David Anglin wrote: > On 2017-07-20, at 1:45 PM, Niko Tyni wrote: > >> so it looks like something's seriously wrong. > > It looks like miniperl branches to non existent code: > > Jul 20 20:18:48 mx3210 kernel: do_page_fault() command='miniperl' type=6 > address=0xbf600703 in libcrypt-2.24.so[f77f9000+9000] > Jul 20 20:18:48 mx3210 kernel: trap #6: Instruction TLB miss fault, vm_start > = 0x001e3000, vm_end = 0x005b4000 > > 0x0002eac8 <Perl_rpeep+2896>: b,l 0x1a8d0 > <Perl_custom_op_get_field>,rp > 0x0002eacc <Perl_rpeep+2900>: copy r4,r26 > 0x0002ead0 <Perl_rpeep+2904>: movb,= ret0,r22,0x2e284 <Perl_rpeep+780> > 0x0002ead4 <Perl_rpeep+2908>: copy r3,r25 > 0x0002ead8 <Perl_rpeep+2912>: copy r15,r24 > 0x0002eadc <Perl_rpeep+2916>: copy r4,r26 > 0x0002eae0 <Perl_rpeep+2920>: b,l 0x3b218,r31 > 0x0002eae4 <Perl_rpeep+2924>: copy r31,rp > > The branch seems from 2eae0 which might be here: > > (gdb) break *0x0002eae0 > Breakpoint 1 at 0x2eae0: file op.c, line 14791. > > 0x0002eae4 14791 cpeep(aTHX_ o, oldop);
I stepped manually through the last call to Perl_rpeep. (gdb) step 13595 if (!o || o->op_opt) (gdb) Perl_rpeep (my_perl=0x1e3008, o=0x5aee98) at op.c:13600 13600 ENTER; (gdb) 13601 SAVEOP(); (gdb) 13602 SAVEVPTR(PL_curcop); (gdb) 14355 if (oldop->op_type == OP_NEXTSTATE) { (gdb) 14346 || o->op_next->op_type == OP_RV2AV (gdb) 13602 SAVEVPTR(PL_curcop); (gdb) 13592 int defer_base = 0; (gdb) 13590 OP* oldoldop = NULL; (gdb) 13589 OP* oldop = NULL; (gdb) 14355 if (oldop->op_type == OP_NEXTSTATE) { (gdb) 14346 || o->op_next->op_type == OP_RV2AV (gdb) 13773 : MDEREF_HV_pop_rv2hv_helem; (gdb) 13604 if (o && o->op_opt) (gdb) 14318 (i = SvIV(((SVOP*)pop)->op_sv)) >= -128 && i <= 127) (gdb) 13604 if (o && o->op_opt) (gdb) 14318 (i = SvIV(((SVOP*)pop)->op_sv)) >= -128 && i <= 127) (gdb) 13604 if (o && o->op_opt) (gdb) 13835 ||OP_TYPE_IS(sibling->op_next->op_next, (gdb) 13624 o->op_opt = 1; (gdb) 13647 switch (o2->op_type) { (gdb) 13625 PL_op = o; (gdb) 13647 switch (o2->op_type) { (gdb) 14426 while (cLOGOP->op_other->op_type == OP_NULL) (gdb) 14428 DEFER(cLOGOP->op_other); (gdb) 14456 DEFER(cPMOP->op_pmstashstartu.op_pmreplstart); (gdb) 14457 break; (gdb) 14798 if (o->op_type == OP_NULL && oldop && oldop->op_next == o) { (gdb) 13604 if (o && o->op_opt) (gdb) 14318 (i = SvIV(((SVOP*)pop)->op_sv)) >= -128 && i <= 127) (gdb) 13604 if (o && o->op_opt) (gdb) 14318 (i = SvIV(((SVOP*)pop)->op_sv)) >= -128 && i <= 127) (gdb) 13604 if (o && o->op_opt) (gdb) 13835 ||OP_TYPE_IS(sibling->op_next->op_next, (gdb) 13624 o->op_opt = 1; (gdb) 13647 switch (o2->op_type) { (gdb) 13625 PL_op = o; (gdb) 13647 switch (o2->op_type) { (gdb) 13807 switch (o->op_type) { (gdb) Perl_rpeep (my_perl=0x1e3008, o=0x5aeedc) at op.c:13807 13807 switch (o->op_type) { (gdb) 14798 if (o->op_type == OP_NULL && oldop && oldop->op_next == o) { (gdb) 13604 if (o && o->op_opt) (gdb) 14318 (i = SvIV(((SVOP*)pop)->op_sv)) >= -128 && i <= 127) (gdb) 13604 if (o && o->op_opt) (gdb) 14318 (i = SvIV(((SVOP*)pop)->op_sv)) >= -128 && i <= 127) (gdb) 13604 if (o && o->op_opt) (gdb) 13835 ||OP_TYPE_IS(sibling->op_next->op_next, (gdb) 13624 o->op_opt = 1; (gdb) 13647 switch (o2->op_type) { (gdb) 13625 PL_op = o; (gdb) 13647 switch (o2->op_type) { (gdb) 14798 if (o->op_type == OP_NULL && oldop && oldop->op_next == o) { (gdb) 13604 if (o && o->op_opt) (gdb) 14318 (i = SvIV(((SVOP*)pop)->op_sv)) >= -128 && i <= 127) (gdb) 13604 if (o && o->op_opt) (gdb) 14318 (i = SvIV(((SVOP*)pop)->op_sv)) >= -128 && i <= 127) (gdb) 13604 if (o && o->op_opt) (gdb) 13835 ||OP_TYPE_IS(sibling->op_next->op_next, (gdb) 13624 o->op_opt = 1; (gdb) 13647 switch (o2->op_type) { (gdb) 13625 PL_op = o; (gdb) 13647 switch (o2->op_type) { (gdb) 14789 XopENTRYCUSTOM(o, xop_peep); (gdb) Perl_custom_op_get_field (my_perl=my_perl@entry=0x1e3008, o=o@entry=0x5aee38, field=field@entry=XOPe_xop_peep) at op.c:14847 14847 keysv = sv_2mortal(newSViv(PTR2IV(o->op_ppaddr))); (gdb) 14831 { (gdb) 14847 keysv = sv_2mortal(newSViv(PTR2IV(o->op_ppaddr))); (gdb) 14849 if (PL_custom_ops) (gdb) Perl_custom_op_get_field (my_perl=0x1e3008, o=0x5aee38, field=XOPe_xop_peep) at op.c:14853 14853 if (!he && PL_custom_op_names && (gdb) 14879 if(field == XOPe_xop_ptr) { (gdb) 14902 switch(field) { (gdb) 14884 switch(field) { (gdb) Perl_custom_op_get_field (my_perl=0x1e3008, o=0x5aee38, field=XOPe_xop_peep) at op.c:14896 14896 break; (gdb) Perl_custom_op_get_field (my_perl=my_perl@entry=0x1e3008, o=o@entry=0x5aee38, field=field@entry=XOPe_xop_peep) at op.c:14929 14929 } (gdb) Perl_rpeep (my_perl=0x1e3008, o=0x5aee38) at op.c:14790 14790 if (cpeep) (gdb) 14791 cpeep(aTHX_ o, oldop); (gdb) Thread 2.1 "miniperl" hit Breakpoint 2, 0x0002eae0 in Perl_rpeep ( my_perl=0x1e3008, o=0x5aee38) at op.c:14791 14791 cpeep(aTHX_ o, oldop); (gdb) ptype cpeep type = void (*)(PerlInterpreter *, OP *, OP *) (gdb) p/x cpeep $1 = 0xbf600701 (gdb) p o $3 = (OP *) 0x5aee38 (gdb) p *o $4 = {op_next = 0x0, op_sibparent = 0x5aee14, op_ppaddr = @0x1e2016: 0xd07ac <Perl_pp_null>, op_targ = 0, op_type = 382, op_opt = 1, op_slabbed = 1, op_savefree = 0, op_static = 0, op_folded = 0, op_moresib = 0, op_spare = 0, op_flags = 7 '\a', op_private = 1 '\001'} Problem is probably in Perl_custom_op_get_field. Need to figure out why it returns 0xbf600701. Dave -- John David Anglin dave.ang...@bell.net