hcoles / pitest

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

After upgrading from 1.1.5 to 1.1.6 my build hangs #231

Closed velo closed 9 years ago

velo commented 9 years ago

So, I was using pitest-maven-plugin 1.1.5 and all was good.

When I decided to move to 1.1.6 my build hangs (waited for 3 hours, still no result)

[INFO] --- pitest-maven:1.1.6:mutationCoverage (default) @ sonarcloud-github ---
[INFO] Found plugin : Default csv report plugin
[INFO] Found plugin : Default xml report plugin
[INFO] Found plugin : Default html report plugin
[INFO] Found plugin : Default limit mutations plugin
[INFO] Found shared classpath plugin : Default mutation engine
[INFO] Adding org.pitest:pitest to SUT classpath
[INFO] Mutating from C:\Users\Marvin\sonarcloud-workspace\sonarcloud\sonarcloud-github\target\classes
12:38:34 PIT >> FINE : Running report with ReportOptions [targetClasses=[^io\.sonarcloud.*$], excludedMethods=[], excludedClasses=[^EndToEndIT$, ^GithubDownloadRouteBuilderTest$], codePaths=[C:\Users\Marvin\sonarcloud-workspace\sonarcloud\sonarcloud-github\target\classes], reportDir=C:\Users\Marvin\sonarcloud-workspace\sonarcloud\sonarcloud-github\target\pit-reports, historyInputLocation=C:\Users\Marvin\sonarcloud-workspace\sonarcloud\sonarcloud-github\.mvn\pitest.history, historyOutputLocation=C:\Users\Marvin\sonarcloud-workspace\sonarcloud\sonarcloud-github\.mvn\pitest.history, sourceDirs=[C:\Users\Marvin\sonarcloud-workspace\sonarcloud\sonarcloud-github\src\main\java, C:\Users\Marvin\sonarcloud-workspace\sonarcloud\sonarcloud-github\target\generated-sources\annotations, C:\Users\Marvin\sonarcloud-workspace\sonarcloud\sonarcloud-github\src\test\java, C:\Users\Marvin\sonarcloud-workspace\sonarcloud\sonarcloud-github\target\generated-test-sources\test-annotations], classPathElements=[C:\Users\Marvin\sonarcloud-workspace\sonarcloud\sonarcloud-github\target\test-classes, C:\Users\Marvin\sonarcloud-workspace\sonarcloud\sonarcloud-github\target\classes, C:\Users\Marvin\.m2\repository\org\apache\camel\camel-core\2.15.3\camel-core-2.15.3.jar, C:\Users\Marvin\.m2\repository\org\slf4j\slf4j-api\1.6.6\slf4j-api-1.6.6.jar, C:\Users\Marvin\.m2\repository\com\sun\xml\bind\jaxb-core\2.2.11\jaxb-core-2.2.11.jar, C:\Users\Marvin\.m2\repository\com\sun\xml\bind\jaxb-impl\2.2.11\jaxb-impl-2.2.11.jar, C:\Users\Marvin\.m2\repository\org\apache\camel\camel-http\2.15.3\camel-http-2.15.3.jar, C:\Users\Marvin\.m2\repository\org\apache\geronimo\specs\geronimo-servlet_3.0_spec\1.0\geronimo-servlet_3.0_spec-1.0.jar, C:\Users\Marvin\.m2\repository\commons-httpclient\commons-httpclient\3.1\commons-httpclient-3.1.jar, C:\Users\Marvin\.m2\repository\commons-codec\commons-codec\1.10\commons-codec-1.10.jar, C:\Users\Marvin\.m2\repository\org\apache\camel\camel-jetty9\2.15.3\camel-jetty9-2.15.3.jar, C:\Users\Marvin\.m2\repository\org\apache\camel\camel-jetty-common\2.15.3\camel-jetty-common-2.15.3.jar, C:\Users\Marvin\.m2\repository\org\eclipse\jetty\jetty-server\9.2.10.v20150310\jetty-server-9.2.10.v20150310.jar, C:\Users\Marvin\.m2\repository\javax\servlet\javax.servlet-api\3.1.0\javax.servlet-api-3.1.0.jar, C:\Users\Marvin\.m2\repository\org\eclipse\jetty\jetty-http\9.2.10.v20150310\jetty-http-9.2.10.v20150310.jar, C:\Users\Marvin\.m2\repository\org\eclipse\jetty\jetty-io\9.2.10.v20150310\jetty-io-9.2.10.v20150310.jar, C:\Users\Marvin\.m2\repository\org\eclipse\jetty\jetty-servlet\9.2.10.v20150310\jetty-servlet-9.2.10.v20150310.jar, C:\Users\Marvin\.m2\repository\org\eclipse\jetty\jetty-security\9.2.10.v20150310\jetty-security-9.2.10.v20150310.jar, C:\Users\Marvin\.m2\repository\org\eclipse\jetty\jetty-servlets\9.2.10.v20150310\jetty-servlets-9.2.10.v20150310.jar, C:\Users\Marvin\.m2\repository\org\eclipse\jetty\jetty-continuation\9.2.10.v20150310\jetty-continuation-9.2.10.v20150310.jar, C:\Users\Marvin\.m2\repository\org\eclipse\jetty\jetty-util\9.2.10.v20150310\jetty-util-9.2.10.v20150310.jar, C:\Users\Marvin\.m2\repository\org\eclipse\jetty\jetty-client\9.2.10.v20150310\jetty-client-9.2.10.v20150310.jar, C:\Users\Marvin\.m2\repository\org\eclipse\jetty\jetty-jmx\9.2.10.v20150310\jetty-jmx-9.2.10.v20150310.jar, C:\Users\Marvin\.m2\repository\org\apache\camel\camel-exec\2.15.3\camel-exec-2.15.3.jar, C:\Users\Marvin\.m2\repository\org\apache\commons\commons-exec\1.3\commons-exec-1.3.jar, C:\Users\Marvin\.m2\repository\commons-io\commons-io\2.4\commons-io-2.4.jar, C:\Users\Marvin\.m2\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar, C:\Users\Marvin\.m2\repository\org\apache\camel\camel-velocity\2.15.3\camel-velocity-2.15.3.jar, C:\Users\Marvin\.m2\repository\org\apache\velocity\velocity\1.7\velocity-1.7.jar, C:\Users\Marvin\.m2\repository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar, C:\Users\Marvin\.m2\repository\org\apache\camel\camel-context\2.15.3\camel-context-2.15.3.jar, C:\Users\Marvin\.m2\repository\com\google\guava\guava\18.0\guava-18.0.jar, C:\Users\Marvin\.m2\repository\org\jooq\jool\0.9.7\jool-0.9.7.jar, C:\Users\Marvin\.m2\repository\org\slf4j\slf4j-log4j12\1.7.12\slf4j-log4j12-1.7.12.jar, C:\Users\Marvin\.m2\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar, C:\Users\Marvin\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.12\jcl-over-slf4j-1.7.12.jar, C:\Users\Marvin\.m2\repository\org\projectlombok\lombok\1.16.6\lombok-1.16.6.jar, C:\Users\Marvin\.m2\repository\org\glassfish\javax.json\1.0.4\javax.json-1.0.4.jar, C:\Users\Marvin\.m2\repository\com\orientechnologies\orientdb-server\2.1.2\orientdb-server-2.1.2.jar, C:\Users\Marvin\.m2\repository\com\orientechnologies\orientdb-client\2.1.2\orientdb-client-2.1.2.jar, C:\Users\Marvin\.m2\repository\com\orientechnologies\orientdb-enterprise\2.1.2\orientdb-enterprise-2.1.2.jar, C:\Users\Marvin\.m2\repository\javax\mail\mail\1.4\mail-1.4.jar, C:\Users\Marvin\.m2\repository\javax\activation\activation\1.1\activation-1.1.jar, C:\Users\Marvin\.m2\repository\com\orientechnologies\orientdb-graphdb\2.1.2\orientdb-graphdb-2.1.2.jar, C:\Users\Marvin\.m2\repository\com\orientechnologies\orientdb-tools\2.1.2\orientdb-tools-2.1.2.jar, C:\Users\Marvin\.m2\repository\com\orientechnologies\orientdb-object\2.1.2\orientdb-object-2.1.2.jar, C:\Users\Marvin\.m2\repository\org\hibernate\javax\persistence\hibernate-jpa-2.0-api\1.0.0.Final\hibernate-jpa-2.0-api-1.0.0.Final.jar, C:\Users\Marvin\.m2\repository\org\javassist\javassist\3.16.1-GA\javassist-3.16.1-GA.jar, C:\Users\Marvin\.m2\repository\com\orientechnologies\orientdb-core\2.1.2\orientdb-core-2.1.2.jar, C:\Users\Marvin\.m2\repository\org\xerial\snappy\snappy-java\1.1.0.1\snappy-java-1.1.0.1.jar, C:\Users\Marvin\.m2\repository\com\googlecode\concurrentlinkedhashmap\concurrentlinkedhashmap-lru\1.4.1\concurrentlinkedhashmap-lru-1.4.1.jar, C:\Users\Marvin\.m2\repository\net\java\dev\jna\jna\4.0.0\jna-4.0.0.jar, C:\Users\Marvin\.m2\repository\net\java\dev\jna\jna-platform\4.0.0\jna-platform-4.0.0.jar, C:\Users\Marvin\.m2\repository\com\tinkerpop\blueprints\blueprints-core\2.6.0\blueprints-core-2.6.0.jar, C:\Users\Marvin\.m2\repository\org\codehaus\jettison\jettison\1.3.3\jettison-1.3.3.jar, C:\Users\Marvin\.m2\repository\stax\stax-api\1.0.1\stax-api-1.0.1.jar, C:\Users\Marvin\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.2.3\jackson-databind-2.2.3.jar, C:\Users\Marvin\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.2.3\jackson-annotations-2.2.3.jar, C:\Users\Marvin\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.2.3\jackson-core-2.2.3.jar, C:\Users\Marvin\.m2\repository\com\carrotsearch\hppc\0.6.0\hppc-0.6.0.jar, C:\Users\Marvin\.m2\repository\commons-configuration\commons-configuration\1.6\commons-configuration-1.6.jar, C:\Users\Marvin\.m2\repository\commons-digester\commons-digester\1.8\commons-digester-1.8.jar, C:\Users\Marvin\.m2\repository\commons-beanutils\commons-beanutils\1.7.0\commons-beanutils-1.7.0.jar, C:\Users\Marvin\.m2\repository\commons-beanutils\commons-beanutils-core\1.8.0\commons-beanutils-core-1.8.0.jar, C:\Users\Marvin\.m2\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar, C:\Users\Marvin\.m2\repository\com\tinkerpop\gremlin\gremlin-java\2.6.0\gremlin-java-2.6.0.jar, C:\Users\Marvin\.m2\repository\com\tinkerpop\pipes\2.6.0\pipes-2.6.0.jar, C:\Users\Marvin\.m2\repository\com\tinkerpop\gremlin\gremlin-groovy\2.6.0\gremlin-groovy-2.6.0.jar, C:\Users\Marvin\.m2\repository\org\apache\ivy\ivy\2.3.0\ivy-2.3.0.jar, C:\Users\Marvin\.m2\repository\org\codehaus\groovy\groovy\1.8.9\groovy-1.8.9.jar, C:\Users\Marvin\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar, C:\Users\Marvin\.m2\repository\asm\asm\3.2\asm-3.2.jar, C:\Users\Marvin\.m2\repository\asm\asm-commons\3.2\asm-commons-3.2.jar, C:\Users\Marvin\.m2\repository\asm\asm-util\3.2\asm-util-3.2.jar, C:\Users\Marvin\.m2\repository\asm\asm-analysis\3.2\asm-analysis-3.2.jar, C:\Users\Marvin\.m2\repository\asm\asm-tree\3.2\asm-tree-3.2.jar, C:\Users\Marvin\.m2\repository\org\apache\ant\ant\1.8.3\ant-1.8.3.jar, C:\Users\Marvin\.m2\repository\org\apache\ant\ant-launcher\1.8.3\ant-launcher-1.8.3.jar, C:\Users\Marvin\.m2\repository\org\fusesource\jansi\jansi\1.5\jansi-1.5.jar, C:\Users\Marvin\.m2\repository\jline\jline\0.9.94\jline-0.9.94.jar, C:\Users\Marvin\.m2\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar, C:\Users\Marvin\.m2\repository\org\hamcrest\hamcrest-integration\1.3\hamcrest-integration-1.3.jar, C:\Users\Marvin\.m2\repository\org\hamcrest\hamcrest-library\1.3\hamcrest-library-1.3.jar, C:\Users\Marvin\.m2\repository\org\apache\camel\camel-test\2.15.3\camel-test-2.15.3.jar, C:\Users\Marvin\.m2\repository\junit\junit\4.12\junit-4.12.jar, C:\Users\Marvin\.m2\repository\org\mockito\mockito-core\1.10.19\mockito-core-1.10.19.jar, C:\Users\Marvin\.m2\repository\org\objenesis\objenesis\2.1\objenesis-2.1.jar, C:\Users\Marvin\.m2\repository\org\powermock\powermock-api-mockito\1.6.2\powermock-api-mockito-1.6.2.jar, C:\Users\Marvin\.m2\repository\org\powermock\powermock-api-support\1.6.2\powermock-api-support-1.6.2.jar, C:\Users\Marvin\.m2\repository\org\powermock\powermock-core\1.6.2\powermock-core-1.6.2.jar, C:\Users\Marvin\.m2\repository\org\powermock\powermock-reflect\1.6.2\powermock-reflect-1.6.2.jar, C:\Users\Marvin\.m2\repository\com\jayway\jsonpath\json-path-assert\2.0.0\json-path-assert-2.0.0.jar, C:\Users\Marvin\.m2\repository\com\jayway\jsonpath\json-path\2.0.0\json-path-2.0.0.jar, C:\Users\Marvin\.m2\repository\net\minidev\json-smart\2.1.1\json-smart-2.1.1.jar, C:\Users\Marvin\.m2\repository\net\minidev\asm\1.0.2\asm-1.0.2.jar, C:\Users\Marvin\.m2\repository\com\marvinformatics\kiss-matchers\0.15\kiss-matchers-0.15.jar, C:\Users\Marvin\.m2\repository\com\marvinformatics\kiss-throws\0.10\kiss-throws-0.10.jar, C:\Users\Marvin\.m2\repository\com\github\stefanbirkner\system-rules\1.7.0\system-rules-1.7.0.jar, C:\Users\Marvin\.m2\repository\org\pitest\pitest\1.1.6\pitest-1.1.6.jar], mutators=[], dependencyAnalysisMaxDistance=-1, mutateStaticInitializers=false, jvmArgs=[], numberOfThreads=4, timeoutFactor=1.25, timeoutConstant=3000, targetTests=[^io\.sonarcloud.*$], loggingClasses=[java.util.logging, org.apache.log4j, org.slf4j, org.apache.commons.logging], maxMutationsPerClass=-1, verbose=true, failWhenNoMutations=true, outputs=[HTML], groupConfig=TestGroupConfig [excludedGroups=[], includedGroups=[]], mutationUnitSize=0, shouldCreateTimestampedReports=false, detectInlinedCode=true, exportLineCoverage=false, mutationThreshold=0, coverageThreshold=0, mutationEngine=gregor, javaExecutable=null, includeLaunchClasspath=true]
12:38:34 PIT >> FINE : System class path is C:\opt\maven/boot/plexus-classworlds-2.5.2.jar
12:38:34 PIT >> FINE : Maximum available memory is 3625 mb
12:38:34 PIT >> FINE : using port 8092
12:38:35 PIT >> INFO : Sending 20 test classes to slave
12:38:35 PIT >> INFO : Sent tests to slave

