Skip to content

Commit e092f00

Browse files
committed
On sparc64+ext4, suppress test failures from known WAL read failure.
Buildfarm members kittiwake, tadarida and snapper began to fail frequently when commits 3cd9c3b and f47ed79 added tests of concurrency, but the problem was reachable before those commits. Back-patch to v10 (all supported versions). Discussion: https://postgr.es/m/20220116210241.GC756210@rfd.leadboat.com
1 parent bbb1caf commit e092f00

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

src/bin/pgbench/t/023_cic_2pc.pl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
use Test::More tests => 6;
1313

14+
local $TODO = 'filesystem bug' if TestLib::has_wal_read_bug;
15+
1416
my ($node, $result);
1517

1618
#

src/test/perl/TestLib.pm

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,29 @@ sub real_dir
223223
return perl2host(@_);
224224
}
225225

226+
=pod
227+
228+
=item has_wal_read_bug()
229+
230+
Returns true if $tmp_check is subject to a sparc64+ext4 bug that causes WAL
231+
readers to see zeros if another process simultaneously wrote the same offsets.
232+
Consult this in tests that fail frequently on affected configurations. The
233+
bug has made streaming standbys fail to advance, reporting corrupt WAL. It
234+
has made COMMIT PREPARED fail with "could not read two-phase state from WAL".
235+
Non-WAL PostgreSQL reads haven't been affected, likely because those readers
236+
and writers have buffering systems in common. See
237+
https://postgr.es/m/20220116210241.GC756210@rfd.leadboat.com for details.
238+
239+
=cut
240+
241+
sub has_wal_read_bug
242+
{
243+
return
244+
$Config{osname} eq 'linux'
245+
&& $Config{archname} =~ /^sparc/
246+
&& !run_log([ qw(df -x ext4), $tmp_check ], '>', '/dev/null', '2>&1');
247+
}
248+
226249
sub system_log
227250
{
228251
print("# Running: " . join(" ", @_) . "\n");

0 commit comments

Comments
 (0)