RFR: 8273608: Deadlock when jcmd of OnError attaches to itself [v2]
Coleen Phillimore
coleenp at openjdk.java.net
Tue Oct 5 20:00:13 UTC 2021
On Tue, 5 Oct 2021 18:14:07 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> My point is that the code to process the `_mutex_array` should be in a `#else` so that we don't build it or use for debug builds. So a debug build uses `owned_locks()` while a release build uses `_mutex_array`.
>
> Sorry if I missed part of the conversation, but why two different implementations? Why not use _mutex_array always? I dislike having different code in debug and release builds.
https://bugs.openjdk.java.net/browse/JDK-8274794 I also think we should have _owned_locks available in product.
I experimented with adding a mutex_array when we create mutex but this requires synchronization on mutex_array, with potentially a mutex, especially if it's a growable array. Also, we create and delete Mutex so the array would have to allow deletion. Just making owned_locks available in product would be really nice, so I filed a bug.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5590
More information about the hotspot-dev
mailing list