And that is it.

pom.xml

<plugin>
    <groupId>org.pitest</groupId>
    <artifactId>pitest-maven</artifactId>
    <version>1.1.6</version>
    <executions>
        <execution>
            <phase>integration-test</phase>
            <goals>
                <goal>mutationCoverage</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <targetClasses>
            <param>io.sonarcloud*</param>
        </targetClasses>
        <targetTests>
            <param>io.sonarcloud*</param>
        </targetTests>
        <avoidCallsTo>
            <avoidCallsTo>java.util.logging</avoidCallsTo>
            <avoidCallsTo>org.apache.log4j</avoidCallsTo>
            <avoidCallsTo>org.slf4j</avoidCallsTo>
            <avoidCallsTo>org.apache.commons.logging</avoidCallsTo>
        </avoidCallsTo>
        <threads>4</threads>
        <mutationThreshold>95</mutationThreshold>
        <verbose>true</verbose>
        <timestampedReports>false</timestampedReports>
        <historyInputFile>${project.basedir}/.mvn/pitest.history</historyInputFile>
        <historyOutputFile>${project.basedir}/.mvn/pitest.history</historyOutputFile>
    </configuration>
</plugin>

Is there any other information that I can provide?

agzamovr commented 9 years ago

I have the same issue. I use gradle plugin and it works only if property targetClasses has narrower package to check (e.g. com.my.auction.core.crypto.* instead of **com.my.auction.***).

