Re: [jdk17] RFR: JDK-8266310: deadlock between System.loadLibrary and JNI FindClass loading another class
On Fri, 18 Jun 2021 09:50:49 GMT, Aleksei Voitylov wrote: > Resubmitting the following PR https://github.com/openjdk/jdk/pull/3976 > against JDK17. > > This fixes the deadlock in ClassLoader between the two lock objects - a lock > object associated with the class being loaded, and the > ClassLoader.loadedLibraryNames hash map, locked during the native library > load operation. > > Further details can be found in the original PR. > > Testing: jtreg and jck testing with no regressions. A new regression test was > developed. OK, let it bake in 18 first. - PR: https://git.openjdk.java.net/jdk17/pull/96
Re: [jdk17] RFR: JDK-8266310: deadlock between System.loadLibrary and JNI FindClass loading another class
> On 24 Jun 2021, at 22:27, Mandy Chung wrote: > > On Fri, 18 Jun 2021 09:50:49 GMT, Aleksei Voitylov > wrote: > >> Resubmitting the following PR https://github.com/openjdk/jdk/pull/3976 >> against JDK17. >> >> This fixes the deadlock in ClassLoader between the two lock objects - a lock >> object associated with the class being loaded, and the >> ClassLoader.loadedLibraryNames hash map, locked during the native library >> load operation. >> >> Further details can be found in the original PR. >> >> Testing: jtreg and jck testing with no regressions. A new regression test >> was developed. > > This is a risky area and I agree it needs some bake time. The fix has been > ready for some time but it takes longer than we hope to get this reviewed and > approved (I was one causing the delay). I am not uncomfortable getting this > in JDK 17 but I will not object if others think this should be fixed in JDK > 18 (and backport to 17 update if desirable) as this is a long standing issue > and no urgency to get this fixed. Fixing initially in 18, allowing some “bake” time, then considering a backport to a 17 update, seems prudent. -Chris.
Re: [jdk17] RFR: JDK-8266310: deadlock between System.loadLibrary and JNI FindClass loading another class
On Fri, 18 Jun 2021 09:50:49 GMT, Aleksei Voitylov wrote: > Resubmitting the following PR https://github.com/openjdk/jdk/pull/3976 > against JDK17. > > This fixes the deadlock in ClassLoader between the two lock objects - a lock > object associated with the class being loaded, and the > ClassLoader.loadedLibraryNames hash map, locked during the native library > load operation. > > Further details can be found in the original PR. > > Testing: jtreg and jck testing with no regressions. A new regression test was > developed. This is a risky area and I agree it needs some bake time. The fix has been ready for some time but it takes longer than we hope to get this reviewed and approved (I was one causing the delay). I am not uncomfortable getting this in JDK 17 but I will not object if others think this should be fixed in JDK 18 (and backport to 17 update if desirable) as this is a long standing issue and no urgency to get this fixed. - PR: https://git.openjdk.java.net/jdk17/pull/96
Re: [jdk17] RFR: JDK-8266310: deadlock between System.loadLibrary and JNI FindClass loading another class
On Mon, 21 Jun 2021 13:26:14 GMT, Alan Bateman wrote: >> Resubmitting the following PR https://github.com/openjdk/jdk/pull/3976 >> against JDK17. >> >> This fixes the deadlock in ClassLoader between the two lock objects - a lock >> object associated with the class being loaded, and the >> ClassLoader.loadedLibraryNames hash map, locked during the native library >> load operation. >> >> Further details can be found in the original PR. >> >> Testing: jtreg and jck testing with no regressions. A new regression test >> was developed. > > @voitylov JDK 17 is an RDP 1 and I wonder if this long standing issue is > critical or not. I've skimmed through the changes and I don't see any issue > but if this is really intended for openjdk/jdk17 then I think it would be > useful to have more eyes on it. > @AlanBateman is it ok with you? Okay with me but as a general point I don't think we should be fixing long standing issues in risky areas during RDP1. This is a change that really needs several months of bake time. - PR: https://git.openjdk.java.net/jdk17/pull/96
Re: [jdk17] RFR: JDK-8266310: deadlock between System.loadLibrary and JNI FindClass loading another class
On Mon, 21 Jun 2021 16:49:30 GMT, Mandy Chung wrote: >> Resubmitting the following PR https://github.com/openjdk/jdk/pull/3976 >> against JDK17. >> >> This fixes the deadlock in ClassLoader between the two lock objects - a lock >> object associated with the class being loaded, and the >> ClassLoader.loadedLibraryNames hash map, locked during the native library >> load operation. >> >> Further details can be found in the original PR. >> >> Testing: jtreg and jck testing with no regressions. A new regression test >> was developed. > > @dholmes-ora @ChrisHegarty @plevart reviewed PR openjdk/jdk#3976. Can you > re-review this PR? Thank you @mlchung @dholmes-ora @ChrisHegarty for re-reviews. @AlanBateman is it ok with you? - PR: https://git.openjdk.java.net/jdk17/pull/96
Re: [jdk17] RFR: JDK-8266310: deadlock between System.loadLibrary and JNI FindClass loading another class
On Fri, 18 Jun 2021 09:50:49 GMT, Aleksei Voitylov wrote: > Resubmitting the following PR https://github.com/openjdk/jdk/pull/3976 > against JDK17. > > This fixes the deadlock in ClassLoader between the two lock objects - a lock > object associated with the class being loaded, and the > ClassLoader.loadedLibraryNames hash map, locked during the native library > load operation. > > Further details can be found in the original PR. > > Testing: jtreg and jck testing with no regressions. A new regression test was > developed. Marked as reviewed by chegar (Reviewer). - PR: https://git.openjdk.java.net/jdk17/pull/96
Re: [jdk17] RFR: JDK-8266310: deadlock between System.loadLibrary and JNI FindClass loading another class
On Fri, 18 Jun 2021 09:50:49 GMT, Aleksei Voitylov wrote: > Resubmitting the following PR https://github.com/openjdk/jdk/pull/3976 > against JDK17. > > This fixes the deadlock in ClassLoader between the two lock objects - a lock > object associated with the class being loaded, and the > ClassLoader.loadedLibraryNames hash map, locked during the native library > load operation. > > Further details can be found in the original PR. > > Testing: jtreg and jck testing with no regressions. A new regression test was > developed. I've re-reviewed the locking aspect of this, but can't comment on the NativeLibraryContext changes. Thanks, David - Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk17/pull/96
Re: [jdk17] RFR: JDK-8266310: deadlock between System.loadLibrary and JNI FindClass loading another class
On Mon, 21 Jun 2021 13:26:14 GMT, Alan Bateman wrote: >> Resubmitting the following PR https://github.com/openjdk/jdk/pull/3976 >> against JDK17. >> >> This fixes the deadlock in ClassLoader between the two lock objects - a lock >> object associated with the class being loaded, and the >> ClassLoader.loadedLibraryNames hash map, locked during the native library >> load operation. >> >> Further details can be found in the original PR. >> >> Testing: jtreg and jck testing with no regressions. A new regression test >> was developed. > > @voitylov JDK 17 is an RDP 1 and I wonder if this long standing issue is > critical or not. I've skimmed through the changes and I don't see any issue > but if this is really intended for openjdk/jdk17 then I think it would be > useful to have more eyes on it. @AlanBateman I think it's worth to be included in JDK17 because in case someone hits this (like netty), the impact is high (a framework or an application can't start) and there is no viable workaround without rewriting code. The scope of change in the last version, at the same time, is limited. - PR: https://git.openjdk.java.net/jdk17/pull/96
Re: [jdk17] RFR: JDK-8266310: deadlock between System.loadLibrary and JNI FindClass loading another class
On Fri, 18 Jun 2021 09:50:49 GMT, Aleksei Voitylov wrote: > Resubmitting the following PR https://github.com/openjdk/jdk/pull/3976 > against JDK17. > > This fixes the deadlock in ClassLoader between the two lock objects - a lock > object associated with the class being loaded, and the > ClassLoader.loadedLibraryNames hash map, locked during the native library > load operation. > > Further details can be found in the original PR. > > Testing: jtreg and jck testing with no regressions. A new regression test was > developed. @dholmes-ora @ChrisHegarty @plevart reviewed PR openjdk/jdk#3976. Can you re-review this PR? - PR: https://git.openjdk.java.net/jdk17/pull/96
Re: [jdk17] RFR: JDK-8266310: deadlock between System.loadLibrary and JNI FindClass loading another class
On Fri, 18 Jun 2021 09:50:49 GMT, Aleksei Voitylov wrote: > Resubmitting the following PR https://github.com/openjdk/jdk/pull/3976 > against JDK17. > > This fixes the deadlock in ClassLoader between the two lock objects - a lock > object associated with the class being loaded, and the > ClassLoader.loadedLibraryNames hash map, locked during the native library > load operation. > > Further details can be found in the original PR. > > Testing: jtreg and jck testing with no regressions. A new regression test was > developed. @voitylov JDK 17 is an RDP 1 and I wonder if this long standing issue is critical or not. I've skimmed through the changes and I don't see any issue but if this is really intended for openjdk/jdk17 then I think it would be useful to have more eyes on it. - PR: https://git.openjdk.java.net/jdk17/pull/96
Re: [jdk17] RFR: JDK-8266310: deadlock between System.loadLibrary and JNI FindClass loading another class
On Fri, 18 Jun 2021 09:50:49 GMT, Aleksei Voitylov wrote: > Resubmitting the following PR https://github.com/openjdk/jdk/pull/3976 > against JDK17. > > This fixes the deadlock in ClassLoader between the two lock objects - a lock > object associated with the class being loaded, and the > ClassLoader.loadedLibraryNames hash map, locked during the native library > load operation. > > Further details can be found in the original PR. > > Testing: jtreg and jck testing with no regressions. A new regression test was > developed. Looks good. - Marked as reviewed by mchung (Reviewer). PR: https://git.openjdk.java.net/jdk17/pull/96
[jdk17] RFR: JDK-8266310: deadlock between System.loadLibrary and JNI FindClass loading another class
Resubmitting the following PR https://github.com/openjdk/jdk/pull/3976 against JDK17. This fixes the deadlock in ClassLoader between the two lock objects - a lock object associated with the class being loaded, and the ClassLoader.loadedLibraryNames hash map, locked during the native library load operation. Further details can be found in the original PR. Testing: jtreg and jck testing with no regressions. A new regression test was developed. - Commit messages: - JDK-8266310: deadlock between System.loadLibrary and JNI FindClass loading another class Changes: https://git.openjdk.java.net/jdk17/pull/96/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk17=96=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8266310 Stats: 913 lines in 10 files changed: 894 ins; 1 del; 18 mod Patch: https://git.openjdk.java.net/jdk17/pull/96.diff Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/96/head:pull/96 PR: https://git.openjdk.java.net/jdk17/pull/96