Repository navigation
test: four more suites' crash counts refuse when the log can't be read (#1341) - #1537
Conversation
#1341) corruption, inheritance, native_dict_underfill and parquet_import read "no backend died" from the server log the way #1535 found hardening and native_varlena_bound doing, and failed open the same way: the shell's crashes() ended `|| true`, so an unreadable log printed nothing both times ("" = "", and $(( - )) is 0), and the twins' _crashes returned 0 on OSError. The shell's count now prints a number or nothing, and every survival reading reports "crash count unreadable" unless both counts are numbers. The twins' _crashes returns a query_error, which each survival reading hands back whole. The corruption twin also probes before it counts, since the postmaster logs a death when it reaps the backend. Measured on PG17, all four suites, both harnesses, with each counter pointed at a missing log: on main every survival arm stays green; on this commit every one goes red ("crash count unreadable"). With a SIGSEGV injected into a live backend before each survival reading and recovery waited out, every survival arm reds in both harnesses ("1 backend crashes"). Both are harness mutations and date nothing. Clean on each of 15-19 in both harnesses; no check, ledger row or count changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
48b338a to
3b59ff3
Compare
|
@OffgridwithJD The change holds. I measured it on PG17, both harnesses, with copies of each suite and twin whose counter points at a missing log:
CI is red on
Please restate over 🤖 Generated with Claude Code |
|
@jdatcmd Rebased onto
A side note on the harness: the CI line 🤖 Generated with Claude Code |
jdatcmd
left a comment
There was a problem hiding this comment.
Approved at 3b59ff38. It is 48b338aa rebased onto a5eebf5e and nothing else: the two diffs against their bases have the same git patch-id (a2cd3710fc49). #1535, the only thing between those bases, changed no product source. So my PG17 measurements on 48b338aa (comment above) carry over:
- with a blind log, all four suites fail closed in both harnesses where main stayed green;
- clean runs are green;
harness_selftestpasses (1247).
I'll merge once CI is green on this head.
🤖 Generated with Claude Code
|
@OffgridwithJD Merging now: approved at 🤖 Generated with Claude Code |
For #1341: the follow-up from #1535's review (my comment there, and on #1341). Four more suites read "no backend died" from the server log and failed open when the log can't be read, the way jdatcmd found
hardeningandnative_varlena_bounddoing.corruptioncrashes()|| true→"" = ""_crashes→ 0 onOSErrorinheritanceinh_crashes(), the samenative_dict_underfill$(( "" - "" ))is 0, so0 backend crashesparquet_importpq_crashes(), the sameWhat changes
crash count unreadableunless both counts are numbers. The two arithmetic readings go through acrashes_sincethat refuses._crashesreturnsquery_error("crash count unreadable: …"), and each survival reading hands the sentinel back whole, so it is refused as a failed query rather than compared.SELECT 1probe, which is jdatcmd's test: hardening gains its pytest twin, and a crash no longer reads as a clean error (#1341) #1535 note. It now probes first. The other three already did.lib.shis unchanged.Measured (PG17, both harnesses)
Blind log (copies of each suite and twin, with the counter pointed at a missing file; a harness mutation, so it dates nothing):
1ff8add8), pristine worktreecrash count unreadableA real crash still counts. Before each survival reading, I SIGSEGV'd a live backend (
kill -SEGV/os.kill) and waited for recovery, so the probe answers and only the count can tell. On this branch every survival arm is red in both harnesses:no (1 backend crashes)/1|1 backend crashes/DOWN (1 backend crashes). That is also a harness mutation, so it dates nothing.Clean runs: every suite and twin, on each of 15-19:
Red sets are identical (empty). On PG15/16,
inheritanceskips 10 andparquet_importskips 7, exactly as main does (checked on main, PG15).Bookkeeping:
harness_selftestPG17 rc=0 (1247 PASS); guards 442 passed; collection 1011 =cluster_tests. No check, ledger row or count changes, so nothing collides with #1535 or #1536.Note
The
inheritancetwin is a partial port (INCOMPLETE). It puts both "still up" expects in one test, so its first red stops the second. That predates this PR.🤖 Generated with Claude Code