[jira] [Commented] (SUREFIRE-1422) Forking fails on Linux if /bin/ps isn't available

2018-03-14 Thread Thomas Raehalme (JIRA)

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

Thomas Raehalme commented on SUREFIRE-1422:
---

If package {{procps}} has been installed, the plugin works (also 2.20.1). The 
latest Docker image {{maven:3.5.3-jdk-8-alpine}} now adds the package so at 
least I am happy with this.

If the package is not present, the plugin fails immediately when starting the 
tests with the following output:
{code:java}
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-surefire-plugin:2.21.0-SNAPSHOT:test 
(default-test) on project maven-surefire-testcase: There are test failures.
[ERROR] 
[ERROR] Please refer to /project/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?
[ERROR] Command was /bin/sh -c cd /project && 
/usr/lib/jvm/java-1.8-openjdk/jre/bin/java -jar 
/project/target/surefire/surefirebooter1586782271469883468.jar 
/project/target/surefire 2018-03-14T14-00-50_778-jvmRun1 
surefire6774220999731177747tmp surefire_06426515262477706470tmp
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[ERROR] Crashed tests:
[ERROR] LongTest
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: The 
forked VM terminated without properly saying goodbye. VM crash or System.exit 
called?
[ERROR] Command was /bin/sh -c cd /project && 
/usr/lib/jvm/java-1.8-openjdk/jre/bin/java -jar 
/project/target/surefire/surefirebooter1586782271469883468.jar 
/project/target/surefire 2018-03-14T14-00-50_778-jvmRun1 
surefire6774220999731177747tmp surefire_06426515262477706470tmp
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[ERROR] Crashed tests:
[ERROR] LongTest
[ERROR] at 
org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:671)
[ERROR] at 
org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
[ERROR] at 
org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:278)
[ERROR] at 
org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:244)
[ERROR] at 
org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1149)
[ERROR] at 
org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:978)
[ERROR] at 
org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:854)
[ERROR] at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
[ERROR] at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
[ERROR] at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
[ERROR] at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
[ERROR] at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
[ERROR] at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
[ERROR] at 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
[ERROR] at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
[ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
[ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
[ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:290)
[ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:194)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:498)
[ERROR] at 
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
[ERROR] at 
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
[ERROR] at 
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
[ERROR] at 
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[ERROR] 
[ERROR] -> [Help 1]
[E{code}
The contents of the corresponding dump file is:
{code:java}
# cat target/surefire-reports/2018-03-14T14-00-50_778-jvmRun1.dump
# Created on 2018-03-14T14:00:53.284
Killing self fork JVM. Maven process died.
{code}

> 

[jira] [Comment Edited] (SUREFIRE-1422) Forking fails on Linux if /bin/ps isn't available

2018-03-07 Thread Thomas Raehalme (JIRA)

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

Thomas Raehalme edited comment on SUREFIRE-1422 at 3/7/18 6:48 PM:
---

I've written about the issue [on my 
blog|http://raehal.me/maven-surefire-plugin-on-Docker/] with examples of both 
output and contents of the dump file. 

You can verify the ps functionality with Docker:
{code:java}
$ docker run -it --rm maven:3.5.2-jdk-8-alpine /bin/sh
/ # ps --help
BusyBox v1.25.1 (2016-10-26 16:15:20 GMT) multi-call binary.

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

Show list of processes

-o COL1,COL2=HEADER Select columns for display
/ # 
{code}
As you can see the default implementation from BusyBox in Alpine is rather 
limited regarding options. And this is when the problem occurs with the 2.21.0 
version. If you downgrade to version 2.20 there is no problem.

Also if you install the {{procps}} package, you get the needed options and then 
also 2.21.0 works as intended.
{code:java}
$ docker run -it --rm maven:3.5.2-jdk-8-alpine /bin/sh
/ # apk add --update procps
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
(1/3) Installing libintl (0.19.8.1-r0)
(2/3) Installing libproc (3.3.12-r1)
(3/3) Installing procps (3.3.12-r1)
Executing busybox-1.25.1-r0.trigger
OK: 110 MiB in 62 packages
/ # ps --help all

Usage:
 ps [options]

Basic options:
 -A, -e   all processes
 -a   all with tty, except session leaders
  a   all with tty, including other users
 -d   all except session leaders
 -N, --deselect   negate selection
  r   only running processes
  T   all processes on this terminal
  x   processes without controlling ttys

Selection by list:
 -C  command name
 -G, --Group real group id or name
 -g, --group   session or effective group name
 -p, p, --pidprocess id
--ppid   parent process id
 -q, q, --quick-pid 
  process id (quick mode)
 -s, --sid   session id
 -t, t, --ttyterminal
 -u, U, --user   effective user id or name
 -U, --User  real user id or name

  The selection options take as their argument either:
a comma-separated list e.g. '-u root,nobody' or
a blank-separated list e.g. '-p 123 4567'

Output formats:
 -F   extra full
 -f   full-format, including command lines
  f, --forest ascii art process tree
 -H   show process hierarchy
 -j   jobs format
  j   BSD job control format
 -l   long format
  l   BSD long format
 -M, Zadd security data (for SELinux)
 -O   preloaded with default columns
  O   as -O, with BSD personality
 -o, o, --format 
  user-defined format
  s   signal format
  u   user-oriented format
  v   virtual memory format
  X   register format
 -y   do not show flags, show rss vs. addr (used with -l)
 --contextdisplay security context (for SELinux)
 --headersrepeat header lines, one per page
 --no-headers do not print header at all
 --cols, --columns, --width 
  set screen width
 --rows, --lines 
  set screen height

Show threads:
  H   as if they were processes
 -L   possibly with LWP and NLWP columns
 -m, mafter processes
 -T   possibly with SPID column

Miscellaneous options:
 -c   show scheduling class with -l option
  c   show true command name
  e   show the environment after command
  k,--sortspecify sort order as: [+|-]key[,[+|-]key[,...]]
  L   show format specifiers
  n   display numeric uid and wchan
  S,--cumulative  include some dead child process data
 -y   do not show flags, show rss (only with -l)
 -V, V, --version display version information and exit
 -w, wunlimited output width

--help 
  display help and exit

For more details see ps(1).
/ # 
{code}
Hope this helps! If I can help with anything please let me know.


was (Author: raehalme):
I've written about the issue [on my 
blog|http://raehal.me/maven-surefire-plugin-on-Docker/] with examples of both 
output and contents of the dump file. 

You can verify the ps functionality with Docker:
{code:java}
$ docker run -it --rm maven:3.5.2-jdk-8-alpine /bin/sh
/ # ps --help
BusyBox v1.25.1 (2016-10-26 16:15:20 GMT) multi-call binary.

Usage: ps [-o 

[jira] [Comment Edited] (SUREFIRE-1422) Forking fails on Linux if /bin/ps isn't available

2018-03-07 Thread Thomas Raehalme (JIRA)

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

Thomas Raehalme edited comment on SUREFIRE-1422 at 3/7/18 6:46 PM:
---

I've written about the issue [on my 
blog|http://raehal.me/maven-surefire-plugin-on-Docker/] with examples of both 
output and contents of the dump file. 

You can verify the ps functionality with Docker:
{code:java}
$ docker run -it --rm maven:3.5.2-jdk-8-alpine /bin/sh
/ # ps --help
BusyBox v1.25.1 (2016-10-26 16:15:20 GMT) multi-call binary.

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

Show list of processes

-o COL1,COL2=HEADER Select columns for display
/ # 
{code}
As you can see the default implementation from BusyBox in Alpine is rather 
limited regarding options.

But if you install the {{procps}} package, you get the needed options.
{code:java}
$ docker run -it --rm maven:3.5.2-jdk-8-alpine /bin/sh
/ # apk add --update procps
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
(1/3) Installing libintl (0.19.8.1-r0)
(2/3) Installing libproc (3.3.12-r1)
(3/3) Installing procps (3.3.12-r1)
Executing busybox-1.25.1-r0.trigger
OK: 110 MiB in 62 packages
/ # ps --help all

Usage:
 ps [options]

Basic options:
 -A, -e   all processes
 -a   all with tty, except session leaders
  a   all with tty, including other users
 -d   all except session leaders
 -N, --deselect   negate selection
  r   only running processes
  T   all processes on this terminal
  x   processes without controlling ttys

Selection by list:
 -C  command name
 -G, --Group real group id or name
 -g, --group   session or effective group name
 -p, p, --pidprocess id
--ppid   parent process id
 -q, q, --quick-pid 
  process id (quick mode)
 -s, --sid   session id
 -t, t, --ttyterminal
 -u, U, --user   effective user id or name
 -U, --User  real user id or name

  The selection options take as their argument either:
a comma-separated list e.g. '-u root,nobody' or
a blank-separated list e.g. '-p 123 4567'

Output formats:
 -F   extra full
 -f   full-format, including command lines
  f, --forest ascii art process tree
 -H   show process hierarchy
 -j   jobs format
  j   BSD job control format
 -l   long format
  l   BSD long format
 -M, Zadd security data (for SELinux)
 -O   preloaded with default columns
  O   as -O, with BSD personality
 -o, o, --format 
  user-defined format
  s   signal format
  u   user-oriented format
  v   virtual memory format
  X   register format
 -y   do not show flags, show rss vs. addr (used with -l)
 --contextdisplay security context (for SELinux)
 --headersrepeat header lines, one per page
 --no-headers do not print header at all
 --cols, --columns, --width 
  set screen width
 --rows, --lines 
  set screen height

Show threads:
  H   as if they were processes
 -L   possibly with LWP and NLWP columns
 -m, mafter processes
 -T   possibly with SPID column

Miscellaneous options:
 -c   show scheduling class with -l option
  c   show true command name
  e   show the environment after command
  k,--sortspecify sort order as: [+|-]key[,[+|-]key[,...]]
  L   show format specifiers
  n   display numeric uid and wchan
  S,--cumulative  include some dead child process data
 -y   do not show flags, show rss (only with -l)
 -V, V, --version display version information and exit
 -w, wunlimited output width

--help 
  display help and exit

For more details see ps(1).
/ # 
{code}
The problem only occurs when the {{procps}} package has not been installed.

Hope this helps! If I can help with anything please let me know.


was (Author: raehalme):
I've written about the issue [on my 
blog|http://raehal.me/maven-surefire-plugin-on-Docker/] with examples of both 
output and contents of the dump file. 

You can verify the ps functionality with Docker:
{code}
$ docker run -it --rm maven:3.5.2-jdk-8-alpine /bin/sh
/ # ps --help
BusyBox v1.25.1 (2016-10-26 16:15:20 GMT) multi-call binary.

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

Show list of processes

-o COL1,COL2=HEADER Select columns for display
/ 

[jira] [Commented] (SUREFIRE-1422) Forking fails on Linux if /bin/ps isn't available

2018-03-07 Thread Thomas Raehalme (JIRA)

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

Thomas Raehalme commented on SUREFIRE-1422:
---

I've written about the issue [on my 
blog|http://raehal.me/maven-surefire-plugin-on-Docker/] with examples of both 
output and contents of the dump file. 

You can verify the ps functionality with Docker:
{code}
$ docker run -it --rm maven:3.5.2-jdk-8-alpine /bin/sh
/ # ps --help
BusyBox v1.25.1 (2016-10-26 16:15:20 GMT) multi-call binary.

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

Show list of processes

-o COL1,COL2=HEADER Select columns for display
/ # 
{code}
As you can see the default implementation from BusyBox in Alpine is rather 
limited regarding options.

But if you install the {{procps}} package, you get the needed options.
{code}
$ docker run -it --rm maven:3.5.2-jdk-8-alpine /bin/sh
/ # apk add --update procps
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
(1/3) Installing libintl (0.19.8.1-r0)
(2/3) Installing libproc (3.3.12-r1)
(3/3) Installing procps (3.3.12-r1)
Executing busybox-1.25.1-r0.trigger
OK: 110 MiB in 62 packages
/ # ps --help all

Usage:
 ps [options]

Basic options:
 -A, -e   all processes
 -a   all with tty, except session leaders
  a   all with tty, including other users
 -d   all except session leaders
 -N, --deselect   negate selection
  r   only running processes
  T   all processes on this terminal
  x   processes without controlling ttys

Selection by list:
 -C  command name
 -G, --Group real group id or name
 -g, --group   session or effective group name
 -p, p, --pidprocess id
--ppid   parent process id
 -q, q, --quick-pid 
  process id (quick mode)
 -s, --sid   session id
 -t, t, --ttyterminal
 -u, U, --user   effective user id or name
 -U, --User  real user id or name

  The selection options take as their argument either:
a comma-separated list e.g. '-u root,nobody' or
a blank-separated list e.g. '-p 123 4567'

Output formats:
 -F   extra full
 -f   full-format, including command lines
  f, --forest ascii art process tree
 -H   show process hierarchy
 -j   jobs format
  j   BSD job control format
 -l   long format
  l   BSD long format
 -M, Zadd security data (for SELinux)
 -O   preloaded with default columns
  O   as -O, with BSD personality
 -o, o, --format 
  user-defined format
  s   signal format
  u   user-oriented format
  v   virtual memory format
  X   register format
 -y   do not show flags, show rss vs. addr (used with -l)
 --contextdisplay security context (for SELinux)
 --headersrepeat header lines, one per page
 --no-headers do not print header at all
 --cols, --columns, --width 
  set screen width
 --rows, --lines 
  set screen height

Show threads:
  H   as if they were processes
 -L   possibly with LWP and NLWP columns
 -m, mafter processes
 -T   possibly with SPID column

Miscellaneous options:
 -c   show scheduling class with -l option
  c   show true command name
  e   show the environment after command
  k,--sortspecify sort order as: [+|-]key[,[+|-]key[,...]]
  L   show format specifiers
  n   display numeric uid and wchan
  S,--cumulative  include some dead child process data
 -y   do not show flags, show rss (only with -l)
 -V, V, --version display version information and exit
 -w, wunlimited output width

--help 
  display help and exit

For more details see ps(1).
/ # 
{code}
Hope this helps! If I can help with anything please let me know.

> 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 

[jira] [Commented] (SUREFIRE-1422) Forking fails on Linux if /bin/ps isn't available

2018-03-07 Thread Thomas Raehalme (JIRA)

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

Thomas Raehalme commented on SUREFIRE-1422:
---

The problem is that even though the tests run just fine, the forked process is 
killed (by Maven) and the build therefore fails.

In your previous comment you state that "if the command fails then the default 
mechanism should take over and forked JVM would be killed till 30 seconds". 
Because Alpine by default does not support the -p flag, this always happens, 
and is a problem if the tests run longer than 30 seconds, right?

> 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)


[jira] [Commented] (SUREFIRE-1422) Forking fails on Linux if /bin/ps isn't available

2018-03-07 Thread Thomas Raehalme (JIRA)

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

Thomas Raehalme commented on SUREFIRE-1422:
---

Yes, the process is killed which was the original problem :)

> 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)


[jira] [Commented] (SUREFIRE-1422) Forking fails on Linux if /bin/ps isn't available

2017-11-12 Thread Thomas Raehalme (JIRA)

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

Thomas Raehalme commented on SUREFIRE-1422:
---

I had a look at the code and looks like it's using the {{-p}} parameter on 
{{ps}}. Since by default Alpine uses {{ps}} from Busybox, the {{-p}} parameter 
is not going to work. The procps package needs to be added.

Any chance the code could be modified to not use the {{-p}} parameter?

> 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
> Fix For: 2.21.0.Jigsaw
>
>
> 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
(v6.4.14#64029)


[jira] Created: (MWAR-98) Renaming artifact to its finalName in POM before placed in /WEB-INF/lib.

2007-04-13 Thread Thomas Raehalme (JIRA)
Renaming artifact to its finalName in POM before placed in /WEB-INF/lib.


 Key: MWAR-98
 URL: http://jira.codehaus.org/browse/MWAR-98
 Project: Maven 2.x War Plugin
  Issue Type: Improvement
Affects Versions: 2.0.2
Reporter: Thomas Raehalme


If you have project A with module core, it produces an artifact named 
core-x.y.z.jar (or any other type). Even if build/finalName has been specified 
in the POM, the file name still matches the name of the artifact when stored in 
the Maven repository. This is also the name that the WAR plug-in uses when 
adding the artifact to /WEB-INF/lib. If you add a module named core in project 
B, there will be two core-x.y.z.jar files when creating a WAR/EAR.

There has been discussion about storing the artifact in the repository using 
the finalName value, but such implementation would make automatic downloading 
of artifacts much more difficult. It was therefore suggested that each plugin 
should rename the artifact itself when necessary. 
http://www.nabble.com/Re%3A-Question-regarding-finalName-in-maven-assembly-plugin-p9960876s177.html

Therefore I suggest that the WAR plug-in renames the artifact to its finalName 
before adding it to the web application. Unfortunately I cannot provide a patch 
at the time of writing this. I will, however, try to provide one in the near 
future.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira