Skip Menu |

This queue is for tickets about the DBD-Pg CPAN distribution.

Report information
The Basics
Id: 121630
Status: resolved
Priority: 0/
Queue: DBD-Pg

People
Owner: greg [...] turnstep.com
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 3.5.0
Fixed in: 3.7.1



Subject: Bus error & memory corruption in t/12placeholders.t
On some systems t/12placeholders.t fails. Here's a CPAN Testers report on a linux system showing memory corruption: http://www.cpantesters.org/cpan/report/af438cbe-23fb-11e7-8dc5-809df23be572 On my freebsd 10.3 smoker I saw once this problem: ... t/12placeholders.t .. Failed 3/257 subtests ... t/12placeholders.t (Wstat: 10 Tests: 254 Failed: 0) Non-zero wait status: 10 ... -> which looks like a bus error. The failure on the freebsd 10.3 system is not easily reproducible.
On 2017-05-12 06:06:38, SREZIC wrote: Show quoted text
> On some systems t/12placeholders.t fails. Here's a CPAN Testers report > on a linux system showing memory corruption: > http://www.cpantesters.org/cpan/report/af438cbe-23fb-11e7-8dc5- > 809df23be572 > > On my freebsd 10.3 smoker I saw once this problem: > > ... > t/12placeholders.t .. > Failed 3/257 subtests > ... > t/12placeholders.t (Wstat: 10 Tests: 254 Failed: 0) > Non-zero wait status: 10 > ... > > -> which looks like a bus error. > > The failure on the freebsd 10.3 system is not easily reproducible.
The 12placeholders.t failures always happen on my freebsd 12 smoker. The lat log lines: ... ok 253 - Basic placeholder escaping does NOT modify the original string ok 254 - Basic placeholder escaping works via backslash-question mark for \?\? ok 255 - Basic placeholder escaping fails when pg_placeholder_escaped is set to false [1] 76814 bus error (core dumped) perl5.26.1 -Mblib t/12placeholders.t A gdb backtrace (unfortunately a perl without debugging symbols): #0 0x00000000004ae5e8 in Perl_mg_find () #1 0x00000000004d3071 in Perl_sv_setsv_flags () #2 0x00000000004d9ef4 in Perl_newSVsv () #3 0x000000000052181a in S_to_utf8_substr () #4 0x000000000051fdcf in Perl_re_intuit_start () #5 0x000000000051df02 in Perl_regexec_flags () #6 0x00000000004c6cb1 in Perl_pp_match () #7 0x00000000004c1d63 in Perl_runops_standard () #8 0x00000000004437db in perl_run () #9 0x000000000042317d in main ()
I cannot trigger this on a 11.1 freebsd (AWS). Anything in particular I might tweak to increase the odds of duplicating? I can search for a v12 AMI if that would help.
On 2018-01-28 22:23:31, TURNSTEP wrote: Show quoted text
> I cannot trigger this on a 11.1 freebsd (AWS). Anything in particular > I might tweak to increase the odds of duplicating? I can search for a > v12 AMI if that would help.
Here's another backtrace created with a debugging perl 5.26.1 on freebsd 12. The stack looks a little bit different than the previous one: (gdb) bt #0 S_mg_findext_flags (sv=0x802e225b8, type=66, flags=0, vtbl=<optimized out>) at mg.c:413 #1 Perl_mg_find (sv=0x802e225b8, type=66) at mg.c:433 #2 0x00000000004db13c in Perl_fbm_instr (big=0x801435b00 "DBD::Pg::st execute failed: called with 1 bind variables when 3 are needed at t/12placeholders.t line 887.\n", bigend=0x801435b6b "", littlestr=0x802e225b8, flags=<optimized out>) at util.c:814 #3 0x00000000005a6a94 in Perl_re_intuit_start (rx=<optimized out>, sv=<optimized out>, strbeg=<optimized out>, strpos=<optimized out>, strend=<optimized out>, flags=<optimized out>, data=0x3b748bd4af99cbe8) at regexec.c:926 #4 0x00000000005a3286 in Perl_regexec_flags (rx=<optimized out>, stringarg=<optimized out>, strend=<optimized out>, strbeg=<optimized out>, minend=0, sv=<optimized out>, data=0x0, flags=97) at regexec.c:3006 #5 0x00000000005089a1 in Perl_pp_match () at pp_hot.c:2054 #6 0x00000000004d8bbe in Perl_runops_debug () at dump.c:2451 #7 0x000000000044f3fb in S_run_body (oldscope=1) at perl.c:2518 #8 0x000000000044f279 in perl_run (my_perl=<optimized out>) at perl.c:2447 #9 0x00000000004233ed in main (argc=<optimized out>, argv=<optimized out>, env=0x7fffffffe850) at perlmain.c:123
I'm wondering if this isn't a manifestation of the other error we are seeing with placeholders. Please see if commit 22c134d850e857e1f9d0b67e2830a44c34ca623d resolves the problem (or just pull HEAD).
On 2018-02-03 14:24:34, TURNSTEP wrote: Show quoted text
> I'm wondering if this isn't a manifestation of the other error we are > seeing with placeholders. Please see if commit > 22c134d850e857e1f9d0b67e2830a44c34ca623d resolves the problem (or just > pull HEAD).
With cacea97ae85fa76f19c45f710b46e7b3c52d2f44 (one commit before the fixing commit) [1] 38517 bus error (core dumped) perl5.26.1d -Mblib t/12placeholders.t With 22c134d850e857e1f9d0b67e2830a44c34ca623d (the fixing commit) or cacea97ae85fa76f19c45f710b46e7b3c52d2f44 (current master): -> No error with the same perl (5.26.1, with debugging symbols) on FreeBSD 12
Show quoted text
> -> No error with the same perl (5.26.1, with debugging symbols) on > FreeBSD 12
Excellent news, thanks for testing this out. Marking as patched!