failures in t/031_recovery_conflict.pl on CI
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: pgsql-hackers@postgresql.org, Thomas Munro <thomas.munro@gmail.com>
Date: 2022-04-09T04:55:15Z
Lists: pgsql-hackers
Hi, on CI [1] the new t/031_recovery_conflict.pl is failing occasionally. Which is interesting, because I ran it there dozens if not hundreds of times before commit, with - I think - only cosmetic changes. I've reproduced it in a private branch, with more logging. And the results are sure interesting. https://cirrus-ci.com/task/6448492666159104 https://api.cirrus-ci.com/v1/artifact/task/6448492666159104/log/src/test/recovery/tmp_check/log/031_recovery_conflict_standby.log The primary is waiting for 0/343A000 to be applied, which requires a recovery conflict to be detected and resolved. On the standby there's the following sequence (some omitted): prerequisite for recovery conflict: 2022-04-09 04:05:31.292 UTC [35071][client backend] [031_recovery_conflict.pl][2/2:0] LOG: statement: BEGIN; 2022-04-09 04:05:31.292 UTC [35071][client backend] [031_recovery_conflict.pl][2/2:0] LOG: statement: DECLARE test_recovery_conflict_cursor CURSOR FOR SELECT b FROM test_recovery_conflict_table1; 2022-04-09 04:05:31.293 UTC [35071][client backend] [031_recovery_conflict.pl][2/2:0] LOG: statement: FETCH FORWARD FROM test_recovery_conflict_cursor; detecting the conflict: 2022-04-09 04:05:31.382 UTC [35038][startup] LOG: recovery still waiting after 28.821 ms: recovery conflict on buffer pin 2022-04-09 04:05:31.382 UTC [35038][startup] CONTEXT: WAL redo at 0/3432800 for Heap2/PRUNE: latestRemovedXid 0 nredirected 0 ndead 1; blkref #0: rel 1663/16385/16386, blk 0 and then nothing until the timeout: 2022-04-09 04:09:19.317 UTC [35035][postmaster] LOG: received immediate shutdown request 2022-04-09 04:09:19.317 UTC [35035][postmaster] DEBUG: sending signal 3 to process 35071 2022-04-09 04:09:19.320 UTC [35035][postmaster] DEBUG: reaping dead processes 2022-04-09 04:09:19.320 UTC [35035][postmaster] DEBUG: reaping dead processes 2022-04-09 04:09:19.320 UTC [35035][postmaster] DEBUG: server process (PID 35071) exited with exit code 2 Afaics that has to mean something is broken around sending, receiving or processing of recovery conflict interrupts. All the failures so far were on freebsd, from what I can see. There were other failures in other tests, but I think for reverted or fixed things. Except for not previously triggering while the shmstats patch was in development, it's hard to tell whether it's a regression or just a longstanding bug - we never had tests for recovery conflicts... I don't really see how recovery prefetching could play a role here, clearly we've been trying to replay the record. So we're elsewhere... Greetings, Andres Freund https://cirrus-ci.com/github/postgres/postgres/master
Commits
-
Disable 031_recovery_conflict.pl until after minor releases.
- 390b489eff76 10.21 landed
- 4caa29414d60 11.16 landed
- 1e1542833e8c 12.11 landed
- 6348e4685068 13.7 landed
- 55e5a5e0fa16 14.3 landed
-
Temporarily skip recovery deadlock test in back branches.
- 441fa7a63ad4 10.21 landed
- fb965ab0f641 11.16 landed
- 26f9e21cb63e 12.11 landed
- 4e39957e6eb5 13.7 landed
- f40d362a667f 14.3 landed
-
Backpatch addition of pump_until() more completely.
- 47f47a8d4738 11.16 landed
- fbf659bc4040 12.11 landed
- 6ab90d215afc 13.7 landed
- 7fa95bb0ac8e 14.3 landed
-
Fix timing issue in deadlock recovery conflict test.
- 3197e0f5ae9d 10.21 landed
- 7a1267f9fe74 11.16 landed
- 512d76f6dbda 12.11 landed
- 8a3a8d9f103e 13.7 landed
- 5136967f1eb1 14.3 landed
- 9e6b7b45ca92 15.0 landed
-
Backpatch 031_recovery_conflict.pl.
- b1f35a36e6d5 10.21 landed
- 25d5494e2841 11.16 landed
- a5ede13916f3 12.11 landed
- 0446d3bf3909 13.7 landed
- f74496dd611e 14.3 landed
-
Fix possibility of self-deadlock in ResolveRecoveryConflictWithBufferPin().
- cbc47ad7ef60 10.21 landed
- 9cda785b4ea3 11.16 landed
- edfc03ec91f2 12.11 landed
- 57c5ad168be1 13.7 landed
- 9ab3b2bdbb5d 14.3 landed
- 8f1537d10e83 15.0 landed
-
Backpatch addition of wait_for_log(), pump_until().
- e8a0cf9b20a1 10.21 landed
- 2adb8debe5aa 11.16 landed
- 90abe1e17f9d 13.7 landed
- 5c8b14a71d31 12.11 landed
- 5ab8e8014801 14.3 landed
-
Add tests for recovery deadlock conflicts.
- 21e184403bf9 15.0 landed
-
Phase 3 of pgindent updates.
- 382ceffdf7f6 10.0 cited