Fix flaky --max-workers strace assertion on aarch64#1101
Merged
Conversation
Count only process forks (SIGCHLD) from the main keylime-policy PID instead of all clone/clone3 lines, filtering out non-deterministic thread creation in child processes. Also widen the gap by comparing --max-workers 1 vs 5 (difference of 4 forks) instead of 1 vs 3 (difference of 2). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts the strace-based --max-workers test to count only process forks (SIGCHLD) from the main keylime-policy PID and compares worker counts between 1 and 5 workers to reduce flakiness, instead of counting all clone/clone3 calls and comparing 1 vs 3 workers. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The logic assumes the main keylime-policy PID is always on the first line of the strace log; consider making this more robust (e.g., explicitly matching the execve of keylime-policy) to avoid brittle failures if strace output format changes.
- The grep pattern now only matches
clonewithSIGCHLDand ignoresclone3; ifclone3is used for process creation on some platforms, you may want to extend the pattern to include it so the worker count remains accurate.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The logic assumes the main keylime-policy PID is always on the first line of the strace log; consider making this more robust (e.g., explicitly matching the execve of keylime-policy) to avoid brittle failures if strace output format changes.
- The grep pattern now only matches `clone` with `SIGCHLD` and ignores `clone3`; if `clone3` is used for process creation on some platforms, you may want to extend the pattern to include it so the worker count remains accurate.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
…ting The strace approach to verify --max-workers was architecture-dependent: clone syscall output format differs between x86_64 and aarch64, causing false negatives. Instead, use a stalling HTTP server that serves repodata normally but holds RPM download connections open, then count established TCP connections with ss to verify worker parallelism. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Count only process forks (SIGCHLD) from the main keylime-policy PID instead of all clone/clone3 lines, filtering out non-deterministic thread creation in child processes. Also widen the gap by comparing --max-workers 1 vs 5 (difference of 4 forks) instead of 1 vs 3 (difference of 2).
Summary by Sourcery
Make the keylime-policy --max-workers functional test more robust by counting deterministic process forks and widening the worker count comparison gap.
Bug Fixes:
Tests: