Intermittent code coverage generation failure in java 8

68 views
Skip to first unread message

Manuri Amaya Perera

unread,
Oct 30, 2015, 5:23:33 AM10/30/15
to JaCoCo and EclEmma Users

Hi,

I am using jacoco version 0.7.4.201502262128. In java 8, intermittently code coverage generation fails. 

INFO  [org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerManager] - Generating Jacoco code coverage...
INFO  
[org.wso2.carbon.automation.engine.frameworkutils.CodeCoverageUtils] - Loading execution data file /build/jenkins-home/workspace/carbon4-kernel__java8/distribution/integration/tests-integration/tests/target/jacoco/jacoco1446060231304.exec
INFO  
[org.wso2.carbon.automation.engine.frameworkutils.CodeCoverageUtils] - Loading execution data file /build/jenkins-home/workspace/carbon4-kernel__java8/distribution/integration/tests-integration/tests/target/jacoco/jacoco1446060190621.exec
INFO  
[org.wso2.carbon.automation.engine.frameworkutils.CodeCoverageUtils] - Loading execution data file /build/jenkins-home/workspace/carbon4-kernel__java8/distribution/integration/tests-integration/tests/target/jacoco/jacoco1446060097966.exec
WARN  
[org.wso2.carbon.automation.engine.frameworkutils.CodeCoverageUtils] - Execution data is empty skipping coverage generation
ERROR
[org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerManager] - Failed to generate code coverage
java
.io.FileNotFoundException: /build/jenkins-home/workspace/carbon4-kernel__java8/distribution/integration/tests-integration/tests/target/jacoco/jacoco-data-merge.exec (No such file or directory)
        at java
.io.FileInputStream.open0(Native Method)
        at java
.io.FileInputStream.open(FileInputStream.java:195)
        at java
.io.FileInputStream.<init>(FileInputStream.java:138)
        at org
.jacoco.core.tools.ExecFileLoader.load(ExecFileLoader.java:71)
        at org
.wso2.carbon.automation.engine.frameworkutils.ReportGenerator.loadExecutionData(ReportGenerator.java:138)
        at org
.wso2.carbon.automation.engine.frameworkutils.ReportGenerator.create(ReportGenerator.java:73)
        at org
.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerManager.generateCoverageReport(CarbonServerManager.java:285)
        at org
.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerManager.serverShutdown(CarbonServerManager.java:260)
        at org
.wso2.carbon.automation.extensions.servers.carbonserver.TestServerManager.stopServer(TestServerManager.java:140)
        at org
.wso2.carbon.automation.extensions.servers.carbonserver.MultipleServersManager.stopAllServers(MultipleServersManager.java:73)
        at org
.wso2.carbon.integration.tests.integration.MultipleCarbonInstancesTestCase.testStopServers(MultipleCarbonInstancesTestCase.java:60)
        at sun
.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java
.lang.reflect.Method.invoke(Method.java:497)
        at org
.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
        at org
.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:525)
        at org
.testng.internal.Invoker.invokeConfigurations(Invoker.java:202)
        at org
.testng.internal.Invoker.invokeConfigurations(Invoker.java:130)
        at org
.testng.internal.Invoker.invokeAfterGroupsConfigurations(Invoker.java:941)
        at org
.testng.internal.Invoker.invokeMethod(Invoker.java:762)
        at org
.testng.internal.Invoker.invokeTestMethod(Invoker.java:842)
        at org
.testng.internal.Invoker.invokeTestMethods(Invoker.java:1166)
        at org
.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
        at org
.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
        at org
.testng.TestRunner.runWorkers(TestRunner.java:1178)
        at org
.testng.TestRunner.privateRun(TestRunner.java:757)
        at org
.testng.TestRunner.run(TestRunner.java:608)
        at org
.testng.SuiteRunner.runTest(SuiteRunner.java:334)
        at org
.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
        at org
.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
        at org
.testng.SuiteRunner.run(SuiteRunner.java:240)
        at org
.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
        at org
.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
        at org
.testng.TestNG.runSuitesSequentially(TestNG.java:1158)
        at org
.testng.TestNG.runSuitesLocally(TestNG.java:1083)
        at org
.testng.TestNG.run(TestNG.java:999)
        at org
.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:295)
        at org
.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:84)
        at org
.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:90)
        at org
.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
        at org
.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
        at org
.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)


Even though it has been said in the log that the dump files are empty, all the files are present and non-empty including jacoco-data-merge.exec

Please find the full log here[1].

