RFR: 8336421: ciMethod() constructor should use ConditionalMutexLocker(Compile_lock)

Vladimir Kozlov kvn at openjdk.org
Tue Jul 16 04:46:50 UTC 2024


On Tue, 16 Jul 2024 01:01:17 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

> During Leyden testing with `-XX:+LogCompilation` flag I hit assert because `ciMethod()` could be called from `ciEnv::register_method()` which already holds `Compile_lock` lock. See call stack in JBS report.
> Use `ConditionalMutexLocker` in `ciMethod()`.
> This is normal code pattern used in other places where we can have nested locking: [compileBroker.cpp#L2847](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/compiler/compileBroker.cpp#L2847).
> 
> Tested tier1.

There is bug already: [JDK-8335266](https://bugs.openjdk.org/browse/JDK-8335266)

-------------

PR Comment: https://git.openjdk.org/jdk/pull/20187#issuecomment-2230010322


More information about the hotspot-compiler-dev mailing list