Skip to content

CI: an example that hits its timeout is aborted with its stacks, run once more, and fails on a second timeout - #579

Merged
tae898 merged 2 commits into
mainfrom
fix/577-example-timeout-retry
Dec 6, 2026
Merged

tae898 merged 2 commits into
mainfrom
fix/577-example-timeout-retry

Conversation

@tae898

@tae898 tae898 commented Dec 6, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #577

Example 13 (13_stackoverflow_hybrid_queries.py) used the whole 30 minutes of its timeout on linux-x86_64, Python 3.12, in run 47354801394, with no output after the model load. The same commit passed in the next scheduled run. This pull request makes the runner treat a timeout as a hang so that the next one is both survivable and diagnosable.

What changes in scripts/run_examples.sh:

  • A timeout sends SIGABRT (not on Windows) with PYTHONFAULTHANDLER=1, so the log holds the stack of every thread; the runner prints it, then runs the example once more. A second timeout fails the leg. A pass on the retry is named in the results (PASSED ON ITS RETRY after a timeout) and in a ::warning. Only a timeout is retried, never a failure.
  • Example 13 gets 20 minutes instead of 30.
  • EXAMPLES_TIMEOUT (seconds) replaces the per-example timeouts; the new test tests/test_run_examples_timeout.py uses it on fake examples (hang once passes and is named, a hang that stays fails after exactly two runs with the stacks in the log, a failing example runs once).
  • One SC2086 quoting fix on the line of example 10's reference run, which shellcheck reports now.

Duration of example 13, from the logs of the 11 push and schedule runs of test-native.yml since 2026-12-01 (86 native legs, one of them the hang):

leg runs min (s) max (s)
linux-x86_64 21 passed 288 573
linux-aarch64 20 450 484
windows-x64 22 409 794
macos-arm64 22 496 888

The cause inside the process is not known: there is no stack of the hang. It is a hang of the process itself and not a slow runner, since the examples after it ran at normal speed in the same job a minute later. It is not the vector read-your-writes race of #409: that one is a missed vector under several writers, this example is single-threaded and nothing was raised.

Verification: bash -n, uvx pre-commit run --files on the four changed files (shfmt, shellcheck, black, isort, ruff), bandit on the new test, and the three new tests (3 passed, 12 s). The label ci:full runs the example legs with the new runner.

@tae898 tae898 added bug Something isn't working github_actions Pull requests that update GitHub Actions code ci:full Run the full platform matrix on this pull request (the legs of a push to main) labels Dec 6, 2026
…once more, and fails on a second timeout (closes #577)

Example 13 used all 30 minutes of its timeout on linux-x86_64 Python 3.12 in run 47354801394 (2026-12-04), with no output after the model load. Across the 86 native runs of it since 2026-12-01 it took 288 to 888 s, so its timeout is now 20 minutes. A timeout is now a SIGABRT with PYTHONFAULTHANDLER=1 (the stack of every thread lands in the log, which is printed), one retry, and a failure on a second timeout. Only a timeout is retried.
…a shim, so the runner test does not fail with exit 127
@tae898
tae898 merged commit 6f0fb3d into main Dec 6, 2026
72 checks passed
@tae898
tae898 deleted the fix/577-example-timeout-retry branch December 6, 2026 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci:full Run the full platform matrix on this pull request (the legs of a push to main) github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Full CI is red on main: Test native (arcadedb)

1 participant