You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Tandy (JIRA)" <ji...@apache.org> on 2016/10/26 21:18:58 UTC

[jira] [Created] (SUREFIRE-1295) JVM crashes in forks do not log the name of the failing test

Michael Tandy created SUREFIRE-1295:
---------------------------------------

             Summary: JVM crashes in forks do not log the name of the failing test
                 Key: SUREFIRE-1295
                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1295
             Project: Maven Surefire
          Issue Type: Bug
          Components: Maven Surefire Plugin
    Affects Versions: 2.19.1
            Reporter: Michael Tandy


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:

{code}
[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
{code}

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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)