Java proposal would spot data races with a thread sanitizer

Java’s HotSpot virtual machine could be fitted with a race-detection tool and other monitoring capabilities, under a proposal being floated in the OpenJDK community.  A data race in a Java program makes the program incorrectly synchronized, which leads to erroneous, nondeterministic, and unexpected behaviors.

Called the Atlantis Project, the effort would explore possibilities for integrating HotSpot and the JVM tool interface with performance monitoring and analysis capabilities. Key to the proposal is evaluating and incubating a thread sanitizer, which could provide a dynamic data-race detector for Java and JNI code.

The Atlantis Project participants note there is an existing thread sanitizer project for OpenJDK. With that thread sanitizer, data races would be detected in a single execution, with all races found and with no false data races.

The Atlantis Project proposal, from Google’s Jean Christophe Beyler, states that the Google platform team has augmented or added mechanisms for Google Java users to assess metrics including a thread sanitizer and lock-contention profiles to better understand where threads are spending time in locks. The team also has worked on heap-dumping mechanisms to improve dump times for large heaps and efficient thread tagging to help filter profiling.

The Atlantis Project would consider how these changes could be made general enough, whether they should be dropped, or whether to implement them using other existing mechanisms.

This story, “Java proposal would spot data races with a thread sanitizer” was originally published by


Share this post if you enjoyed! 🙂

Source link

Leave a Reply

Your email address will not be published. Required fields are marked *