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

Report information
The Basics
Id:
132799
Status:
open
Priority:
Low/Low
Queue:

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

BugTracker
Severity:
(no value)
Broken in:
  • 3.12.1
  • 3.12.2
  • 3.12.3
Fixed in:
(no value)



Subject: t/09arrays.t fails sometimes
We are seeing test failures in Open Build Service (OBS) for t/09arrays.t, but not always. Here is a failure for x86_64 (version 3.12.1): https://build.opensuse.org/package/live_build_log/devel:languages:perl/perl-DBD-Pg/openSUSE_Leap_15.1/x86_64 But for other openSUSE versions it passes: https://build.opensuse.org/package/show/devel:languages:perl/perl-DBD-Pg However, on ppc64, I can see the test failure almost every time, with 3.12.3 https://build.opensuse.org/package/live_build_log/devel:languages:perl:autoupdate/perl-DBD-Pg/standard/ppc64 [ 96s] t/09arrays.t ........... [ 96s] All 203 subtests passed [ 96s] t/10_pg_error_field.t .. ok [ 97s] t/12placeholders.t ..... ok [ 97s] t/20savepoints.t ....... ok [ 98s] t/30unicode.t .......... ok [ 98s] t/99cleanup.t .......... ok [ 98s] [ 98s] Test Summary Report [ 98s] ------------------- [ 98s] t/09arrays.t (Wstat: 11 Tests: 203 Failed: 0) [ 98s] Non-zero wait status: 11 [ 98s] Files=17, Tests=2880, 32 wallclock secs ( 0.62 usr 0.05 sys + 8.71 cusr 1.07 csys = 10.45 CPU) [ 98s] Result: FAIL [ 98s] Failed 1/17 test programs. 0/2880 subtests failed. [ 98s] make: *** [Makefile:988: test_dynamic] Error 255 [ 98s] error: Bad exit status from /var/tmp/rpm-tmp.7c1Fqw (%check) Maybe the cleanup code has problems (as the tests itself are passing). I can test possible fixes in OBS if necessary.
Another observation I made is: When running tests with TEST_HARNESS=1 make test everything is fine. Also I can only reproduce the failure in OBS with version 3.12.3, not with 3.12.2 or 3.12.1
Thank you for the report. Could you help us to debug it further by running that test in verbose mode? Should be doable from command line like so: prove -b -v t/09_arrays.t
On Wed Jun 10 18:30:26 2020, TURNSTEP wrote:
Show quoted text
> Thank you for the report. Could you help us to debug it further by > running that test in verbose mode?
Yeah, I tried that already, see above. With the result that it always passes. That's also the workaround we are using now ;-)
On Wed Jun 10 18:37:25 2020, TINITA wrote:
Show quoted text
> Yeah, I tried that already, see above. > With the result that it always passes. > That's also the workaround we are using now ;-)
Oh wait, sorry, I made a typo in my previous message, I meant: HARNESS_VERBOSE=1 make test
On Wed Jun 10 18:39:29 2020, TINITA wrote:
Show quoted text
> Oh wait, sorry, I made a typo in my previous message, I meant: > > HARNESS_VERBOSE=1 make test
actually that doesn't result in verbose tests. I tried `prove -v` now, but it has the same effect, tests are passing.
I attached the log from 09arrays.t
Subject: 09arrays.log
[ 85s] t/09arrays.t ........... [ 85s] 1..203 [ 85s] ok 1 - Connect to database for array testing [ 85s] ok 2 - Array quoting allows direct insertion into statements [ 85s] ok 3 - [bind] Array insert success : Empty array : [''] [ 85s] ok 4 - [bind][!expand] Correct array inserted: Empty array : [''] [ 85s] ok 5 - [bind][expand] Correct array inserted: Empty array : [''] [ 85s] ok 6 - [quote] Array insert success : Empty array : [''] [ 85s] ok 7 - [quote][expand] Correct array inserted: Empty array : [''] [ 85s] ok 8 - [bind] Array insert success : Empty array with two levels : [['']] [ 85s] ok 9 - [bind][!expand] Correct array inserted: Empty array with two levels : [['']] [ 85s] ok 10 - [bind][expand] Correct array inserted: Empty array with two levels : [['']] [ 85s] ok 11 - [quote] Array insert success : Empty array with two levels : [['']] [ 85s] ok 12 - [quote][expand] Correct array inserted: Empty array with two levels : [['']] [ 85s] ok 13 - [bind] Array insert success : Empty array with three levels : [[['']]] [ 85s] ok 14 - [bind][!expand] Correct array inserted: Empty array with three levels : [[['']]] [ 85s] ok 15 - [bind][expand] Correct array inserted: Empty array with three levels : [[['']]] [ 85s] ok 16 - [quote] Array insert success : Empty array with three levels : [[['']]] [ 85s] ok 17 - [quote][expand] Correct array inserted: Empty array with three levels : [[['']]] [ 85s] ok 18 - [bind] Array insert success : Two empty arrays : [[''],['']] [ 85s] ok 19 - [bind][!expand] Correct array inserted: Two empty arrays : [[''],['']] [ 85s] ok 20 - [bind][expand] Correct array inserted: Two empty arrays : [[''],['']] [ 85s] ok 21 - [quote] Array insert success : Two empty arrays : [[''],['']] [ 85s] ok 22 - [quote][expand] Correct array inserted: Two empty arrays : [[''],['']] [ 85s] ok 23 - [bind] Array insert success : Three empty arrays at second level : [[[''],[''],['']]] [ 85s] ok 24 - [bind][!expand] Correct array inserted: Three empty arrays at second level : [[[''],[''],['']]] [ 85s] ok 25 - [bind][expand] Correct array inserted: Three empty arrays at second level : [[[''],[''],['']]] [ 85s] ok 26 - [quote] Array insert success : Three empty arrays at second level : [[[''],[''],['']]] [ 85s] ok 27 - [quote][expand] Correct array inserted: Three empty arrays at second level : [[[''],[''],['']]] [ 85s] ok 28 - [bind] Array insert error : Unbalanced empty arrays : [[],[[]]] [ 85s] ok 29 - [quote] Array insert error : Unbalanced empty arrays : [[],[[]]] [ 85s] ok 30 - [bind] Array insert error : Bare hashref : {} [ 85s] ok 31 - [quote] Array insert error : Bare hashref : {} [ 85s] ok 32 - [bind] Array insert error : Hashref at top level : [{}] [ 85s] ok 33 - [quote] Array insert error : Hashref at top level : [{}] [ 85s] ok 34 - [bind] Array insert error : Hidden hashref : [1,2,{3,4},5] [ 85s] ok 35 - [quote] Array insert error : Hidden hashref : [1,2,{3,4},5] [ 85s] ok 36 - [bind] Array insert error : Unbalanced array : [[1,2],[3]] [ 85s] ok 37 - [quote] Array insert error : Unbalanced array : [[1,2],[3]] [ 85s] ok 38 - [bind] Array insert error : Unbalanced array : [[1,2],[3,4,5]] [ 85s] ok 39 - [quote] Array insert error : Unbalanced array : [[1,2],[3,4,5]] [ 85s] ok 40 - [bind] Array insert error : Unbalanced array : [[1,2],[]] [ 85s] ok 41 - [quote] Array insert error : Unbalanced array : [[1,2],[]] [ 85s] ok 42 - [bind] Array insert error : Unbalanced array : [[],[3]] [ 85s] ok 43 - [quote] Array insert error : Unbalanced array : [[],[3]] [ 85s] ok 44 - [bind] Array insert success : Simple 1-D numeric array : [123] [ 85s] ok 45 - [bind][!expand] Correct array inserted: Simple 1-D numeric array : [123] [ 85s] ok 46 - [bind][expand] Correct array inserted: Simple 1-D numeric array : [123] [ 85s] ok 47 - [quote] Array insert success : Simple 1-D numeric array : [123] [ 85s] ok 48 - [quote][expand] Correct array inserted: Simple 1-D numeric array : [123] [ 85s] ok 49 - [bind] Array insert success : Simple 1-D text array : ['abc'] [ 85s] ok 50 - [bind][!expand] Correct array inserted: Simple 1-D text array : ['abc'] [ 85s] ok 51 - [bind][expand] Correct array inserted: Simple 1-D text array : ['abc'] [ 85s] ok 52 - [quote] Array insert success : Simple 1-D text array : ['abc'] [ 85s] ok 53 - [quote][expand] Correct array inserted: Simple 1-D text array : ['abc'] [ 85s] ok 54 - [bind] Array insert success : Text array with commas and quotes : ['a','b,c'] [ 85s] ok 55 - [bind][!expand] Correct array inserted: Text array with commas and quotes : ['a','b,c'] [ 85s] ok 56 - [bind][expand] Correct array inserted: Text array with commas and quotes : ['a','b,c'] [ 85s] ok 57 - [quote] Array insert success : Text array with commas and quotes : ['a','b,c'] [ 85s] ok 58 - [quote][expand] Correct array inserted: Text array with commas and quotes : ['a','b,c'] [ 85s] ok 59 - [bind] Array insert success : Text array with commas, escaped closing brace : ['a','b,}'] [ 85s] ok 60 - [bind][!expand] Correct array inserted: Text array with commas, escaped closing brace : ['a','b,}'] [ 85s] ok 61 - [bind][expand] Correct array inserted: Text array with commas, escaped closing brace : ['a','b,}'] [ 85s] ok 62 - [quote] Array insert success : Text array with commas, escaped closing brace : ['a','b,}'] [ 85s] ok 63 - [quote][expand] Correct array inserted: Text array with commas, escaped closing brace : ['a','b,}'] [ 85s] ok 64 - [bind] Array insert success : Text array with commas, escaped closing bracket : ['a','b,]'] [ 85s] ok 65 - [bind][!expand] Correct array inserted: Text array with commas, escaped closing bracket : ['a','b,]'] [ 85s] ok 66 - [bind][expand] Correct array inserted: Text array with commas, escaped closing bracket : ['a','b,]'] [ 85s] ok 67 - [quote] Array insert success : Text array with commas, escaped closing bracket : ['a','b,]'] [ 85s] ok 68 - [quote][expand] Correct array inserted: Text array with commas, escaped closing bracket : ['a','b,]'] [ 85s] ok 69 - [bind] Array insert success : Simple 1-D numeric array : [1,2] [ 85s] ok 70 - [bind][!expand] Correct array inserted: Simple 1-D numeric array : [1,2] [ 85s] ok 71 - [bind][expand] Correct array inserted: Simple 1-D numeric array : [1,2] [ 85s] ok 72 - [quote] Array insert success : Simple 1-D numeric array : [1,2] [ 85s] ok 73 - [quote][expand] Correct array inserted: Simple 1-D numeric array : [1,2] [ 85s] ok 74 - [bind] Array insert success : Simple 2-D numeric array : [[1]] [ 85s] ok 75 - [bind][!expand] Correct array inserted: Simple 2-D numeric array : [[1]] [ 85s] ok 76 - [bind][expand] Correct array inserted: Simple 2-D numeric array : [[1]] [ 85s] ok 77 - [quote] Array insert success : Simple 2-D numeric array : [[1]] [ 85s] ok 78 - [quote][expand] Correct array inserted: Simple 2-D numeric array : [[1]] [ 85s] ok 79 - [bind] Array insert success : Simple 2-D numeric array : [[1,2]] [ 85s] ok 80 - [bind][!expand] Correct array inserted: Simple 2-D numeric array : [[1,2]] [ 85s] ok 81 - [bind][expand] Correct array inserted: Simple 2-D numeric array : [[1,2]] [ 85s] ok 82 - [quote] Array insert success : Simple 2-D numeric array : [[1,2]] [ 85s] ok 83 - [quote][expand] Correct array inserted: Simple 2-D numeric array : [[1,2]] [ 85s] ok 84 - [bind] Array insert success : Simple 3-D numeric array : [[[1]]] [ 85s] ok 85 - [bind][!expand] Correct array inserted: Simple 3-D numeric array : [[[1]]] [ 85s] ok 86 - [bind][expand] Correct array inserted: Simple 3-D numeric array : [[[1]]] [ 85s] ok 87 - [quote] Array insert success : Simple 3-D numeric array : [[[1]]] [ 85s] ok 88 - [quote][expand] Correct array inserted: Simple 3-D numeric array : [[[1]]] [ 85s] ok 89 - [bind] Array insert success : 3-D mixed array : [[["alpha",2],[23,"pop"]]] [ 85s] ok 90 - [bind][!expand] Correct array inserted: 3-D mixed array : [[["alpha",2],[23,"pop"]]] [ 85s] ok 91 - [bind][expand] Correct array inserted: 3-D mixed array : [[["alpha",2],[23,"pop"]]] [ 85s] ok 92 - [quote] Array insert success : 3-D mixed array : [[["alpha",2],[23,"pop"]]] [ 85s] ok 93 - [quote][expand] Correct array inserted: 3-D mixed array : [[["alpha",2],[23,"pop"]]] [ 85s] ok 94 - [bind] Array insert success : 3-D mixed array : [[[1,2,3],[4,5,"6"],["seven","8","9"]]] [ 85s] ok 95 - [bind][!expand] Correct array inserted: 3-D mixed array : [[[1,2,3],[4,5,"6"],["seven","8","9"]]] [ 85s] ok 96 - [bind][expand] Correct array inserted: 3-D mixed array : [[[1,2,3],[4,5,"6"],["seven","8","9"]]] [ 85s] ok 97 - [quote] Array insert success : 3-D mixed array : [[[1,2,3],[4,5,"6"],["seven","8","9"]]] [ 85s] ok 98 - [quote][expand] Correct array inserted: 3-D mixed array : [[[1,2,3],[4,5,"6"],["seven","8","9"]]] [ 85s] ok 99 - [bind] Array insert success : Simple single quote : [q{O'RLY?}] [ 85s] ok 100 - [bind][!expand] Correct array inserted: Simple single quote : [q{O'RLY?}] [ 85s] ok 101 - [bind][expand] Correct array inserted: Simple single quote : [q{O'RLY?}] [ 85s] ok 102 - [quote] Array insert success : Simple single quote : [q{O'RLY?}] [ 85s] ok 103 - [quote][expand] Correct array inserted: Simple single quote : [q{O'RLY?}] [ 85s] ok 104 - [bind] Array insert success : Simple double quote : [q{O"RLY?}] [ 85s] ok 105 - [bind][!expand] Correct array inserted: Simple double quote : [q{O"RLY?}] [ 85s] ok 106 - [bind][expand] Correct array inserted: Simple double quote : [q{O"RLY?}] [ 85s] ok 107 - [quote] Array insert success : Simple double quote : [q{O"RLY?}] [ 85s] ok 108 - [quote][expand] Correct array inserted: Simple double quote : [q{O"RLY?}] [ 85s] ok 109 - [bind] Array insert success : Many quotes : [[q{O"RLY?}],[q|'Ya' - "really"|],[123]] [ 85s] ok 110 - [bind][!expand] Correct array inserted: Many quotes : [[q{O"RLY?}],[q|'Ya' - "really"|],[123]] [ 85s] ok 111 - [bind][expand] Correct array inserted: Many quotes : [[q{O"RLY?}],[q|'Ya' - "really"|],[123]] [ 85s] ok 112 - [quote] Array insert success : Many quotes : [[q{O"RLY?}],[q|'Ya' - "really"|],[123]] [ 85s] ok 113 - [quote][expand] Correct array inserted: Many quotes : [[q{O"RLY?}],[q|'Ya' - "really"|],[123]] [ 85s] ok 114 - [bind] Array insert success : Single backslash testing : ["Single\\Backslash"] [ 85s] ok 115 - [bind][!expand] Correct array inserted: Single backslash testing : ["Single\\Backslash"] [ 85s] ok 116 - [bind][expand] Correct array inserted: Single backslash testing : ["Single\\Backslash"] [ 85s] ok 117 - [quote] Array insert success : Single backslash testing : ["Single\\Backslash"] [ 85s] ok 118 - [quote][expand] Correct array inserted: Single backslash testing : ["Single\\Backslash"] [ 85s] ok 119 - [bind] Array insert success : Double backslash testing : ["Double\\\\Backslash"] [ 85s] ok 120 - [bind][!expand] Correct array inserted: Double backslash testing : ["Double\\\\Backslash"] [ 85s] ok 121 - [bind][expand] Correct array inserted: Double backslash testing : ["Double\\\\Backslash"] [ 85s] ok 122 - [quote] Array insert success : Double backslash testing : ["Double\\\\Backslash"] [ 85s] ok 123 - [quote][expand] Correct array inserted: Double backslash testing : ["Double\\\\Backslash"] [ 85s] ok 124 - [bind] Array insert success : Escape party - backslash+newline, two + one : [["Test\\nRun","Quite \"so\""],["back\\\\slashes are a \"pa\\in\"",123] ] [ 85s] ok 125 - [bind][!expand] Correct array inserted: Escape party - backslash+newline, two + one : [["Test\\nRun","Quite \"so\""],["back\\\\slashes are a \"pa\\in\"",123] ] [ 85s] ok 126 - [bind][expand] Correct array inserted: Escape party - backslash+newline, two + one : [["Test\\nRun","Quite \"so\""],["back\\\\slashes are a \"pa\\in\"",123] ] [ 85s] ok 127 - [quote] Array insert success : Escape party - backslash+newline, two + one : [["Test\\nRun","Quite \"so\""],["back\\\\slashes are a \"pa\\in\"",123] ] [ 85s] ok 128 - [quote][expand] Correct array inserted: Escape party - backslash+newline, two + one : [["Test\\nRun","Quite \"so\""],["back\\\\slashes are a \"pa\\in\"",123] ] [ 85s] ok 129 - [bind] Array insert success : Simple undef test : [undef] [ 85s] ok 130 - [bind][!expand] Correct array inserted: Simple undef test : [undef] [ 85s] ok 131 - [bind][expand] Correct array inserted: Simple undef test : [undef] [ 85s] ok 132 - [quote] Array insert success : Simple undef test : [undef] [ 85s] ok 133 - [quote][expand] Correct array inserted: Simple undef test : [undef] [ 85s] ok 134 - [bind] Array insert success : Simple undef test : [[undef]] [ 85s] ok 135 - [bind][!expand] Correct array inserted: Simple undef test : [[undef]] [ 85s] ok 136 - [bind][expand] Correct array inserted: Simple undef test : [[undef]] [ 85s] ok 137 - [quote] Array insert success : Simple undef test : [[undef]] [ 85s] ok 138 - [quote][expand] Correct array inserted: Simple undef test : [[undef]] [ 85s] ok 139 - [bind] Array insert success : Multiple undef test : [[1,2],[undef,3],["four",undef],[undef,undef]] [ 85s] ok 140 - [bind][!expand] Correct array inserted: Multiple undef test : [[1,2],[undef,3],["four",undef],[undef,undef]] [ 85s] ok 141 - [bind][expand] Correct array inserted: Multiple undef test : [[1,2],[undef,3],["four",undef],[undef,undef]] [ 85s] ok 142 - [quote] Array insert success : Multiple undef test : [[1,2],[undef,3],["four",undef],[undef,undef]] [ 85s] ok 143 - [quote][expand] Correct array inserted: Multiple undef test : [[1,2],[undef,3],["four",undef],[undef,undef]] [ 85s] ok 144 - String array with no items returns empty array [ 85s] ok 145 - String array with empty string returns empty string [ 85s] ok 146 - Integer array with no items returns empty array [ 85s] ok 147 - Boolean array with no items returns empty array [ 85s] ok 148 - Boolean array gets created and returned correctly [ 85s] ok 149 - Boolean array gets created and returned correctly [ 85s] ok 150 - Boolean array gets created and returned correctly [ 85s] ok 151 - Boolean array gets created and returned correctly [ 85s] ok 152 - Boolean array gets created and returned correctly [ 85s] ok 153 - Modification of undefined parts of array are allowed [ 85s] ok 154 - Array test Simple test of single array element : 1 [ 85s] ok 155 - Array test Simple test of multiple array elements : 1,2 [ 85s] ok 156 - Array test Simple test of multiple array elements : 1,2,3 [ 85s] ok 157 - Array test Array with text items : 'a','b' [ 85s] ok 158 - Array test Array with numeric items : 0.1,2.4 [ 85s] ok 159 - Array test Array with escaped items : 'My"lrd','b','c' [ 85s] ok 160 - Array test Multi-level integer array : [1] [ 85s] ok 161 - Array test Multi-level integer array : [[1,2]] [ 85s] ok 162 - Array test Multi-level integer array : [[1],[2]] [ 85s] ok 163 - Array test Multi-level integer array : [[1],[2],[3]] [ 85s] ok 164 - Array test Multi-level integer array : [[[1]],[[2]],[[3]]] [ 85s] ok 165 - Array test Array with a null : 'abc',NULL [ 85s] ok 166 - Array test Array with many nulls and a quoted int : ['abc','NULL',NULL,NULL,123::text] [ 85s] ok 167 - Array test Final item is empty : ['abc',''] [ 85s] ok 168 - Array test Last item is NULL : 1,NULL [ 85s] ok 169 - Array test Only item is NULL : NULL [ 85s] ok 170 - Array test Two NULL items only : NULL,NULL [ 85s] ok 171 - Array test Three NULL items only : NULL,NULL,NULL [ 85s] ok 172 - Array test Middle item is NULL : [123,NULL,456] [ 85s] ok 173 - Array test First item is NULL : NULL,'abc' [ 85s] ok 174 - Array test Fake NULL is text : 'a','NULL' [ 85s] ok 175 - Array test Deep nesting : [[[[[1,2,3]]]]] [ 85s] ok 176 - Array test Deep nesting : [[[[[1],[2],[3]]]]] [ 85s] ok 177 - Array test Deep nesting : [[[[[1]]],[[[2]]],[[[3]]]]] [ 85s] ok 178 - Array test Deep nesting : [[[[[1]],[[2]],[[3]]]]] [ 85s] ok 179 - Array test Test of boolean type : 1::bool [ 85s] ok 180 - Array test Test of boolean types : 1::bool,0::bool,'true'::boolean [ 85s] ok 181 - Array test Test of oid type - should not quote : 1::oid [ 85s] ok 182 - Array test Text number should quote : 1::text [ 85s] ok 183 - Array test Unspecified int should not quote : 1,2,3 [ 85s] ok 184 - Array test Integer number should quote : 1::int [ 85s] ok 185 - Array test Type 'box' works : '(1,2),(4,5)'::box,'(5,3),(4,5)' [ 85s] ok 186 - String should be UTF-8 [ 85s] ok 187 - quote() handles utf8 [ 85s] ok 188 - Quoted string should be UTF-8 [ 85s] ok 189 - quote() handles utf8 inside array [ 85s] ok 190 - Quoted array of strings should be UTF-8 [ 85s] ok 191 - Inserting utf-8 into an array via quoted do() works [ 85s] ok 192 - Retreiving an array containing utf-8 works [ 85s] ok 193 - Selected string should be UTF-8 [ 85s] ok 194 - Selected string should be UTF-8 [ 85s] ok 195 - Inserting utf-8 into an array via prepare and arrayref works [ 85s] ok 196 - Retreiving an array containing utf-8 works [ 85s] ok 197 - Selected ASCII string should be UTF-8 [ 85s] ok 198 - Selected string should be UTF-8 [ 85s] ok 199 - Non utf-8 inside an array is not return as utf-8 [ 85s] ok 200 - Empty int array is returned properly [ 85s] ok 201 - Empty text array is returned properly [ 85s] ok 202 - An object of class 'Time::Piece' isa 'Time::Piece' [ 85s] ok 203 - Objects send to be bound are unwrapped properly (e.g. Time::Piece) [ 85s] ok
Hmm...this is hard to debug from a distance, especially with no verbose mode! :) Perhaps after running that single test, you could check for any database errors. The file should be dbdpg_test_database/data/pg_log/postgres2020-06.10.log Could also try adding to the bottom of t/09arrays.t: pass("Cleanup complete");
I spun up an openSUSE box on AWS, but was unable to duplicate the error. Is there a test box I could have access to that will reliably fail the test?


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.