Repository navigation
Conversation
…or merge) A single, isolated `from grass.pygrass import utils` (which loads grass_gis.8.6.dll) does not crash (see the sibling ci-diag/standalone-import-test PR), but the same load crashes with "Windows fatal exception: code 0xc0000139" under pytest-xdist, and every dumpbin export/import diff of grass_gis.8.6.dll's dependency chain came back clean (see the other sibling diagnostic PRs). This points to a resource-count issue (e.g. a Windows/MinGW TLS-slot exhaustion, since libgomp and other mingw-w64 runtime DLLs use TLS) rather than a single missing symbol. This imports every grass.lib.* ctypes submodule one at a time in a single process, flushing progress after each import, to find exactly how many (and which) sequential loads it takes to reproduce the crash, or whether it doesn't reproduce at all in a single process regardless of count. 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
Fifth diagnostic in this investigation. A single, isolated
from grass.pygrass import utils(which loadsgrass_gis.8.6.dll)does not crash in a fresh process (confirmed in
ci-diag/standalone-import-test), but the same load crashes with
under pytest-xdist. Every dumpbin export/import diff of
grass_gis.8.6.dll's dependency chain (proj_9.dll, curl, sqlite3,tiff.dll/jpeg62.dll) came back clean -- see the other sibling
diagnostic PRs -- and downgrading the MSYS2 mingw-w64 toolchain
snapshot didn't fix it either. This points away from a single missing
symbol and toward a resource-count issue tied to how many DLLs
accumulate as loaded within one process (e.g. a Windows/MinGW
TLS-slot exhaustion, since libgomp and other mingw-w64 runtime DLLs
use TLS).
What this PR does
Adds
.github/workflows/ci_diag_sequential_lib_load.py, which importsevery
grass.lib.*ctypes submodule one at a time in a singleprocess, flushing progress after each import (with
faulthandlerenabled so a crash mid-way still leaves a stack trace in the log).
Run right after the existing grass86.bat smoke tests, before
pytest/xdist starts.
This should show exactly how many (and which) sequential ctypes
library loads it takes to reproduce the crash within a single
process -- or confirm it doesn't reproduce at all regardless of how
many are loaded, which would point back toward something specific to
pytest-xdist itself (e.g. execnet's worker/thread setup) rather than
a pure DLL-count effect.
This PR is for CI investigation only and is not meant to be merged.
🤖 Generated with Claude Code