Draft
Conversation
Temporary experiment branch to validate that removing max_cached_workflows=0
from test_temporal_prefixed_query_not_traced fixes the Windows 3.10 deadlock
flake.
Changes:
- tests/contrib/langsmith/test_integration.py: parametrize the test with
range(1000) so each matrix entry runs it 1000x via pytest-xdist; remove
max_cached_workflows=0 from the worker config.
- .github/workflows/ci.yml (build-lint-test job only):
- Run only the parametrized test with -p no:rerunfailures so a single
failure is not hidden by retries.
- Disable poe lint, poe bridge-lint, the time-skipping test step, and the
openai test step for this branch.
- Bump job timeout to 60 min.
- Step timeout 30 min for the stress test.
Success = 0 failures across 10,000 invocations (10 matrix entries x 1000).
Any single failure means the cache=0 removal is not sufficient and a deeper
fix is needed.
This branch will be discarded once CI confirms the result. The actual fix
(test change only, no CI change) will go on a separate branch/PR.
Restore `max_cached_workflows=0` on the parametrized 1000x stress test to verify the hypothesis from the other direction: with cache=0 in place, Windows 3.10 should reproduce the [TMPRL1101] deadlock flake within 1000 iterations. Previous run (cache=0 removed) passed 1000/1000 on every matrix entry. Expectation: this run will fail on Windows 3.10. Co-Authored-By: Claude Opus 4.7 (1M context) <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.
DO NOT MERGE — temporary experiment branch
Validates whether removing
max_cached_workflows=0fromtest_temporal_prefixed_query_not_tracedactually fixes the intermittent Windows 3.10 deadlock flake. Will be discarded after CI confirms the result.What this PR does
max_cached_workflows=0from the worker config in the affected test.range(1000)so eachbuild-lint-testmatrix entry runs it 1000 times viapytest-xdist.build-lint-testjob only, runs only this test, withpytest-rerunfailuresdisabled (so a single failure cannot be hidden by retries). All other test steps (time-skipping, openai),poe lint, andpoe bridge-lintare commented out. Job timeout 60 min, step timeout 30 min.test-latest-deps,features-tests,check-protos,cloud-test) are untouched but irrelevant to this experiment.Hypothesis under test
The deadlock fires inside
_stack_trace's call totraceback.FrameSummaryduring the built-in__stack_tracequery handler (see CI traces from prior repros on PRs #1454 and #1507). Withmax_cached_workflows=0, every query forces a full replay activation; combined with the per-framelinecachereads in_stack_traceand slow Windows runner I/O, the work occasionally exceeds the 2-second[TMPRL1101]deadlock window.Removing
max_cached_workflows=0keeps the workflow in memory between queries, so query activations contain only the query job — no replay — and the 2s budget is no longer tight.Pass criterion
Zero failures across all 10 matrix entries: {3.10, 3.14} × {ubuntu-latest, ubuntu-arm, macos-arm, macos-intel, windows-latest} = 10,000 total invocations.
Any single failure on any target = the cache=0 removal is not sufficient and a deeper fix (e.g., changes in
_stack_traceitself, or longer deadlock budget for built-in queries) is needed.Next steps