Skip to content

fix(python/sedonadb): free-threading-safe Tokio runtime teardown; re-enable cp314t macOS wheels - #1067

Merged
james-willis merged 4 commits into
apache:mainfrom
james-willis:jw/wheels-skip-freethreaded-macos
Jul 22, 2026
Merged

fix(python/sedonadb): free-threading-safe Tokio runtime teardown; re-enable cp314t macOS wheels#1067
james-willis merged 4 commits into
apache:mainfrom
james-willis:jw/wheels-skip-freethreaded-macos

Conversation

@james-willis

@james-willis james-willis commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

The free-threaded (cp*t) macOS wheel test hung because the per-connect Tokio runtime's default Drop blocking-joins its worker threads while attached to the interpreter, which stalls CPython's stop-the-world under free-threading. The runtime now shuts down in the background on teardown instead, so the free-threaded wheels build and run the full test suite again (the macOS CIBW_SKIP is removed).

The free-threaded 3.14 (cp*t) test run deadlocks on macOS/arm64 in the
raster suite and never completes, so the job only ever failed at the
150-minute cap. Skip cp*t on both macOS jobs; Linux still builds and
tests the free-threaded wheels.
@james-willis
james-willis requested a review from paleolimbot July 21, 2026 02:17
@github-actions
github-actions Bot requested a review from prantogg July 21, 2026 02:17

@paleolimbot paleolimbot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do in general want wheels for free-threaded Python and to test them. I am guessing this has to do with a violation of threading constraints somewhere between PyO3, Cython, and GDAL between RasterIO, pyogrio, and possibly system GDAL.

Maybe our function integration testing shouldn't be running on wheel tests / should be moved to a separate Python package?

…ading safety; re-enable cp314t macOS wheel tests
@james-willis james-willis changed the title ci(python-wheels): skip free-threaded CPython wheels on macOS fix(python/sedonadb): free-threading-safe Tokio runtime teardown; re-enable cp314t macOS wheels Jul 21, 2026
@james-willis
james-willis marked this pull request as ready for review July 22, 2026 16:43
@james-willis
james-willis requested a review from paleolimbot July 22, 2026 16:44
@james-willis

Copy link
Copy Markdown
Contributor Author

@paleolimbot I went back and tried to build a real fix here.

I haven't taken a shot at windows; I don't really have a windows machine

@paleolimbot paleolimbot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for diagnosing this! I'll leave a note on the issue about static global runtimes and why that happened, but in the meantime this is a definite improvement. One idea about a slightly safer way to go about this if it's easy to do and maybe we can also reduce the number of runtimes we create to minimize these interactions.

Comment thread c/sedona-extension/src/runtime.rs Outdated

@paleolimbot paleolimbot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Than you!

@james-willis
james-willis merged commit f5842c9 into apache:main Jul 22, 2026
18 checks passed
@james-willis
james-willis deleted the jw/wheels-skip-freethreaded-macos branch July 22, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants