-
Notifications
You must be signed in to change notification settings - Fork 2k
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
scheduler: detect and log unexpected scheduling collisions #11793
Merged
Conversation
This file contains 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
schmichael
reviewed
Jan 7, 2022
schmichael
reviewed
Jan 7, 2022
lgfa29
changed the title
tmp
scheduler: detect and log unexpected scheduling collisions
Jan 10, 2022
schmichael
reviewed
Jan 13, 2022
lgfa29
added a commit
that referenced
this pull request
Jan 15, 2022
lgfa29
added a commit
that referenced
this pull request
Jan 17, 2022
lgfa29
added a commit
that referenced
this pull request
Jan 17, 2022
lgfa29
added a commit
that referenced
this pull request
Jan 17, 2022
lgfa29
added a commit
that referenced
this pull request
Jan 18, 2022
lgfa29
added a commit
that referenced
this pull request
Jan 18, 2022
lgfa29
added a commit
that referenced
this pull request
Jan 19, 2022
lgfa29
added a commit
that referenced
this pull request
Jan 19, 2022
lgfa29
added a commit
that referenced
this pull request
Jan 19, 2022
lgfa29
added a commit
that referenced
this pull request
Jan 19, 2022
changelog: manually add entry for #11793
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
#9506 and others have reported sporadically eval plan failures on job submission.
The root of the problem is the PlanApplier rejecting plans from scheduler workers due to port conflicts. Since the scheduler did not observe the conflict it will likely make the same plan again and the job will never finish scheduling. We need more data on why the port conflict happens in the first place.
This PR doesn't solve the problem, as there are multiple causes and not all are known, but brings the worker scheduler logic closer to the logic used by the
PlanApplier
during scheduling.More specifically, one discrepancy we noticed is the
BinPackIterator
not ignoring potential port collisions, whereas thePlanApplier
would not and reject the plan if a collision is detected.This flow violates the assumption made by
AllocsFit
:The
PlanApplier
passes anil
netIdx
toAllocsFit
, while the scheduler worker passes anon-nil
value, but also doesn't check for conflicts.We believe the initial logic behaved like this because, when the iterator is evaluating a node, the
netIdx
is initialized with its current state, which should never have a collision, but this may not always hold true (corrupt state, incorrect copying values, mutating the state store directly, incorrect upgrade paths etc.).Since we're not sure what could be causing this issue, this PR also adds additional logging when this problem is detected. To aid debugging, extensive data is collected (full node struct, list of allocations,
NetworkIndex
etc.). Since this can result in a lot of data, these events are sent back to the server to be centralized and deduplicated by node ID to avoid polluting the agent log.After these changes, any unexpected port collision will result in the node being skipped, which will allow for evaluations to progress into a healthy node.