Repository navigation
fix(rocm): verify start-ticks in managed service liveness #709
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1078,8 +1078,11 @@ fn record_still_live(record: &ManagedServiceRecord, pid_alive: impl Fn(u32) -> b | |
| if !crate::managed_service_status::managed_service_is_live(record) { | ||
| return false; | ||
| } | ||
| let pids = crate::managed_service_status::recorded_service_pids(record); | ||
| pids.is_empty() || pids.into_iter().any(pid_alive) | ||
| let identities = crate::managed_service_status::recorded_service_pids(record); | ||
| identities.is_empty() | ||
| || identities | ||
| .into_iter() | ||
| .any(|identity| pid_alive(identity.pid)) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Non-blocking: |
||
| } | ||
|
|
||
| /// [`record_still_live`] over the manifest on disk, so a `rocm services stop` | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -169,7 +169,7 @@ fn managed_service_record_is_in_use(record: &ManagedServiceRecord) -> bool { | |
| managed_service_is_live(record) | ||
| || recorded_service_pids(record) | ||
| .iter() | ||
| .any(|pid| process_is_running(*pid)) | ||
| .any(|identity| process_is_running(identity.pid)) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Non-blocking: the prune/remove guard still uses bare |
||
| } | ||
|
|
||
| /// Remove one non-running local server record and everything it owns. | ||
|
|
||
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.
Non-blocking: this is
--helptext that users read, and "recycled PIDs with mismatched recorded start times" is internal wording; it is also Linux-only behaviour (the README says so). Something like "A record whose process ID now belongs to a different process is shown as not running (Linux)." would read better.