Skip to content

CI: identify hanging tests in macOS unittest job#19844

Open
SS-JIA wants to merge 1 commit into
mainfrom
pr19844
Open

CI: identify hanging tests in macOS unittest job#19844
SS-JIA wants to merge 1 commit into
mainfrom
pr19844

Conversation

@SS-JIA
Copy link
Copy Markdown
Contributor

@SS-JIA SS-JIA commented May 28, 2026

Summary:
The macOS unittest job has been hitting its timeout for several runs in a
row with the progress bar frozen partway through pytest. Add
pytest-timeout so a stuck test fails with a nodeid and per-thread stack
trace, and set faulthandler_timeout=180 so every xdist worker dumps its
threads every 3 minutes while tests are still running -- this surfaces the
hung test as it develops, not just at termination.

Diagnostic runs identified the hang fingerprint: tests stuck inside
torch._inductor.package._package.__call__ (line 736), the AOTI-packaged
.so invocation. The same stack was observed for tests in
examples/models/llama3_2_vision/{preprocess,vision_encoder} and almost
certainly affects the other AOTI call sites we ship. Local M1 reruns of
the affected tests with the CI-pinned torch wheel all pass quickly, so
the hang is CI-environment-specific (suspect: AOTI dlopen under heavy
xdist + coverage contention on the macos-m1-stable runner).

Skip every AOTI-invoking test on macOS CI only, via
unittest-macos-cmake.sh -- linux, windows, and local dev continue to
run them. The skip covers the three vision tests (whole files) plus the
specific *_aoti methods in extension/llm/modules/test/test_*.py.
Job timeout drops back to 30 minutes for fast iteration; pytest
--timeout=1500 gives any single test 25 minutes before it is treated
as hung.

Co-Authored-By: Claude noreply@anthropic.com


Stack created with Sapling. Best reviewed with ReviewStack.

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented May 28, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19844

Note: Links to docs will display an error until the docs builds have been completed.

⏳ No Failures, 274 Pending

As of commit e80701d with merge base 88faab2 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 28, 2026
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented May 28, 2026

CLA Not Signed

@github-actions
Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@SS-JIA SS-JIA changed the title CI: raise macOS unittest timeout to 4 hours CI: identify hanging tests in macOS unittest job May 28, 2026
@SS-JIA SS-JIA force-pushed the pr19844 branch 2 times, most recently from 5937bc4 to eb38dd3 Compare May 29, 2026 00:09
@SS-JIA SS-JIA force-pushed the pr19844 branch 5 times, most recently from 86e276f to 5d73d63 Compare May 29, 2026 03:59
Summary:
The macOS unittest job has been hitting its timeout for several runs in a
row with the progress bar frozen partway through pytest. Add
`pytest-timeout` so a stuck test fails with a nodeid and per-thread stack
trace, and set `faulthandler_timeout=180` so every xdist worker dumps its
threads every 3 minutes while tests are still running -- this surfaces the
hung test as it develops, not just at termination.

Diagnostic runs identified the hang fingerprint: tests stuck inside
`torch._inductor.package._package.__call__` (line 736), the AOTI-packaged
`.so` invocation. The same stack was observed for tests in
`examples/models/llama3_2_vision/{preprocess,vision_encoder}` and almost
certainly affects the other AOTI call sites we ship. Local M1 reruns of
the affected tests with the CI-pinned torch wheel all pass quickly, so
the hang is CI-environment-specific (suspect: AOTI dlopen under heavy
xdist + coverage contention on the macos-m1-stable runner).

Skip every AOTI-invoking test on macOS CI only, via
`unittest-macos-cmake.sh` -- linux, windows, and local dev continue to
run them. The skip covers the three vision tests (whole files) plus the
specific `*_aoti` methods in `extension/llm/modules/test/test_*.py`.
Job timeout drops back to 30 minutes for fast iteration; pytest
`--timeout=1500` gives any single test 25 minutes before it is treated
as hung.

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant