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

Tibor Digana commented on SUREFIRE-1508:
----------------------------------------

/proc/<pid>/stat does not work on FreeBSD and therefore we used ps -p.
The idea with Exit 0 sounds interesting. How would alive-check work? Please
write some pseudocode.
The /proc/<maven_pid>/stat was also an idea. I have to check the
permissions for reading this file by Java on Docker container. The etime we
have now tells us if the pid is reused or not. The /proc/pid/stat is
binary, right, and the starttime is in there too.
https://www.redhat.com/archives/axp-list/2001-January/msg00355.html
Maybe we can use these alternatives. FreeBSD has another one and we use it
in Surefire too. This can be reused in the forked JVM. Regarding the time,
we had a problem with DST and it is fixed in snapshot version, so maybe we
have to test it properly with Linux once we have decided for /proc/pid/stat.

On Tue, Apr 24, 2018 at 8:49 AM, Andreas Gudian (JIRA) <[email protected]>



> SurefireBooterForkException with Maven 3.5.3
> --------------------------------------------
>
>                 Key: SUREFIRE-1508
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1508
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin
>         Environment: Docker Image maven:3.5.2-jdk-8
> SpringBoot Application testet with Spring Platform Versions Brussels-SR7 and 
> Brussels-SR3
>            Reporter: Pertschy Simon
>            Priority: Major
>         Attachments: 2018-03-28T16-00-51_221-jvmRun1.dump, 
> failsafe-summary.xml
>
>
> Running junit integration tests with Maven 3.5.3 gives 
> org.apache.maven.surefire.booter.SurefireBooterForkException. 
> With Maven 3.5.2 everything runs fine.
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-failsafe-plugin:2.20.1:verify (default) on 
> project explosive: There are test failures.
> [ERROR] 
> [ERROR] Please refer to /usr/src/mymaven/target/failsafe-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] 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 /usr/src/mymaven && 
> /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Dfile.encoding=UTF-8 -jar 
> /usr/src/mymaven/target/surefire/surefirebooter8650244765410237450.jar 
> /usr/src/mymaven/target/surefire 2018-03-28T16-00-51_221-jvmRun1 
> surefire1685882686721224264tmp surefire_03464518048239249547tmp
> [ERROR] Error occurred in starting fork, check output in log
> [ERROR] Process Exit Code: 1
> [ERROR] at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:686)
> [ERROR] at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:535)
> [ERROR] at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:280)
> [ERROR] at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
> [ERROR] at 
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1124)
> [ERROR] at 
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:954)
> [ERROR] at 
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:832)
> [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]
> [ERROR] 
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR] 
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException



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

Reply via email to