Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.19.1
-
None
-
Patch
Description
I am using Surefire to test code accessed through JNI. Sometimes this code will fail, crashing the JVM.
We run these tests in parallel ( forkCount=1C and reuseForks=false ) and it's not always obvious from the logs, which test caused a JVM crash - and although a command line is printed out, the booter temp files are removed automatically.
For example:
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ crash-during-test --- ------------------------------------------------------- T E S T S ------------------------------------------------------- Running junit44.environment.BasicTest Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.337 s [INFO] Finished at: 2016-10-26T21:56:45+01:00 [INFO] Final Memory: 19M/451M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project crash-during-test: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: The forked VM terminated without properly saying goodbye. VM crash or System.exit called? [ERROR] Command was /bin/sh -c cd /home/mtandy/Documents/surefire-vmcrash/maven-surefire/surefire-integration-tests/src/test/resources/crash-during-test && /usr/lib/jvm/java-8-oracle/jre/bin/java -jar /home/mtandy/Documents/surefire-vmcrash/maven-surefire/surefire-integration-tests/src/test/resources/crash-during-test/target/surefire/surefirebooter5241184363018251498.jar /home/mtandy/Documents/surefire-vmcrash/maven-surefire/surefire-integration-tests/src/test/resources/crash-during-test/target/surefire/surefire8973747106178765373tmp /home/mtandy/Documents/surefire-vmcrash/maven-surefire/surefire-integration-tests/src/test/resources/crash-during-test/target/surefire/surefire_01102526888161398167tmp [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/PluginExecutionException
The situation could be improved if such crashes more closely resembled other test errors - such as by logging the test that was in progress when the crash happened.
Attachments
Issue Links
- causes
-
SUREFIRE-2244 Make IT for SUREFIRE-1295 reliable
- Closed
- links to