From 34b4a944c4730db83fd80bc4d1cf9b06a3b3b97d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Sat, 26 Sep 2026 09:14:48 -0400 Subject: [PATCH] CI: Test standalone single-process pygrass import (not for merge) 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 --- .github/workflows/osgeo4w.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/osgeo4w.yml b/.github/workflows/osgeo4w.yml index 96b5a6bb9aa..c1b09434ca1 100644 --- a/.github/workflows/osgeo4w.yml +++ b/.github/workflows/osgeo4w.yml @@ -124,6 +124,26 @@ jobs: shell: msys2 {0} run: .github/workflows/test_simple.sh + - name: "[CI diagnostic, not for merge] Standalone single-process import test" + # Checks whether the "Windows fatal exception: code 0xc0000139" + # crash (STATUS_ENTRYPOINT_NOT_FOUND) seen loading grass_gis.8.6.dll + # under pytest-xdist also reproduces in a single, fresh Python + # process with almost nothing else loaded yet. Every dumpbin + # export/import diff of grass_gis.8.6.dll's own dependency chain + # (proj_9.dll, curl, sqlite3, tiff/jpeg) came back clean, so this + # tests whether the crash is instead tied to the number of + # dynamically loaded DLLs accumulated across a worker process + # (e.g. a Windows/MinGW TLS-slot exhaustion, since libgomp and + # other mingw-w64 runtime DLLs use TLS) rather than any single + # missing symbol. + run: | + call %OSGEO4W_ROOT%\opt\grass\etc\env.bat + set PYTHONPATH=%GISBASE%\etc\python;%PYTHONPATH% + path %GISBASE%\lib;%GISBASE%\bin;%PATH% + python -c "from grass.pygrass import utils; print('OK: pygrass.utils imported successfully in a fresh standalone process')" + # Obfuscated usage of GitHub Actions features, Windows CMD shell limits analysis + shell: cmd /D /E:ON /V:OFF /S /C "CALL C:/OSGeo4W/OSGeo4W.bat "{0}"" # zizmor: ignore[misfeature] + - name: Install additional python packages run: | python -m pip install ^