hcoles commented 9 years ago

This may be the same issue as

https://github.com/hcoles/triangle-example/issues/1

If you disable verbose logging do you still experience the hang?

agzamovr commented 9 years ago

Not helped. This is my confog in gradle:

pitest {
    targetClasses = ['com.bas.auction.core.*']  //by default "${project.group}.*"
    threads = 4
    maxMutationsPerClass = 2
    excludedMethods = ['hasCode', 'equals']
    outputFormats = ['HTML']
    jvmArgs = ['-Xmx1024m']
    verbose = false
}

It hangs without any observable activity (i.e. cpu is idle)

hcoles commented 9 years ago

@agzamovr I think you may be experiencing a different issue than @velo - could you raise it under a separate defect.

velo commented 9 years ago

Makes no difference. With or without verbose it hangs

hcoles commented 9 years ago

@velo I've just pushed a 1.1.7-SNAPSHOT to the sonatype snapshot repo (https://oss.sonatype.org/content/repositories/snapshots/org/pitest/)

Can you confirm if you can still reproduce the issue using the snapshot?

velo commented 9 years ago

SUCCESS!!

hcoles commented 9 years ago

@velo Excellent, I'll push a release out soon.

Thanks for the report.

velo commented 9 years ago

Outstanding, thanks @hcoles

hcoles commented 9 years ago

Fixed in 1.1.7

Kidlike commented 8 years ago

Thank you for this... I was actually hitting this issue very often, but I thought that it was an issue with how my tests were written. This makes pitest actually usable :)