Fix flaky test_merge_dask_different_crs_matches_eager on macOS#1495
Merged
brendancol merged 1 commit intomainfrom May 5, 2026
Merged
Fix flaky test_merge_dask_different_crs_matches_eager on macOS#1495brendancol merged 1 commit intomainfrom
brendancol merged 1 commit intomainfrom
Conversation
test_merge_dask_different_crs_matches_eager intermittently SIGABRTs on macOS CI runners. The merge() dask graph creates a fresh pyproj.Transformer per chunk, and PROJ's first-time CRS-database load is not safe under concurrent threaded workers — multiple threads racing to init the SQLite DB on macOS triggers an abort. The test exercises dask graph correctness, not dask threading. Pin it to the synchronous scheduler and pre-warm pyproj.CRS objects so the parity assertion runs without the threading dimension. CRS thread-safety in the production reproject path is its own concern and is not regressed here. Refs the same crash on PR #1492 macOS-3.13 and on main run e253900 (macOS-3.12).
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.
What
Pin
test_merge_dask_different_crs_matches_eagerto the synchronousdask scheduler and pre-warm the PROJ CRS database before the parity
assertion.
Why
This test SIGABRTs intermittently on macOS CI runners. Same crash
signature on:
Both pin the abort at
xrspatial/tests/test_reproject.py:2460—the
.compute().valuescall that triggers the dask threaded scheduler.The merge dask graph creates a fresh
pyproj.Transformerper chunk.PROJ's first-time CRS-database load is a race when multiple threads
hit the SQLite-backed database at once on macOS. Linux and Windows
typically serialise enough that the race is invisible.
The test asserts dask-graph correctness, not threading correctness.
Synchronous compute exercises the same graph without the threading
dimension. Production reproject thread-safety is a separate concern
and is not regressed here.
Test plan