Repository navigation
Use an impossible PID in the pidfile unit test to prevent flakiness - #125
Open
andrewkroh wants to merge 1 commit into
Open
andrewkroh wants to merge 1 commit into
andrewkroh wants to merge 1 commit into
Conversation
…#10138) The pidfile unit test was using PID 1234, which could match an actual process on CI runners. When that happened, the go-ps library would attempt to parse `/proc/1234/stat` and fail with "expected space in input to match format" if the process name contained special characters (e.g., parentheses or spaces). Use PID 5000000 instead, which is above the Linux kernel's maximum `pid_max` (4194304), guaranteeing it will never correspond to a real process. Flaky test trace: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/22711464590/job/65850424794?pr=10136 Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com> (cherry picked from commit a073246fac8040b0f7574798c0f1d73acbf74185)
andrewkroh
force-pushed
the
fix/pidfile-test-flake
branch
from
October 7, 2026 14:47
f6a448b to
c194bc7
Compare
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.
Cherry-pick of upstream cloudnative-pg/cloudnative-pg#10138.
The pidfile unit test writes PID 1234 to the pid file and expects no
such process to exist. On a CI runner that PID can belong to a real
process. When that process has a parenthesis in its name, the go-ps
parser for /proc//stat fails with "expected space in input to
match format" and the test fails.
The failure hit #124 on a change that did not touch this package. A
rerun passed. The upstream fix uses PID 5000000, which is above the
Linux kernel's maximum pid_max of 4194304, so it never matches a real
process.