RFR: 8230943: False deadlock detection with -XX:+CIPrintCompileQueue after JDK-8163511
David Holmes
david.holmes at oracle.com
Sun Sep 15 13:08:56 UTC 2019
Hi Jie,
On 14/09/2019 1:26 pm, Jie Fu wrote:
> Hi all,
>
> JBS: https://bugs.openjdk.java.net/browse/JDK-8230943
> Webrev: http://cr.openjdk.java.net/~jiefu/8230943/webrev.00/
>
> When dumping the compile queue with CIPrintCompileQueue, the thread will
> first acquire the tty_lock[1] with rank 3 and then may require the JNI
> weak alloc lock[2] with rank 7, which may break the deadlock avoidance
> rules[3].
>
> I've learned from David that it seems impossible to assign a tty lock
> ranking that will always work.
> And I think the stringStream is good enough to fix this specific issue,
> which was inspired by Kim.
>
> Thanks David and Kim for your help.
> For more info., please see the comments by them in the JBS.
>
> Could you please review it and give me some advice?
The code looks quite reasonable to me. I'm unclear if there may be any
limitations with using the stringstream. The proof of this will be in
the testing/use.
Thanks,
David
> Thanks a lot.
> Best regards,
> Jie
>
> [1]
> http://hg.openjdk.java.net/jdk/jdk/file/79186d82463e/src/hotspot/share/compiler/compileBroker.cpp#l560
>
> [2]
> http://hg.openjdk.java.net/jdk/jdk/file/79186d82463e/src/hotspot/share/gc/shared/oopStorage.cpp#l913
>
> [3]
> http://hg.openjdk.java.net/jdk/jdk/file/79186d82463e/src/hotspot/share/runtime/mutex.cpp#l385
>
>
>
More information about the hotspot-compiler-dev
mailing list