Repository navigation
Conversation
…t for merge) A plain `python -c "from grass.pygrass import utils"` succeeds even after pip has installed pytest/xdist/timeout/randomly (see ci-diag/standalone-import-after-pip), but pytest itself collecting the same import crashes with "Windows fatal exception: code 0xc0000139" regardless of xdist (ci-diag/no-xdist-single-process) or the exe launcher stub (ci-diag/python-m-pytest-vs-exe). pytest-timeout's watchdog thread (pytest_runtest_protocol) does not start until after a test item is successfully collected, per its own source, so it isn't running yet when this crash happens during collection -- ruling that out too. The other big process-wide difference between a plain python invocation and a pytest run: pytest's default fd-level output capturing (dup2-based stdout/stderr redirection), active for the entire session including collection, before any test file is even imported. This tests whether --capture=no (disabling it) 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
Ninth diagnostic. Confirmed so far:
step (ci-diag/standalone-import-test,
ci-diag/standalone-import-after-pip).
crash identically with
`Windows fatal exception: code 0xc0000139`
(ci-diag/no-xdist-single-process, ci-diag/python-m-pytest-vs-exe).
wraps already-collected test items -- checked directly in its
source, it does not start until after collection succeeds, and our
crash happens during collection. Ruled out.
PROJ, MSVCP140/msvcrt2019, the MSVC mutex-hack state) confirmed
clean or unchanged via direct binary diffing across this whole
investigation.
So the crash is specific to something pytest itself sets up before/
during collection that a plain python invocation never touches. The
one remaining big candidate: pytest's default fd-level output
capturing (`dup2`-based stdout/stderr redirection), active for the
entire session including collection, before any test file is even
imported -- a genuinely invasive, low-level OS handle manipulation
that Windows CRT/DLL initialization is known to sometimes interact
badly with.
What this PR does
Runs the same two known-failing test files with `--capture=no`
(disabling pytest's fd-level capture entirely), to see if that alone
avoids the crash.
This PR is for CI investigation only and is not meant to be merged.
🤖 Generated with Claude Code