-
-
Notifications
You must be signed in to change notification settings - Fork 734
check_process_leak overhaul #5739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
22356e7
to
5fee49c
Compare
All test failures are unrelated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a much, much better implementation than what was there before, thank you!
"""Wait until timeout for mp_context.active_children() to terminate. | ||
Return list of active subprocesses after the timeout expired. | ||
""" | ||
t0 = time() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny super nit: monotonic
(or perhaps perf_counter
) would technically be more appropriate here I think. I'm sure it will never ever make a difference in this case, and there are plenty of other more important places where we already use non-monotonic time
and shouldn't. I'd just like to start being more careful about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something for a broader discussion maybe? If we want to switch to monotonic, it should be done consistently everywhere, e.g. replace metrics.time. As usual, Windows is a source of pain so need to thread carefully there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xref #4528
Co-authored-by: Gabe Joseph <[email protected]>
Two tests in xarray decorated with
@gen_cluster(client=True)
, therefore not spawning any processes, are very flaky as they fail systematically oncheck_process_leak
. I think the problem is caused by unrelated subprocesses, spawned by previous tests, that don't respond do SIGTERM.xref: pydata/xarray#6211
log: https://github.com/pydata/xarray/runs/4990065672