ci: fix flaky Postgres test-process segfault at exit#357
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 25 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Problem
The
Rust Tests (PostgreSQL)job intermittently fails: all 98 lib tests pass, then the test binary crashes on exit withsignal: 11, SIGSEGV(cargo → exit 101). The SQLite and Redis jobs — sameLD_LIBRARY_PATH— never crash; only Postgres does.Cause
The step ran
cargo test --workspace --features postgres,workflowswithLD_LIBRARY_PATH="$pythonLocation/lib"(sotaskito-python's test binary finds libpython). That directory also ships Python'slibssl/libcrypto, which get loaded alongside the OpenSSL that libpq links. Two OpenSSL copies in one process → theiratexitcleanup handlers race at process teardown → SIGSEGV after the tests have all passed. It's load/teardown-order dependent, hence flaky, and only the Postgres-linked binary pulls in libpq.Fix
--exclude taskito-python(the only crate that needs libpython at runtime) and dropLD_LIBRARY_PATH. With Python out of the run, Python's OpenSSL is never loaded, so libpq's is the only copy and there's nothing to race at exit.No coverage lost: the Postgres storage contract lives in
taskito-coreandtaskito-workflows(both still run here);taskito-python's Rust tests already run in the SQLite job (cargo test --workspace).