Repository navigation
Conversation
…rge)
A single, isolated `from grass.pygrass import utils` and a sequential
import of every grass.lib.* submodule both succeed in one process (see
the sibling diagnostic PRs), yet the same loads crash with
Windows fatal exception: code 0xc0000139
under pytest-xdist. This rules out a raw DLL-count/TLS-slot-exhaustion
theory (loading all 22 grass.lib submodules sequentially in one
process didn't crash), leaving pytest-xdist's own worker mechanism as
the remaining suspect: execnet runs a background thread for worker
I/O alongside the thread doing test collection/ctypes loading, and
Windows' DLL loader is known to be fragile under concurrent/
multi-threaded LoadLibrary calls (loader-lock contention), which can
surface as a spurious "entry point not found" even when nothing is
actually missing.
This runs two of the known-failing test files directly through plain
pytest, with no -n/xdist argument at all, to see if skipping execnet's
threaded worker transport avoids the crash.
Temporary, for CI investigation only.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Purpose
Sixth diagnostic in this investigation. Ruled out so far:
(gdal313-runtime, python3-gdal, curl, openssl, libjpeg-turbo, expat)
and grass_gis.8.6.dll's own dependency chain (proj_9.dll, curl,
sqlite3, tiff.dll/jpeg62.dll) -- all clean, no removed exports or
broken ordinals.
from grass.pygrass import utilsimport -- nocrash.
grass.lib.*ctypes submodules in oneprocess -- no crash (rules out a raw DLL-count/TLS-slot-exhaustion
theory).
Yet the exact same
grass_gis.8.6.dllload crashes withevery time under pytest-xdist. The one thing left that's different:
pytest-xdist's
execnettransport runs a background thread forworker I/O alongside the thread doing test collection (and therefore
ctypes loading). Windows' DLL loader is known to be fragile under
concurrent/multi-threaded
LoadLibrarycalls (loader-lockcontention), which can surface as a spurious "entry point not found"
even when nothing is actually missing.
What this PR does
Runs two of the known-failing test files (
test_i_gensig.py,lib/arraystats/tests) directly through plain pytest, with no-n/xdist argument at all, right before the existing full parallelrun (which is left untouched as a same-run comparison baseline).
If this single-process run passes, it strongly implicates
pytest-xdist/execnet's threaded worker transport specifically,not pytest or GRASS's ctypes bindings in general.
This PR is for CI investigation only and is not meant to be merged.
🤖 Generated with Claude Code