Conversation
`ProcessGroupStatsMonitor.run()` spawns a `multiprocessing` subprocess to read `/proc` for per-process-group CPU/mem/IO stats. When the pipeline is built inside a daemon process — e.g. a worker-pool process running a nested pipeline (a `.to()` region worker, or the old fused-subprocess pool worker) — `proc.start()` raises `AssertionError: daemonic processes are not allowed to have children`, which the background-task runner logs as an ERROR (once per worker, repeatedly noisy in MAST logs). A daemon genuinely cannot spawn the monitor subprocess, and a per-worker monitor would be redundant anyway: the main-process monitor already collects stats for the whole process group (it sums over the shared PGID). So guard the spawn — if the current process is a daemon, log a single WARNING and return cleanly instead of letting the assertion surface as an error.
Contributor
|
This pull request has been imported. If you are a Meta employee, you can view this in D110786636. (Because this pull request was imported automatically, there will not be any future comments.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ProcessGroupStatsMonitor.run()spawns amultiprocessingsubprocess to read/procfor per-process-group CPU/mem/IO stats. When the pipeline is built inside a daemon process — e.g. a worker-pool process running a nested pipeline (a.to()region worker, or the old fused-subprocess pool worker) —proc.start()raisesAssertionError: daemonic processes are not allowed to have children, which the background-task runner logs as an ERROR (once per worker, repeatedly noisy in MAST logs).A daemon genuinely cannot spawn the monitor subprocess, and a per-worker monitor would be redundant anyway: the main-process monitor already collects stats for the whole process group (it sums over the shared PGID). So guard the spawn — if the current process is a daemon, log a single WARNING and return cleanly instead of letting the assertion surface as an error.