Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kover agent Issue #672

Open
Mike-Wazovsky opened this issue Aug 13, 2024 · 4 comments
Open

Kover agent Issue #672

Mike-Wazovsky opened this issue Aug 13, 2024 · 4 comments
Assignees
Labels
Bug Bug issue type S: confirmed Status: bug is reproduced or present

Comments

@Mike-Wazovsky
Copy link

In our project we use Kover with the Kotlin compiler. Specifically, we using the JVM instrumentation agent mode. Our use case is as follows:

We have N Kotlin files that we sequentially compile using kotlinc with the Kover Agent. After each compilation, we execute java -jar kover-cli.jar report to generate a report in XML format.

We use the agent with the argument:
report.append=true

This way, we expect the data to accumulate.

Version: 0.8.3 latest release on the github.

Bug:

When we perform multiple compilations, the cumulative coverage result sometimes resets to zero. This occurs at random intervals, approximately 2-4 times out of 300 files.

This issue appear even if we repeatedly compile the same Kotlin file in a loop. I have attached a zip file with all the data collected during run, including all .ic files generated after each cycle, the jar files used by us, the code being executed, and the algorithm performing the described tasks.

The error occurred in the .ic files numbered 87, 103, and 107. They take up 0 bytes, unlike all the others, so we assume that this has something to do with corruption and an error when writing the file.

We are currently at a stage in our project where we are trying to set up coverage measurement. Therefore, it would be nice to understand what might be causing this issue and whether there are any potential fixes or workarounds we can apply on our end.

@Mike-Wazovsky Mike-Wazovsky added Bug Bug issue type S: untriaged Status: issue reported but unprocessed labels Aug 13, 2024
@Mike-Wazovsky
Copy link
Author

@shanshin
Copy link
Collaborator

Hi,
as a workaround, is it acceptable for you not to combine all binary reports into one, but to save each of them and pass all .ic files to kover-cli.jar report?

@Mike-Wazovsky
Copy link
Author

Hi, as a workaround, is it acceptable for you not to combine all binary reports into one, but to save each of them and pass all .ic files to kover-cli.jar report?

In our use case we expect to run about 10^5 kotlin files. Won't this have a critical impact on the execution time?

@zuevmaxim
Copy link

@Mike-Wazovsky In terms of time it could be even faster, as in this case all the files will be written independently. While with the report.append=true option, different subprocesses are awaiting one another to write into a single file.

It will take more disk space, as the data inside these files is duplicated, but it will be much less error-prone.

@shanshin shanshin added S: confirmed Status: bug is reproduced or present and removed S: untriaged Status: issue reported but unprocessed labels Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug issue type S: confirmed Status: bug is reproduced or present
Projects
None yet
Development

No branches or pull requests

3 participants