Does anybody know the reason behind this or if this has something to do with jdk 8 and the used jacoco version.




Thank you.

Marc R. Hoffmann

unread,
Nov 2, 2015, 7:39:03 AM11/2/15
to jac...@googlegroups.com
Hi,

not sure why the file cannot be read at that point in time. Internally a java.io.FileInputStream is unsuccessfully opened -- as you can see from the stack trace.

I can't tell why the the file is not created. From the logfile some custom tool around JaCoCo is used here, e.g.
    org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerManager
Please report the problem to the maintainer of this tooling.

Regards,
-marc


On 30.10.15 10:23, Manuri Amaya Perera wrote:

Hi,

I am using jacoco version 0.7.4.201502262128. In java 8, intermittently code coverage generation fails. 

INFO  [org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerManager] - Generating Jacoco code coverage...
INFO  [org.wso2.carbon.automation.engine.frameworkutils.CodeCoverageUtils]
  
- Loading execution data file /build/jenkins-home/workspace/carbon4-kernel__java8/distribution/integration/tests-integration/tests/target/jacoco/jacoco1446060231304.exec INFO  [org.wso2.carbon.automation.engine.frameworkutils.CodeCoverageUtils] - Loading execution data file /build/jenkins-home/workspace/carbon4-kernel__java8/distribution/integration/tests-integration/tests/target/jacoco/jacoco1446060190621.exec INFO  [org.wso2.carbon.automation.engine.frameworkutils.CodeCoverageUtils] - Loading execution data file /build/jenkins-home/workspace/carbon4-kernel__java8/distribution/integration/tests-integration/tests/target/jacoco/jacoco1446060097966.exec WARN  [org.wso2.carbon.automation.engine.frameworkutils.CodeCoverageUtils] - Execution data is empty skipping coverage generation ERROR [org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerManager] - Failed to generate code coverage java.io.FileNotFoundException: /build/jenkins-home/workspace/carbon4-kernel__java8/distribution/integration/tests-integration/tests/target/jacoco/jacoco-data-merge.exec (No such file or directory)         at java.io.FileInputStream.open0(Native Method)         at java.io.FileInputStream.open(FileInputStream.java:195)         at java.io.FileInputStream.<init>(FileInputStream.java:138)         at org.jacoco.core.tools.ExecFileLoader.load(ExecFileLoader.java: 71)         at org.wso2.carbon.automation.engine.frameworkutils.ReportGenerator.loadExecutionData(ReportGenerator.java:138)         at org.wso2.carbon.automation.engine.frameworkutils.ReportGenerator.create(ReportGenerator.java:73)         at org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerManager.generateCoverageReport(CarbonServerManager.java:285)         at org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerManager.serverShutdown(CarbonServerManager.java:260)         at org.wso2.carbon.automation.extensions.servers.carbonserver.TestServerManager.stopServer(TestServerManager.java:140)         at org.wso2.carbon.automation.extensions.servers.carbonserver.MultipleServersManager.stopAllServers(MultipleServersManager.java:73)         at org.wso2.carbon.integration.tests.integration.MultipleCarbonInstancesTestCase.testStopServers(MultipleCarbonInstancesTestCase.java:60)         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)         at java.lang.reflect.Method.invoke(Method.java:497)         at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)         at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:525)         at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:202)         at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:130)         at org.testng.internal.Invoker.invokeAfterGroupsConfigurations(Invoker.java:941)         at org.testng.internal.Invoker.invokeMethod(Invoker.java:762)         at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:842)         at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1166)         at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)         at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)         at org.testng.TestRunner.runWorkers(TestRunner.java:1178)         at org.testng.TestRunner.privateRun(TestRunner.java:757)         at org.testng.TestRunner.run(TestRunner.java:608)         at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)         at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)         at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)         at org.testng.SuiteRunner.run(SuiteRunner.java:240)         at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)         at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)         at org.testng.TestNG.runSuitesSequentially(TestNG.java:1158)         at org.testng.TestNG.runSuitesLocally(TestNG.java:1083)         at org.testng.TestNG.run(TestNG.java:999)         at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:295)         at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:84)         at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider .java:90)         at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)         at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)         at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)


Even though it has been said in the log that the dump files are empty, all the files are present and non-empty including jacoco-data-merge.exec

Please find the full log here[1].

Does anybody know the reason behind this or if this has something to do with jdk 8 and the used jacoco version.




Thank you.
--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/07d0f977-e74b-4875-ba76-3a5311539d13%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages