Repository navigation
Conversation
Share the child runner, picklable no-op target, and cached spawn warmup between the VMM IPC and file-descriptor leak tests. Kill children when joining is interrupted and close Process handles before returning. Document helper reuse and cover successful execution, failed exits, timeouts, interrupted joins, warmup retries, and descriptor stability. Follow up on NVIDIA#3146. Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
@brandon-b-miller, this is the follow-on to PR #3146. Could you please make a review pass before I run the full CI? At #3146 (review) @brandon-b-miller wrote:
We don’t yet have a repository-level test-authoring skill, so I added the helper-reuse guidance to |
Description
The VMM IPC and descriptor-leak tests independently implemented child execution and multiprocessing warmup. The first spawned process opens a persistent resource-tracker pipe; warming up after a file-descriptor baseline can therefore produce an order-dependent false leak failure. Child cleanup must also release IPC handles before fixture teardown.
Follow-up to the consolidation discussion on #3146.
Consolidate the common behavior in
helpers/child_processes.py:run_child(target, *args)applies the sanitizer-aware timeout, kills surviving children when a join times out or is interrupted, checks the exit status, and closes the Process handles before returning.noop(*args)supplies one picklable target for warmup and argument-serialization tests.warmup_multiprocessing()starts the resource tracker before descriptor counting and caches only a successful warmup.Reuse these helpers in the VMM IPC and descriptor-leak tests. The serialization-failure case still serializes the resource-owning object before encountering
Irreducible; its child target never executes. Tests that communicate with a running child or inspect the Process object's lifetime keep explicit process management.Add six spawn-based regression tests covering argument delivery, failed exits, hung-child termination, interrupted-join cleanup, warmup retry/caching, and descriptor stability. Add agent guidance explaining when to reuse the helpers and how to guard specialized process-management tests.
Validation
Fresh local build and validation on Linux with Python 3.12.3, CUDA 13.4, and an NVIDIA A10G:
pre-commit run --all-files: all applicable checks passed.Review And CI
Ready for human review. This PR remains a draft solely to retain manual control over triggering CI.
Checklist