maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Potter (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SUREFIRE-1422) Forking fails on Linux if /bin/ps isn't available
Date Wed, 07 Mar 2018 05:05:00 GMT

    [ https://issues.apache.org/jira/browse/SUREFIRE-1422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16389037#comment-16389037
] 

Andrew Potter commented on SUREFIRE-1422:
-----------------------------------------

I tried again with the latest version of alpine, and it looks like that version's default
ps fails on the -p flag instead of ignoring it.  You can see for yourself by running the
container:
{code:java}
$ docker run -it alpine
/ # /bin/ps -o etime= -p 1
/bin/ps: unrecognized option: p
BusyBox v1.27.2 (2017-12-12 10:41:50 GMT) multi-call binary.

Usage: ps [-o COL1,COL2=HEADER]

Show list of processes

-o COL1,COL2=HEADER	Select columns for display
/ #
/ # apk add --update procps
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
(1/6) Installing libintl (0.19.8.1-r1)
(2/6) Installing ncurses-terminfo-base (6.0_p20171125-r0)
(3/6) Installing ncurses-terminfo (6.0_p20171125-r0)
(4/6) Installing ncurses-libs (6.0_p20171125-r0)
(5/6) Installing libproc (3.3.12-r3)
(6/6) Installing procps (3.3.12-r3)
Executing busybox-1.27.2-r7.trigger
OK: 13 MiB in 17 packages
/ #
/ # /bin/ps -o etime= -p 1
00:18{code}
 

> Forking fails on Linux if /bin/ps isn't available
> -------------------------------------------------
>
>                 Key: SUREFIRE-1422
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1422
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: process forking
>    Affects Versions: 2.20.1
>         Environment: Linux (Debian 9 with OpenJDK 8)
>            Reporter: Emmanuel Bourg
>            Assignee: Tibor Digana
>            Priority: Major
>             Fix For: 2.21.0
>
>
> Hi,
> With the changes introduced by SUREFIRE-1302 I'm now experiencing a failure on Linux
when the fork mode is enabled:
> {code}
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test
(default-test) on project foo: There are test failures.
> [ERROR]
> [ERROR] Please refer to /foo/target/surefire-reports for the individual test results.
> [ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream
and [date]-jvmRun[N].dumpstream.
> [ERROR] The forked VM terminated without properly saying goodbye. VM crash or System.exit
called?
> {code}
> I traced the issue back to the PpidChecker class, the code assumes that {{/bin/ps}} or
{{/usr/bin/ps}} exist but this isn't guaranteed (especially on trimmed down containers commonly
used for continuous integration).
> It would be nice to have a fallback mechanism when ps isn't available, or at least check
its existence and display an explicit message stating that it must be installed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message