Skip to content

CI: [diagnostic, do not merge] Test standalone single-process pygrass import - #705

Closed
echoix wants to merge 1 commit into
mainfrom
ci-diag/standalone-import-test
Closed

echoix wants to merge 1 commit into
mainfrom
ci-diag/standalone-import-test

Conversation

@echoix

@echoix echoix commented Sep 26, 2026

Copy link
Copy Markdown
Owner

Purpose

Fourth diagnostic in this investigation. Every dumpbin export/import
diff of grass_gis.8.6.dll's dependency chain (proj_9.dll's 5 geodesic
functions match hint-for-hint; PROJ's own imports from curl/sqlite3;
tiff.dll's imports from jpeg62.dll by ordinal) came back completely
clean -- see the sibling diagnostic PRs. Downgrading the MSYS2
mingw-w64 toolchain snapshot didn't fix the crash either. So no single
missing/renamed symbol explains:

Windows fatal exception: code 0xc0000139

(STATUS_ENTRYPOINT_NOT_FOUND) seen loading grass_gis.8.6.dll under
pytest-xdist.

What this PR does

Imports grass.pygrass.utils (which triggers the same grass_gis.8.6.dll
load) in a single, fresh Python process, right after the existing
grass86.bat smoke tests and before pytest/xdist start.

  • If this also crashes, the failure reproduces in complete
    isolation and is tied to grass_gis.8.6.dll's load itself, not
    anything specific to pytest-xdist.
  • If this succeeds, the crash is likely tied to how many DLLs
    accumulate as loaded in a worker process under pytest-xdist's
    parallel test collection (e.g. a Windows/MinGW TLS-slot exhaustion,
    since libgomp and other mingw-w64 runtime DLLs use TLS), not a
    single missing symbol.

This PR is for CI investigation only and is not meant to be merged.

🤖 Generated with Claude Code

All dumpbin export/import diffs of grass_gis.8.6.dll's dependency
chain (proj_9.dll, curl, sqlite3, tiff.dll/jpeg62.dll) came back
clean: no removed exports, no broken ordinals, all import hints match
the current builds. Downgrading the MSYS2 mingw-w64 toolchain snapshot
didn't fix the crash either. So no single missing/renamed symbol
explains:

    Windows fatal exception: code 0xc0000139

seen loading grass_gis.8.6.dll under pytest-xdist.

This adds a step that imports grass.pygrass.utils (which triggers the
same grass_gis.8.6.dll load) in a single, fresh Python process right
after the grass86.bat smoke tests, before pytest/xdist start. If this
also crashes, the failure is tied to grass_gis.8.6.dll's load in
isolation. If it succeeds, the crash is specific to how pytest-xdist
accumulates loaded DLLs across a worker process (e.g. a Windows/MinGW
TLS-slot exhaustion, since libgomp and other mingw-w64 runtime DLLs
use TLS), not a single missing symbol.

Temporary, for CI investigation only.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@echoix echoix closed this Oct 1, 2026
@echoix
echoix deleted the ci-diag/standalone-import-test branch October 1, 2026 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant