Skip Menu |

This queue is for tickets about the Tickit CPAN distribution.

Report information
The Basics
Id: 131526
Status: rejected
Priority: 0/
Queue: Tickit

People
Owner: Nobody in particular
Requestors: leonerd-cpan [...] leonerd.org.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.69
Fixed in: (no value)



Subject: Segfault while typing in circle-fe-term
When typing there's an about 1-in-20 chance of segfault. gdb backtrace: Program received signal SIGSEGV, Segmentation fault. #0 tickit_bindings_run_event_whilefalse (bindings=bindings@entry=0x555556c22c20, owner=owner@entry=0x555556c22b60, evindex=evindex@entry=2, info=info@entry=0x7fffffffd630) at src/bindings.c:56 #1 0x00007ffff78e2b4a in run_events_whilefalse (info=0x7fffffffd630, evindex=2, owner=0x555556c22b60) at src/term.c:624 #2 got_key (tt=tt@entry=0x555556c22b60, tk=tk@entry=0x5555564838e0, key=key@entry=0x7fffffffd6e0) at src/term.c:624 #3 0x00007ffff78e2ee6 in get_keys (tt=0x555556c22b60, tk=0x5555564838e0) at src/term.c:643 #4 0x00007ffff78e744d in on_term_readable (t=0x555556c8a4c0, flags=<optimized out>, info=<optimized out>, user=<optimized out>) at src/tickit.c:78 #5 0x00007ffff78e7836 in tickit_evloop_invoke_watch (watch=0x555555f07d30, flags=flags@entry=TICKIT_EV_FIRE) at src/tickit.c:580 #6 0x00007ffff78fdcac in invoke_watch (my_perl=<optimized out>, cv=0x555556cba350) at lib/Tickit.xs:694 #7 0x000055555565b868 in Perl_pp_entersub (my_perl=0x5555558a9260) at pp_hot.c:5237 #8 0x0000555555652016 in Perl_runops_standard (my_perl=0x5555558a9260) at run.c:42 #9 0x00005555555be6d5 in Perl_call_sv (my_perl=0x5555558a9260, sv=<optimized out>, flags=<optimized out>) at perl.c:3026 #10 0x00007ffff7804bed in ?? () from /usr/lib/x86_64-linux-gnu/perl5/5.30/auto/Linux/Epoll/Epoll.so #11 0x000055555565b868 in Perl_pp_entersub (my_perl=0x5555558a9260) at pp_hot.c:5237 #12 0x0000555555652016 in Perl_runops_standard (my_perl=0x5555558a9260) at run.c:42 #13 0x00005555555be6d5 in Perl_call_sv (my_perl=0x5555558a9260, sv=sv@entry=0x555556a1fa70, flags=flags@entry=1) at perl.c:3026 #14 0x00007ffff78fada2 in evloop_run (data=0x555556cb4e40, flags=<optimized out>) at lib/Tickit.xs:766 #15 0x00007ffff78e718f in tickit_run (t=0x555556c8a4c0) at src/tickit.c:309 #16 0x00007ffff78fa99d in XS_Tickit___Tickit_run (my_perl=<optimized out>, cv=<optimized out>) at lib/Tickit.xs:3646 #17 0x000055555565b868 in Perl_pp_entersub (my_perl=0x5555558a9260) at pp_hot.c:5237 #18 0x0000555555652016 in Perl_runops_standard (my_perl=0x5555558a9260) at run.c:42 #19 0x00005555555c653b in S_run_body (oldscope=<optimized out>, my_perl=<optimized out>) at perl.c:2711 #20 perl_run (my_perl=0x5555558a9260) at perl.c:2639 #21 0x000055555559c462 in main (argc=<optimized out>, argv=<optimized out>, env=<optimized out>) at perlmain.c:127 The source 55 for(struct TickitBinding *bind = bindings->first; bind; bind = bind->next) 56 if(bind->evindex == evindex) { 57 ret = (*bind->fn)(owner, TICKIT_EV_FIRE, info, bind->data); 58 if(ret) 59 goto exit; 60 } (gdb) p bind $1 = (struct TickitBinding *) 0x1b0 (gdb) p bindings $2 = (struct TickitBindings *) 0x555556c22c20 (gdb) p *bindings $3 = {first = 0x555556d073a0, is_iterating = -1, needs_delete = 0} I wonder what happened to `bind`. Possibly a data race somewhere? -- Paul Evans
On Mon Jan 20 20:02:56 2020, PEVANS wrote: Show quoted text
> I wonder what happened to `bind`. Possibly a data race somewhere?
(gdb) p bindings->first $4 = (struct TickitBinding *) 0x555556d073a0 (gdb) p $4->next $5 = (struct TickitBinding *) 0x555556d07180 (gdb) p $5->next $6 = (struct TickitBinding *) 0x1b0 -- Paul Evans
Seems maybe related to a bad build somehow? The all-debian-packages version on my server is fine. A freshly-build clean install into $HOME on my laptop is also fine. It might have been some mixed versions or odd build somewhere along the line? I'll keep this ticket open for now in case it happens again but if no repeat in a few months time I'll close it. -- Paul Evans
Ugh, I'm an idiot. I had some debugging code still in place for an unrelated issue that managed to break TickitTerm refcount because it used the newSVterm_noinc() function by mistake. Now that's fixed this issue disappears. -- Paul Evans