Welcome to the TSAN Project!
The goal of this Project is to explore and incubate a Thread SANitizing (TSAN) feature that could be integrated into the HotSpot JVM and the JVM Tool Interface (JVM TI). This includes working, evaluating, and incubating a Thread Sanitizer implementation for Java.
The rest of this page will provide basic information for downloading, building, and testing Java TSAN.
Note: Java TSAN is not working yet and will not be able to provide any data race information yet. The information below is really how to build/test for developers and testers:
Java TSAN is dependent on the C/C++ ThreadSanitizer implementation for GCC/LLVM. Java TSAN requires a new API for proper symbolization of Java stack traces, which is only available in update-to-date versions of C/C++ ThreadSanitizer. This requires building OpenJDK with LLVM 7.0 or later, or GCC 9 or later. Currently we recommend developers and testers use LLVM 8.0.
Java TSAN implementation is in the "tsan" branch in the Mercurial repository. Developers need to clone this branch:
hg clone --branch tsan http://hg.openjdk.java.net/tsan/dev jdk-tsan
Java TSAN exists as a JVM feature "tsan", which is enabled by default on the "tsan" branch in the repository. It can be disabled with the configure flag "
To build OpenJDK with LLVM, pass the configure flags "
Note: the method of including the TSAN runtime in the JVM is not finalized and could change in the future.
Run Java with TSAN enabled:
The tests for TSAN are at
make jdk-image test-image
make test TEST="hotspot/jtreg/tsan"
Recent space activity