RFR: 8230943: False deadlock detection with -XX:+CIPrintCompileQueue after JDK-8163511

Jie Fu fujie at loongson.cn
Sat Sep 14 03:26:24 UTC 2019


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?

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