Merge Question

142 views
Skip to first unread message

Jörg Büsse

unread,
Feb 24, 2015, 2:28:46 AM2/24/15
to jac...@googlegroups.com

Hi,

I have JUnit Tests running with the jacoco java agent on two different machines. Let's say 50% of the tests on machine a and 50% of the tests on machine b (actually I use Test Load Balancer(TLB) to split the test sets). I tried to merge the results (jacoco.exec files) with the ant merge target but it fails every time with this exception:

java.lang.IllegalStateException: Incompatible execution data for class .....
 at org
.jacoco.core.data.ExecutionData.assertCompatibility(ExecutionData.java:146)
 at org
.jacoco.core.data.ExecutionData.merge(ExecutionData.java:109)
 at org
.jacoco.core.data.ExecutionDataStore.put(ExecutionDataStore.java:48)
 at org
.jacoco.core.data.ExecutionDataStore.visitClassExecution(ExecutionDataStore.java:122)
 at org
.jacoco.core.data.ExecutionDataReader.readExecutionData(ExecutionDataReader.java:147)
 at org
.jacoco.core.data.ExecutionDataReader.readBlock(ExecutionDataReader.java:111)
 at org
.jacoco.core.data.ExecutionDataReader.read(ExecutionDataReader.java:85)
 at org
.jacoco.ant.MergeTask.loadSourceFiles(MergeTask.java:114)
 at org
.jacoco.ant.MergeTask.execute(MergeTask.java:74)
 at org
.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
 at sun
.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
 at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java
.lang.reflect.Method.invoke(Method.java:606)
 at org
.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
 at org
.apache.tools.ant.Task.perform(Task.java:348)
 at org
.apache.tools.ant.Target.execute(Target.java:390)
 at org
.apache.tools.ant.Target.performTasks(Target.java:411)
 at org
.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
 at org
.apache.tools.ant.Project.executeTarget(Project.java:1366)
 at org
.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
 at org
.apache.tools.ant.Project.executeTargets(Project.java:1249)
 at org
.apache.tools.ant.Main.runBuild(Main.java:801)
 at org
.apache.tools.ant.Main.startAnt(Main.java:218)
 at org
.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
 at org
.apache.tools.ant.launch.Launcher.main(Launcher.java:109)


I'm using the latest jacoco-0.7.3.201502191951.zip 
I've read https://github.com/jacoco/jacoco/issues/95 and something of 'fork="true" forkmode="once"' what makes me believe that merging results from different JVM instances is not intended to work. Am I right or what am I doing wrong?

Regards
Jörg

Marc Hoffmann

unread,
Feb 24, 2015, 3:44:13 AM2/24/15
to jac...@googlegroups.com
Hi,

unfortunatelly we introduced a incompatibility in exec file format
between JaCoCo 0.7.2 and 0.7.3, see
https://github.com/jacoco/jacoco/issues/286

This problem currently happens when you merge exec data created from a
0.7.2 and 0.7.3 agent.

Possible workarounds:

1) Use a single version of the JaCoCo agent only
2) Wait a couple of days until we publish a fixed version 0.7.4 which
will be compatible with 0.7.2 again.

Sorry for the inconvenience,
-marc
> --
> 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/715e89c6-435a-47f3-a35c-82f64a5d41a6%40googlegroups.com
> [1].
> For more options, visit https://groups.google.com/d/optout [2].
>
>
> Links:
> ------
> [1]
> https://groups.google.com/d/msgid/jacoco/715e89c6-435a-47f3-a35c-82f64a5d41a6%40googlegroups.com?utm_medium=email&utm_source=footer
> [2] https://groups.google.com/d/optout

Jörg Büsse

unread,
Feb 24, 2015, 3:55:22 AM2/24/15
to jac...@googlegroups.com
Hi,

I'm using the same 0.7.3 agent version on both machines and get the incompatibility error.
Also tried an older jacoco version 0.5.9 and the same error occured.
Both machines are also running the tests with the same Java Version.

java version "1.7.0_72"
Java(TM) SE Runtime Environment (build 1.7.0_72-b14)
Java HotSpot(TM) Server VM (build 24.72-b04, mixed mode)

Regards Jörg

Marc Hoffmann

unread,
Feb 24, 2015, 5:16:19 AM2/24/15
to jac...@googlegroups.com
Hi Joerg,

are you sure there are absolutely no old exec files from previous JaCoCo
versions which get merged?

Best regards,
-marc


On 2015-02-24 09:55, Jörg Büsse wrote:
> Hi,
>
> I'm using the same 0.7.3 agent version on both machines and get the
> incompatibility error.
> Also tried an older jacoco version 0.5.9 and the same error occured.
> Both machines are also running the tests with the same Java Version.
>
> java version "1.7.0_72"
> Java(TM) SE Runtime Environment (build 1.7.0_72-b14)
> Java HotSpot(TM) Server VM (build 24.72-b04, mixed mode)
>
> Regards Jörg
>
> Am Dienstag, 24. Februar 2015 09:44:13 UTC+1 schrieb Marc R. Hoffmann:
>
>> Hi,
>>
>> unfortunatelly we introduced a incompatibility in exec file format
>> between JaCoCo 0.7.2 and 0.7.3, see
>> https://github.com/jacoco/jacoco/issues/286 [1]
>>> I've read https://github.com/jacoco/jacoco/issues/95 [2] and
>> something of
>>> 'fork="true" forkmode="once"' what makes me believe that merging
>>> results from different JVM instances is not intended to work. Am I
>>
>>> right or what am I doing wrong?
>>>
>>> Regards
>>> Jörg
>>>
>>> --
>>> 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/715e89c6-435a-47f3-a35c-82f64a5d41a6%40googlegroups.com
>> [3]
>>> [1].
>>> For more options, visit https://groups.google.com/d/optout [4]
>> [5]
>>> [2] https://groups.google.com/d/optout [4]
>
> --
> 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/b8bb9c52-814f-49b1-aa0d-b33caab474e3%40googlegroups.com
> [6].
> For more options, visit https://groups.google.com/d/optout [4].
>
>
> Links:
> ------
> [1]
> https://www.google.com/url?q75https%3A%2F%2Fgithub.com%2Fjacoco%2Fjacoco%2Fissues%2F28646sa75D46sntz75146usg75AFQjCNHDHEitD63-gp8PX2TJduEm1HlL-A
> [2]
> https://www.google.com/url?q75https%3A%2F%2Fgithub.com%2Fjacoco%2Fjacoco%2Fissues%2F9546sa75D46sntz75146usg75AFQjCNGKjl95dkqiRZIigEHagv3tNolFlQ
> [3]
> https://groups.google.com/d/msgid/jacoco/715e89c6-435a-47f3-a35c-82f64a5d41a6%40googlegroups.com
> [4] https://groups.google.com/d/optout
> [5]
> https://groups.google.com/d/msgid/jacoco/715e89c6-435a-47f3-a35c-82f64a5d41a6%40googlegroups.com?utm_medium75email46utm_source75footer
> [6]
> https://groups.google.com/d/msgid/jacoco/b8bb9c52-814f-49b1-aa0d-b33caab474e3%40googlegroups.com?utm_medium=email&utm_source=footer

Jörg Büsse

unread,
Feb 24, 2015, 6:06:29 AM2/24/15
to jac...@googlegroups.com
Shame on me. You're absolutly right. It seems the jacoco.exec files from previous runs wasn't deleted correctly.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages