This is an exploratory task to experiment with ThreadSanitizer in Hotspot and see if it is actually useful. Note that this is not related to the WIP JEP related to ThreadSanitizer for Java, this is purely for Hotspot itself. There are doubts on its potential usefulness due to some of the algorithms used in Hotspot not being compatible with what ThreadSanitizer supports or understands, potentially leading to lots of false positives.
In order to make it work, we would need to instrument all custom synchronization primitives (not pthread) and replace the hand rolled atomic code with `__atomic_*`.
If after experimentation ThreadSanitizer proves useful, we will facilitate further discussion based on the findings and changes required, and move forward based on the outcome of those discussions. If it does not prove useful, we will document our findings so that future contributors are aware and can avoid attempting the same thing unless something changes.
In order to make it work, we would need to instrument all custom synchronization primitives (not pthread) and replace the hand rolled atomic code with `__atomic_*`.
If after experimentation ThreadSanitizer proves useful, we will facilitate further discussion based on the findings and changes required, and move forward based on the outcome of those discussions. If it does not prove useful, we will document our findings so that future contributors are aware and can avoid attempting the same thing unless something changes.
- relates to
-
JDK-8221853 Data race in compile broker (set_last_compile)
-
- Resolved
-
-
JDK-8208520 Java Thread Sanitizer
-
- Draft
-