Skip to content

[sled-diagnostics] chunk the number of pids for ptool commands #8167

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

Open
wants to merge 2 commits into
base: spr/papertigers/main.sled-diagnostics-chunk-the-number-of-pids-for-ptool-commands
Choose a base branch
from

Conversation

papertigers
Copy link
Contributor

@papertigers papertigers commented May 15, 2025

This PR is on top of #8151 and is also ment to help address #8166.
It chunks up the number of PIDs passed to the various ptool commands such as pstack and pfiles

Created using spr 1.3.6-beta.1
@papertigers
Copy link
Contributor Author

papertigers commented May 15, 2025

I am inclined not to merge this because it means any transient process will mark a whole chunk of PIDs via pstack/pfiles/pargs as failed when only one or more PIDs are no longer around.

Open to thoughts here...but we know rust 1.87 helps improve things immensely.

@papertigers papertigers requested a review from smklein May 15, 2025 18:28
@papertigers papertigers changed the base branch from spr/papertigers/main.sled-diagnostics-chunk-the-number-of-pids-for-ptool-commands to spr/papertigers/wip-diagnostics-use-joinset May 15, 2025 18:35
@smklein
Copy link
Collaborator

smklein commented May 15, 2025

I am inclined not to merge this because it means any transient process will mark a whole chunk of PIDs via pstack/pfiles/pargs as failed when only one or more PIDs are no longer around.

Open to thoughts here...but we know rust 1.87 helps improve things immensely.

I'm experimenting with this locally, with:

pfexec pstack <pid that exists> <pid that doesn't exist> <pid that exists>

I'm seeing valid results for all "real pids" go to stdout, and error messages go to "stderr". But a missing pid doesn't seem to inhibit the rest of the collection from occurring.

@papertigers papertigers reopened this May 15, 2025
@papertigers papertigers changed the base branch from spr/papertigers/wip-diagnostics-use-joinset to spr/papertigers/main.sled-diagnostics-chunk-the-number-of-pids-for-ptool-commands May 15, 2025 18:47
@papertigers
Copy link
Contributor Author

I'm seeing valid results for all "real pids" go to stdout, and error messages go to "stderr". But a missing pid doesn't seem to inhibit the rest of the collection from occurring.

That's right but the command execution is looking at the exit status. So the data will be there but it will be considered failed.

Created using spr 1.3.6-beta.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants