hcoles / pitest

State of the art mutation testing system for the JVM
Apache License 2.0
1.65k stars 351 forks source link

Mutation Coverage failure w/ AspectJ compile-time weaving plus woven deps #1318

Open eoliphan opened 3 months ago

eoliphan commented 3 months ago

Hi, just ran into the fatal error below that seems to arise from a very specific config.

[ERROR] Failed to execute goal org.pitest:pitest-maven:1.15.8:mutationCoverage (default-cli) on project gs-security-aspects: Execution default-cli of goal org.pitest:pitest-maven:1.15.8:mutationCoverage failed: Coverage generation minion exited abnormally! (UNKNOWN_ERROR)
[ERROR] 
[ERROR] Please copy and paste the information and the complete stacktrace below when reporting an issue
[ERROR] VM : OpenJDK 64-Bit Server VM
[ERROR] Vendor : Amazon.com Inc.
[ERROR] Version : 25.402-b06
[ERROR] Uptime : 10888
[ERROR] Input -> 
[ERROR]  1 : -Dclassworlds.conf=/home/eoliphant/.sdkman/candidates/maven/current/bin/m2.conf
[ERROR]  2 : -Dmaven.home=/home/eoliphant/.sdkman/candidates/maven/current
[ERROR]  3 : -Dlibrary.jansi.path=/home/eoliphant/.sdkman/candidates/maven/current/lib/jansi-native
[ERROR]  4 : -Dmaven.multiModuleProjectDirectory=/home/eoliphant/IdeaProjects/gs-security-aspects
[ERROR] BootClassPathSupported : true
[ERROR] 
[ERROR] 
[ERROR] Please copy and paste the information and the complete stacktrace below when reporting an issue
[ERROR] VM : OpenJDK 64-Bit Server VM
[ERROR] Vendor : Amazon.com Inc.
[ERROR] Version : 25.402-b06
[ERROR] Uptime : 10889
[ERROR] Input -> 
[ERROR]  1 : -Dclassworlds.conf=/home/eoliphant/.sdkman/candidates/maven/current/bin/m2.conf
[ERROR]  2 : -Dmaven.home=/home/eoliphant/.sdkman/candidates/maven/current
[ERROR]  3 : -Dlibrary.jansi.path=/home/eoliphant/.sdkman/candidates/maven/current/lib/jansi-native
[ERROR]  4 : -Dmaven.multiModuleProjectDirectory=/home/eoliphant/IdeaProjects/gs-security-aspects
[ERROR] BootClassPathSupported : true

I have an aspect library we use to patch security defects in legacy libs like Struts while we move our old apps off of them. Til now my unit tests just exercised the classes that did the real work (actually found a couple weaknesses w/ PiTest, thank you ;)), that the aspects call. Today i added some tests to validate the aspectj weaving via the pointcuts, and encountered this problem. So with the following config for the maven-aspectj-plugin, it applies my aspects to the struts binaries but seems to make pitest unhappy. I'll try to make a scaled down version of the project if that helps

..
 <execution>
            <id>test-compile</id>
            <configuration>
              <weaveDependencies>
                <weaveDependency>
                  <groupId>struts</groupId>
                  <artifactId>struts</artifactId>
                </weaveDependency>
              </weaveDependencies>
            </configuration>
            <goals>
              <goal>test-compile</goal>
            </goals>
          </execution>
...
hcoles commented 3 months ago

Hi @eoliphan,

If you create a minimal project that reproduces the issue I can take look.