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

Chris Graham commented on SUREFIRE-1623:
----------------------------------------

If I run a clean build, mvn clean install, I can see that it spawns some 
versions of java, then cmd.exe and calls wmic.exe, that should return 
immediately, but it does not. If I kill the wmic process, this is the output of 
the build:
{noformat}
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:42 min
[INFO] Finished at: 2019-05-08T08:51:29+10:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M3:test (default-test) on 
project surefire-booter: There are test failures.
[ERROR]
[ERROR] Please refer to 
C:\Workspaces\Apache\maven-surefire\surefire-booter\target\surefire-reports for 
the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, 
[date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] The forked VM terminated without properly saying goodbye. VM crash or 
System.exit called?
[ERROR] Command was cmd.exe /X /C ""C:\Program 
Files\Java\jdk1.8.0_152\jre\..\bin\java" -server -XX:+UseG1GC -Xms128m -Xmx144m 
-XX:+TieredCompilation -XX:TieredStopA
tLevel=1 -XX:SoftRefLRUPolicyMSPerMB=50 -Djava.awt.headless=true 
-Djdk.net.URLClassPath.disableClassPathURLCheck=true "-javaagent:C:\\Documents 
and Settings\\admin\\
.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.8.3\\org.jacoco.agent-0.8.3-runtime.jar=destfile=C:\\Workspaces\\Apache\\maven-surefire\\surefire-booter\\target\\j
acoco.exec,append=true,includes=**/failsafe/*:**/failsafe/**/*:**/surefire/*:**/surefire/**/*,inclnolocationclasses=true,jmx=false"
 -Dnet.bytebuddy.experimental=true
 org.apache.maven.shadefire.surefire.booter.ForkedBooter "C:\Documents and 
Settings\admin\Local Settings\Temp\surefire160989952066229397" 
2019-05-08T08-50-15_588-jvm
Run1 surefire97899467073095095tmp surefire_19058730851214627848tmp"
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[ERROR] Crashed tests:
[ERROR] junit.framework.JUnit4TestCaseFacade
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: The 
forked VM terminated without properly saying goodbye. VM crash or System.exit 
called?
[ERROR] Command was cmd.exe /X /C ""C:\Program 
Files\Java\jdk1.8.0_152\jre\..\bin\java" -server -XX:+UseG1GC -Xms128m -Xmx144m 
-XX:+TieredCompilation -XX:TieredStopA
tLevel=1 -XX:SoftRefLRUPolicyMSPerMB=50 -Djava.awt.headless=true 
-Djdk.net.URLClassPath.disableClassPathURLCheck=true "-javaagent:C:\\Documents 
and Settings\\admin\\
.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.8.3\\org.jacoco.agent-0.8.3-runtime.jar=destfile=C:\\Workspaces\\Apache\\maven-surefire\\surefire-booter\\target\\j
acoco.exec,append=true,includes=**/failsafe/*:**/failsafe/**/*:**/surefire/*:**/surefire/**/*,inclnolocationclasses=true,jmx=false"
 -Dnet.bytebuddy.experimental=true
 org.apache.maven.shadefire.surefire.booter.ForkedBooter "C:\Documents and 
Settings\admin\Local Settings\Temp\surefire160989952066229397" 
2019-05-08T08-50-15_588-jvm
Run1 surefire97899467073095095tmp surefire_19058730851214627848tmp"
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[ERROR] Crashed tests:
[ERROR] junit.framework.JUnit4TestCaseFacade
[ERROR]         at 
org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:670)
[ERROR]         at 
org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:283)
[ERROR]         at 
org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:246)
[ERROR]         at 
org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1161)
[ERROR]         at 
org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1002)
[ERROR]         at 
org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:848)
[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:954)
[ERROR]         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
[ERROR]         at org.apache.maven.cli.MavenCli.main(MavenCli.java:192)
[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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :surefire-booter

C:\Workspaces\Apache\maven-surefire>{noformat}
So we can see we are hung on a fork. I've attached the dump file, 
2019-05-08T08-50-15_588-jvmRun1.dump.

 

> TempWmicBatchFile.bat is left in project dirs after surefire tests are run
> --------------------------------------------------------------------------
>
>                 Key: SUREFIRE-1623
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1623
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 3.0.0-M3
>            Reporter: Chris Graham
>            Assignee: Tibor Digana
>            Priority: Blocker
>         Attachments: 2019-05-06T22-39-26_587-jvmRun1.dumpstream, 
> reproduce-surefire-issue master.zip
>
>
> WINDOWS ONLY:
> When the WMIC command it run to obtain the process start time, the current 
> implementation leaves behind a batch file, TempWmicBatchFile.bat, which is 
> zero bytes long.
> This file needs to be removed post execution.
> Leaving it behind will interfere with the release plugin as a scm status call 
> will fail with files needing to be added. Simply ignoring the file is a very 
> sloppy approach.



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

Reply via email to