james-willis opened a new pull request, #1128: URL: https://github.com/apache/sedona-db/pull/1128
`main`'s `python-wheels` run has been red on macOS because the free-threaded CPython 3.14 (`cp314t`) wheel crashes during its test run — it panics with `OS can't spawn worker thread: Resource temporarily unavailable` (EAGAIN) partway through the suite. Only the free-threaded build is affected; every GIL build passes the same tests. The free-threaded macOS wheel has already been disabled and re-enabled once for stability reasons, so rather than skip the target again this fixes the underlying cause. Each `sedonadb.connect()` builds its own multi-threaded Tokio runtime (num_cpus workers plus a `spawn_blocking` pool). On a GIL build the runtime's Python-touching workers are serialized, so runtimes drain before many accumulate; on a free-threaded build they run in parallel, so across many short-lived sessions the worker and blocking threads pile up and exhaust the OS per-process thread limit — and the next runtime's worker spawn fails. Instrumenting the existing `RuntimeHandle` teardown ruled out a hung or leaking janitor: every runtime drained cleanly, and the problem was purely the number of per-session runtimes alive at once. This shares a single process-global Tokio runtime across all contexts, so the worker and blocking-thread pools are bounded per process rather than per session: opening N sessions no longer costs N runtimes' worth of threads, a query still gets the full num_cpus worker pool, and the runtime lives for the process so it is never torn down on an interpreter thread. Verified on a local free-threaded 3.14 build — the full suite went from crashing (EAGAIN, dozens of runtimes draining at once) to zero spawn failures with the single shared runtime. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
