apache / apache/maven-surefire
[SUREFIRE-2187] ps -p does not work in alpine or busy box by default
- Dominant language
- Java
- Stars
- 461
- Forks
- 588
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 19
Description
**[Martin Sillence](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=msillence)** opened **[SUREFIRE-2187](https://issues.apache.org/jira/browse/SUREFIRE-2187?redirect=false)** and commented
Our builds were failing with the error:
System.exit() or native command error interrupted process checker.
java.lang.IllegalStateException: Cannot use PPID 687 process information. Going to use NOOP events.
at org.apache.maven.surefire.booter.PpidChecker.checkProcessInfo(PpidChecker.java:155)
checking the code it looks like you run ps -p:
https://github.com/apache/maven-surefire/blob/47eb1974ef2fb77c621e5cb0c47ac10ab8f4753d/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java#L186C59-L186C71
installing procps in alipine seems to fix it
I wonder if it is possible add something to check if ps supports the -p flag as I imagine I'm not the only one to use alpine to build software?
Simply adding an error that the ps doesn't support -p would save significant time
---
**Affects:** 3.0.0
Contributor guide
Research direction
Start in surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java, especially checkProcessInfo and the ps -p invocation around line 186. Reproduce the process-checker failure in Alpine or BusyBox, then define completion as detecting unsupported -p usage and reporting a clear error instead of the current generic failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, linux
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100