we have a web application run by Glassfish using four clusters. Using the Glassfish configuration, we have attached JaCoCo as Java agent to each of these clusters. So far everything works as expected: We get four exec-files, each of which contains the execution data for one of our clusters.
Now, our problem is: the data are incomplete. There are methods that were definitely executed but are not recorded as such by JaCoCo. We have verified the execution with the debugger and breakpoints, but JaCoCo does not recognize these methods as executed. Here is some additional info:
- A great deal of the webapp's methods are correctly recognized as executed, others are not. So it seems to work 'partly'. We were not able to identify a pattern.
- We have disabled all others agents that might conflict with JaCoCo.
- JaCoCo is 0.7.7.
- The compiled and runtime version of the classes is the same (no runtime magic that modifies the classes).
- It's not a matter of report generation. We've checked the data via the Java API directly in the exec-files.
- There are no processes or other JVMs spawned that might run without JaCoCo attached.
After some days of debugging, we ran out of ideas what might cause JaCoCo to not record some of our methods. If someone has an idea, we would be very thankful.
Thanks in advance,
Nils
We are talking about complete classes where JaCoCo sees all methods as not executed (although some were executed).
Unfortunately, I cannot provide screenshots due to disclosure reasons, but if you tell me which information you look for, I try to provide it to you. We have not created a report yet, because the execution data is already incomplete in the exec files.
--
You received this message because you are subscribed to a topic in the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jacoco/9UUoA28GvB8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/486db23d-8bdc-4d16-83aa-78ac9744cdd8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
just to inform you, the problem was that there was in fact JaCoCo 0.7.6 still enabled in one central location. So essentially we were affected by https://github.com/jacoco/jacoco/pull/397 and did not recognize that all our trace files are broken.
The reason for the files being broken/incomplete is that Glassfish kills every JVM process 120 seconds after sending the shutdown signal. So JaCoCo does not manage to dump the execution data in these two minutes (it writes approx. 250 Kb per minute). I suspect, however, that this is not a JaCoCo problem but a network issue (data are written to a network share).