From: Peter Rabbitson Date: Thu, 10 Mar 2016 18:02:00 +0000 (+0100) Subject: Really work around RT#108390 (630e2ea8a) X-Git-Tag: v0.082840~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6274881ff40642cff6a3cd141ad2350a222f1c5a;p=dbsrgits%2FDBIx-Class.git Really work around RT#108390 (630e2ea8a) ( cherry-pick of 820a2936 ) A certain chain of events can still deadlock things without an explicit flush --- diff --git a/Changes b/Changes index 36a4bb1..0d6ab14 100644 --- a/Changes +++ b/Changes @@ -34,6 +34,8 @@ Revision history for DBIx::Class was not sufficient to cover up RT#67843) * Misc + - Test suite is now officially certified to work under very high random + parallelism: META x_parallel_test_certified set to true accordingly - Typo fixes from downstream debian packagers (RT#112007) 0.082821 2016-02-11 17:58 (UTC) diff --git a/t/lib/DBICTest/Util.pm b/t/lib/DBICTest/Util.pm index ee73314..c293cf5 100644 --- a/t/lib/DBICTest/Util.pm +++ b/t/lib/DBICTest/Util.pm @@ -84,7 +84,21 @@ sub await_flock ($$) { # "say something" every 10 cycles to work around RT#108390 # jesus christ our tooling is such a crock of shit :( - print "#\n" if not $tries % 10; + unless ( $tries % 10 ) { + + # Turning on autoflush is crucial: if stars align just right buffering + # will ensure we never actually call write() underneath until the grand + # timeout is reached (and that's too long). Reproducible via + # + # DBICTEST_VERSION_WARNS_INDISCRIMINATELY=1 \ + # DBICTEST_RUN_ALL_TESTS=1 \ + # strace -f \ + # prove -lj10 xt/extra/internals/ + # + select( ( select(\*STDOUT), $|=1 )[0] ); + + print "#\n"; + } } return $res;