Fray Detects Concurrency Issues in JVM Languages
Briefly

Fray Detects Concurrency Issues in JVM Languages
"Carnegie Mellon University has introduced Fray, a concurrency testing tool for JVM programs to catch bugs and replay them. Written in Kotlin and based on this research paper, Fray can't find all concurrency issues, but uses recent research to maximize the chances of detecting them. Fray uses shadow locking, a technique that incorporates extra locks to mediate access to shared resources in a specific order."
"The following plugin and dependency configuration is required for Maven: <plugin> <groupId>org.pastalab.fray.maven</groupId> <artifactId>fray-plugins-maven</artifactId> <version>0.6.9</version> <executions> <execution> <id>prepare-fray</id> <goals> <goal>prepare-fray</goal> </goals> </execution> </executions> </plugin> <dependency> <groupId>org.pastalab.fray</groupId> <artifactId>fray-junit</artifactId> <version>0.6.9</version> <scope>test</scope> </dependency> Alternatively, the following plugin configuration can be used for Gradle: plugins { id("org.pastalab.fray.gradle") version "0.6.9" } After configuring Gradle, the tests can be run with the following command: ./gradlew frayTest Lastly, IntelliJ may be used to run Fray tests by following the IDE documentation on GitHub."
Fray is a Kotlin-based concurrency testing tool for JVM programs that detects and replays multithreading bugs. It leverages shadow locking, adding extra locks to mediate access to shared resources in a deterministic order. Fray supports modern Java versions including JDK 25 and has found bugs in JDK, Lucene, Kafka, Flink and Guava. The framework detects many threading issues but cannot detect bugs caused solely by concurrent memory writes. Build integration is available for Maven and Gradle, and tests run via ./gradlew frayTest or through JUnit 5 with @ExtendWith(FrayTestExtension.class) and @ConcurrencyTest. IntelliJ can run Fray tests per IDE documentation.
Read at InfoQ
Unable to calculate read time
[
|
]