Repository navigation
test(core): stabilize spawned-process IPC descriptor counts - #3146
Conversation
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. |
|
/ok to test da0ab5b |
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Priority: ⬇️ Low Change: Other Merge Risk: ⚪ Minimal · up to
|
brandon-b-miller
left a comment
There was a problem hiding this comment.
LGTM. One nit: There's a function that's used for something similar over in test_leaks.py.
https://github.com/NVIDIA/cuda-python/blob/main/cuda_core/tests/memory_ipc/test_leaks.py#L158-L169
Since we have a growing number of tests that hit this safety issue with multiprocessing it might be time to centralize the logic and put a note in the agent skill to reuse it.
Thanks @brandon-b-miller, I'll merge this PR and send a follow-on cleanup. (This change is on ctk-next already, out of necessity; therefore merging + follow-on is easier; no merge conflicts.) |
Description
When
test_process_argument_releases_with_the_process_objectis the first test to spawn a process, multiprocessing opens a persistent resource-tracker pipe after the file-descriptor baseline. The extra descriptor can produce an order-dependent false leak failure.Run a no-op child before taking the baseline, keeping the strict descriptor-count assertion unchanged. Use the buffer context manager so an assertion failure also releases its virtual-memory reservation instead of causing subsequent cleanup failures. Follow-up to #3028.
Validation
pre-commit run --all-filespasses locally.Checklist