Alex Rivera | Logout

Is there a static analysis tool which automatically checks for race conditions in Java projects?

Asked 2012-01-27T18:13:58.480
8

Is there a static analysis tool which automatically checks for race conditions in Java projects? Preferably the one supporting Eclipse, Spring and Hibernate. Thanks

EDIT: I may need not necessarily a static analysis tool but maybe a tool which runs the java threads (at least JUnit) with different random speed and also can reproduce the same speed profile under debugger. So, almost any way of detecting race conditions would be helpful.

Edit
Report

1 Answer

0

I haven't used the product personally, but I thought of Corensic Jinx when you wrote that you are looking for "a tool which runs the Java threads (at least JUnit) with different random speed". According to Corensic's product description page, Jinx observes threading operations at the native OS thread level and "dynamically builds a set of potential interleavings (i.e., alternate eventualities, or execution scenarios, that will occur under some future set of conditions) that are most likely to result in concurrency faults, and quickly tests those execution paths to surface concurrency problems including deadlocks, race conditions, and atomicity violations."

This might be too low-level for an all-Java application, but Corensic claims to support Java and Microsoft .NET applications.

See Using Jinx with Java

answered 2012-02-06T15:43:08.257

Your Answer