Repository navigation
Fix the AWS round's minipg bugs: linked root cache, Windows memory, status after a kill - #28
Merged
progrium merged 1 commit intoNov 28, 2026
Conversation
…nv test, status after a kill - A root cache directory that is a symlink or junction no longer fails with NotDir: std's createDirPath checks an existing path without following a final link, so paths.makeDirPath accepts one that opens as a directory. Unit test, and a Linux e2e test (TestLinkedRootCache). - Windows: new clusters get max_connections 20 (initdb -c, Postgres 16+), a 2 GB machine instead of 5 GB, since WHP commits it all up front. A server start that finds no guest memory free waits up to 20 s for a just-killed server's to be released. - status retries when the server dies between being found and asked (Protocol or NotRunning from its socket), and reports it stopped. - TestEnvAndRun expects PowerShell syntax on Windows. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LLcnT1b3qE5wAs51zmrZA5
This was referenced Nov 28, 2026
progrium
added a commit
that referenced
this pull request
Nov 29, 2026
…a kill, env test (#29) * Fix the AWS round's minipg bugs: linked root cache, Windows memory, env test, status after a kill - A root cache directory that is a symlink or junction no longer fails with NotDir: std's createDirPath checks an existing path without following a final link, so paths.makeDirPath accepts one that opens as a directory. Unit test, and a Linux e2e test (TestLinkedRootCache). - Windows: new clusters get max_connections 20 (initdb -c, Postgres 16+), a 2 GB machine instead of 5 GB, since WHP commits it all up front. A server start that finds no guest memory free waits up to 20 s for a just-killed server's to be released. - status retries when the server dies between being found and asked (Protocol or NotRunning from its socket), and reports it stopped. - TestEnvAndRun expects PowerShell syntax on Windows. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LLcnT1b3qE5wAs51zmrZA5 * stress: give a killed server's processes time to exit after its lock goes On Windows the lock is released when the dead process's handles close, which comes before the process itself is gone: it lingers while its address space, the WHP machine's committed guest memory, is torn down. waitStopped checked for leftover processes the moment the lock was free, and so failed 40 times in the AWS round ("processes remain", progrium/hyper9#376). It now waits up to 15s for them, and logs how long they took. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LLcnT1b3qE5wAs51zmrZA5 --------- Co-authored-by: Claude <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Jeff · project thread
This is stacked on #27 and fixes the minipg-side failures from the cross-platform round on the AWS hosts.
Changes
shareRoots()creates, init failed withNotDir. Zig'screateDirPathchecks an existing path withSYMLINK_NOFOLLOW, so it treats a link to a directory as "not a directory". The newpaths.makeDirPathaccepts a path that opens as a directory, and roots.zig, registry.zig andmakePrivateDirnow use it. I reproduced the bug on Linux with the old binary (minipg: NotDir) and confirmed the fix. Covered by a unit test and a new Linux e2e test,TestLinkedRootCache.max_connections = 20throughinitdb -c(Postgres 16 and later, unlessPOSTGRES_INITDB_ARGSalready sets it). That fits the 2 GB minimum machine.OutOfGuestMemoryon Windows, it waits up to 20 s for a just-killed server's memory to be freed before giving up, and logs that it is waiting..pgdbmade before this change keeps its 100 connections. MANUAL.md documents the new default and how to raise it.statusright after a SIGKILL (the TestCrashRecovery flake). A server can die betweenfind()and the control request. Its socket then returnsProtocolorNotRunning, and its pid can briefly outlive it.statusnow looks for the server again for up to 5 s and reportsstoppedonce the server is gone. A refusal or a protocol mismatch from a live server is still an error.$env:NAME = '...') on Windows.waitStoppedchecked for leftover processes as soon as the lock was free. On Windows the lock is released when the killed process's handles close, which happens before the process exits while it is still tearing down its committed guest memory. The test now gives the processes up to 15 s to exit, logs how long they took, and still fails if any remain after that.Testing
Linux x86_64, no KVM, so the sud engine:
zig build testpasses.TestLinkedRootCache.TestStressCrashwith 1 round: all 6 kill modes pass.go vetpasses with thestresstag for linux, windows and darwin.🤖 Generated with Claude Code
https://claude.ai/code/session_01LLcnT1b3qE5wAs51zmrZA5