Repository navigation
CI: stop the macOS PostgreSQL E2E from hanging until the job is cancelled - #69
Merged
Merged
Conversation
…lled Both macOS E2E jobs on c46b4a5 stalled inside the PostgreSQL suite (right after a test's setup began its TRUNCATEs) and were cancelled after 10 minutes. The same suite passes in 13 s on the same runner image, PostgreSQL and gem versions, so this is a nondeterministic stall, not a regression of the gem bump. * turn off fsync / synchronous_commit / full_page_writes on the CI database: the tests need no durability and TRUNCATE is fsync-heavy (the probable cause) * tests/hang_watchdog.rb: a test running longer than E2E_TEST_TIMEOUT (120 s) prints its thread backtraces and the PostgreSQL sessions / ungranted locks, then exits 1, so a hang fails with a diagnosis * a timeout-minutes per E2E step, so a stall fails its own step instead of the job being cancelled * docs/Testing.md describes the watchdog Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FskpZCiq2EczacwHZtE6Uo
…produces Runs the suite 4 x 20 times on macOS with the old settings and 4 x 20 with the tuned ones. Deleted again before the PR is merged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FskpZCiq2EczacwHZtE6Uo
…eSQL tuning Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FskpZCiq2EczacwHZtE6Uo
They ran the macOS PostgreSQL suite 160 times and the real macOS E2E job 12 times with and without the PostgreSQL tuning; nothing reproduced the hang. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FskpZCiq2EczacwHZtE6Uo
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.
Summary
Build / Cross-platform / End-to-End (macOS, Ruby 3.1)and(macOS, Ruby 4.0)were cancelled after 10 minutes onmain(run 45807447973, commit c46b4a5). Only the macOS PostgreSQL step stalls; SQLite, MySQL, Windows and the Linux suites are green.What I found
Gemfile.lock, which the Ruby 3.1 job does not use (it resolvesGemfile.e2efresh), and the Linux PostgreSQL E2E passes on the same commit.macos-26-arm64/20261117.0516), PostgreSQL 16.16,pg 1.7.0,connection_pool 2.5.5,minitest 5.27.0. The PostgreSQL step took 13 s there.truncate cascadesnotices:test_execlastid_returns_the_returning_columnwith seed 30761,test_a_statement_left_prepared_by_a_failed_prepare_is_usedwith seed 30783), each right after a test'ssetupstarted itsTRUNCATEs. So it is a nondeterministic stall, not one broken test. An earlierBuildrun on fc4f6ac also ended asfailurewith only cancelled jobs.The root cause is not proven (I could not reproduce it on macOS). This PR removes the likely cause and makes any recurrence diagnosable:
fsync,synchronous_commitandfull_page_writeson the CI database. The tests need no durability, andTRUNCATEis fsync-heavy (the probable cause: a stalled flush on a macOS runner).tests/hang_watchdog.rb, required by the PostgreSQL, MySQL and SQLite suites. A test running longer thanE2E_TEST_TIMEOUTseconds (default 120; the slowest real test takes a few seconds) prints the test, every thread's backtrace and, for PostgreSQL, the server's sessions and ungranted locks, then exits 1.timeout-minutes, so a stall fails its own step with output instead of the job being cancelled.docs/Testing.md.No generated code or plugin code changes.
Checklist
examples/is regenerated (rake sqlc_generate_process) and committed: not applicable, generated output unchangedruby -wc. The PostgreSQL, MySQL and SQLite E2E suites were not run here (no databases in this container), so this PR's own CI is the real test.If the macOS jobs still stall after this, the watchdog output will name the test and show what PostgreSQL is waiting on.
Generated by Claude Code