On Thu, 17 Jun 2021 18:15:52 GMT, Aleksei Voitylov
wrote:
> Thanks Mandy for the thorough review, I'll definitely do that. Shall we wait
> for Alan opinion as well?
I think you can proceed posting a PR for jdk17 as the new version has addressed
Alan's concern of using ThreadLocal. Alan can r
On Wed, 16 Jun 2021 07:51:32 GMT, Aleksei Voitylov
wrote:
>> Please review this PR which 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
>> li
On Thu, 17 Jun 2021 18:12:19 GMT, Aleksei Voitylov
wrote:
>> test/jdk/java/lang/ClassLoader/loadLibraryDeadlock/TestLoadLibraryDeadlock.java
>> line 95:
>>
>>> 93: Collections.addAll(args, "cvf", Paths.get(testClassPath,
>>> outputJar).toString());
>>> 94: for (String c : clas
On Wed, 16 Jun 2021 07:51:32 GMT, Aleksei Voitylov
wrote:
>> Please review this PR which 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
>> li
On Wed, 16 Jun 2021 15:59:44 GMT, Mandy Chung wrote:
>> Aleksei Voitylov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> address review comments
>
> test/jdk/java/lang/ClassLoader/loadLibraryDeadlock/TestLoadLibraryDeadlock.java
> line
On Wed, 16 Jun 2021 07:51:32 GMT, Aleksei Voitylov
wrote:
>> Please review this PR which 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
>> li
On Wed, 16 Jun 2021 07:51:32 GMT, Aleksei Voitylov
wrote:
>> Please review this PR which 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
>> li
On Mon, 14 Jun 2021 18:30:23 GMT, Mandy Chung wrote:
>> Aleksei Voitylov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> address review comments
>
> test/jdk/java/lang/ClassLoader/loadLibraryDeadlock/LoadLibraryDeadlock.java
> line 44:
> Please review this PR which 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.
>
> Problem being fixed:
>
> The initial
On Fri, 11 Jun 2021 10:03:44 GMT, Aleksei Voitylov
wrote:
>> Please review this PR which 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
>> li
On Fri, 11 Jun 2021 10:00:14 GMT, Aleksei Voitylov
wrote:
>> test/jdk/java/lang/ClassLoader/loadLibraryDeadlock/TestLoadLibraryDeadlock.java
>> line 84:
>>
>>> 82:
>>> 83: private static OutputAnalyzer createJar(String outputJar, String...
>>> classes) throws Throwable {
>>> 84:
On Fri, 11 Jun 2021 10:03:44 GMT, Aleksei Voitylov
wrote:
>> Please review this PR which 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
>> li
On Mon, 31 May 2021 23:57:09 GMT, Mandy Chung wrote:
>> Aleksei Voitylov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> address review comments
>
> test/jdk/java/lang/ClassLoader/loadLibraryDeadlock/TestLoadLibraryDeadlock.java
> line
On Fri, 11 Jun 2021 10:03:44 GMT, Aleksei Voitylov
wrote:
>> Please review this PR which 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
>> li
> Please review this PR which 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.
>
> Problem being fixed:
>
> The initial
On Mon, 31 May 2021 20:56:14 GMT, Mandy Chung wrote:
>> Aleksei Voitylov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> address review comments
>
> src/java.base/share/classes/jdk/internal/loader/NativeLibraries.java line 207:
>
>> 205
On Thu, 27 May 2021 14:31:59 GMT, Aleksei Voitylov
wrote:
>> Please review this PR which 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
>> li
On Thu, 27 May 2021 14:31:59 GMT, Aleksei Voitylov
wrote:
>> Please review this PR which 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
>> li
On Thu, 27 May 2021 14:28:09 GMT, Aleksei Voitylov
wrote:
>> src/java.base/share/classes/jdk/internal/loader/NativeLibraries.java line
>> 481:
>>
>>> 479: throw new Error("Maximum lock count exceeded");
>>> 480: }
>>> 481:
>>
>> Hi Aleksei,
>> I know in practice this
On Thu, 27 May 2021 14:31:59 GMT, Aleksei Voitylov
wrote:
>> Please review this PR which 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
>> li
On Thu, 27 May 2021 14:31:59 GMT, Aleksei Voitylov
wrote:
>> Please review this PR which 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
>> li
On Fri, 21 May 2021 15:49:09 GMT, Aleksei Voitylov
wrote:
>> Please review this PR which 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
>> li
On Wed, 26 May 2021 07:30:10 GMT, Peter Levart wrote:
>> Aleksei Voitylov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> fix whitespace
>
> src/java.base/share/classes/jdk/internal/loader/NativeLibraries.java line 481:
>
>> 479:
On Wed, 26 May 2021 02:36:34 GMT, David Holmes wrote:
>> Aleksei Voitylov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> fix whitespace
>
> src/java.base/share/classes/jdk/internal/loader/NativeLibraries.java line 497:
>
>> 495:
>> 49
> Please review this PR which 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.
>
> Problem being fixed:
>
> The initial
On Fri, 21 May 2021 15:49:09 GMT, Aleksei Voitylov
wrote:
>> Please review this PR which 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
>> li
On Fri, 21 May 2021 15:49:09 GMT, Aleksei Voitylov
wrote:
>> Please review this PR which 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
>> li
On Fri, 21 May 2021 15:49:09 GMT, Aleksei Voitylov
wrote:
>> Please review this PR which 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
>> li
On 25/05/2021 04:44, David Holmes wrote:
> On 25/05/2021 7:53 am, Aleksei Voitylov wrote:
>> On Mon, 24 May 2021 06:24:15 GMT, David Holmes
>> wrote:
>>
Aleksei Voitylov has updated the pull request incrementally with
one additional commit since the last revision:
fix whit
On 25/05/2021 7:53 am, Aleksei Voitylov wrote:
On Mon, 24 May 2021 06:24:15 GMT, David Holmes wrote:
Aleksei Voitylov has updated the pull request incrementally with one additional
commit since the last revision:
fix whitespace
src/java.base/share/classes/jdk/internal/loader/NativeLibra
On Mon, 24 May 2021 06:24:15 GMT, David Holmes wrote:
>> Aleksei Voitylov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> fix whitespace
>
> src/java.base/share/classes/jdk/internal/loader/NativeLibraries.java line 511:
>
>> 509:
On Fri, 21 May 2021 15:49:09 GMT, Aleksei Voitylov
wrote:
>> Please review this PR which 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
>> li
On Fri, 21 May 2021 15:39:33 GMT, Aleksei Voitylov
wrote:
>> src/java.base/share/classes/jdk/internal/loader/NativeLibraries.java line
>> 262:
>>
>>> 260: } finally {
>>> 261: releaseNativeLibraryLock(name);
>>> 262: }
>>
>> The new locking scheme looks incorrect t
Peter, David,
I updated the PR to focus on solving the problem I originally intended
to solve that is observed in the wild - a deadlock when two different
libraries are being loaded. The case when the same library JNI_OnLoad
has FindClass with a circular dependency on loading the same library is
a
On 21/05/2021 10:29, Peter Levart wrote:
I still haven't found a scenario of a possible deadlock when Sergei's
initial patch is combined with...
Sorry Aleksei, I renamed you to Sergei without intention. Please excuse me.
Peter
On Fri, 21 May 2021 15:49:09 GMT, Aleksei Voitylov
wrote:
>> Please review this PR which 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
>> li
> Please review this PR which 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.
>
> Problem being fixed:
>
> The initial
> Please review this PR which 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.
>
> Problem being fixed:
>
> The initial
On Wed, 19 May 2021 18:47:52 GMT, Jorn Vernee wrote:
>> Aleksei Voitylov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> fix trailing whitespace
>
> src/java.base/share/classes/jdk/internal/loader/NativeLibraries.java line 262:
>
>> 260
On 21/05/2021 01:11, David Holmes wrote:
Hi Peter,
On 21/05/2021 12:42 am, Peter Levart wrote:
Hi Aleksei,
Are you trying to solve this in principle or do you have a concrete
problem at hand which triggers this deadlock? If it is the later,
then some rearrangement of code might do the tric
Hi Peter,
On 21/05/2021 12:42 am, Peter Levart wrote:
Hi Aleksei,
Are you trying to solve this in principle or do you have a concrete
problem at hand which triggers this deadlock? If it is the later, then
some rearrangement of code might do the trick... For example, native
libraries are typi
Hi Aleksei,
Are you trying to solve this in principle or do you have a concrete
problem at hand which triggers this deadlock? If it is the later, then
some rearrangement of code might do the trick... For example, native
libraries are typically loaded by a class initializer of some class that
On Wed, 19 May 2021 16:29:33 GMT, Aleksei Voitylov
wrote:
>> Please review this PR which 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
>> li
On 20/05/2021 2:29 am, Aleksei Voitylov wrote:
On Wed, 19 May 2021 16:21:41 GMT, Aleksei Voitylov
wrote:
Please review this PR which fixes the deadlock in ClassLoader between the two
lock objects - a lock object associated with the class being loaded, and the
ClassLoader.loadedLibraryNames
On Wed, 19 May 2021 16:29:33 GMT, Aleksei Voitylov
wrote:
>> Please review this PR which 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
>> li
On Wed, 19 May 2021 16:21:41 GMT, Aleksei Voitylov
wrote:
>> Please review this PR which 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
>> li
> Please review this PR which 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.
>
> Problem being fixed:
>
> The initial
Hi David, Mandy,
In the updated PR I removed the lock held during the load/unload calls.
Our testing confirmed that without that removal the deadlock can easily
be reproduced, even without signed jars. Now the lock is only held to
prevent races during access to "libraries" and "loadedLibraryNames"
> Please review this PR which 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.
>
> Problem being fixed:
>
> The initial
On 14/05/2021 7:20 am, Mandy Chung wrote:
On 5/13/21 6:05 AM, David Holmes wrote:
Not every problem has a solution :) If JNI_OnLoad has to execute
atomically with respect to loading a library then there will always be
a deadlock potential. The only complete solution would not hold a lock
whi
On 5/13/21 6:05 AM, David Holmes wrote:
Not every problem has a solution :) If JNI_OnLoad has to execute
atomically with respect to loading a library then there will always be
a deadlock potential. The only complete solution would not hold a lock
while JNI_OnLoad is executed, but that comple
Hi Aleksei,
On 13/05/2021 9:54 pm, Aleksei Voitylov wrote:
Hi David,
On 12/05/2021 10:56, David Holmes wrote:
Hi Aleksei,
On 11/05/2021 11:19 pm, Aleksei Voitylov wrote:
Please review this PR which fixes the deadlock in ClassLoader between
the two lock objects - a lock object associated with
Hi David,
On 12/05/2021 10:56, David Holmes wrote:
> Hi Aleksei,
>
> On 11/05/2021 11:19 pm, Aleksei Voitylov wrote:
>> Please review this PR which fixes the deadlock in ClassLoader between
>> the two lock objects - a lock object associated with the class being
>> loaded, and the ClassLoader.loade
On Tue, 11 May 2021 13:10:30 GMT, Aleksei Voitylov
wrote:
> Please review this PR which 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
On Tue, 11 May 2021 13:10:30 GMT, Aleksei Voitylov
wrote:
> Please review this PR which 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
On Tue, 11 May 2021 13:10:30 GMT, Aleksei Voitylov
wrote:
> Please review this PR which 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
On Tue, 11 May 2021 13:28:16 GMT, Alan Bateman wrote:
>> Please review this PR which 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
Hi Aleksei,
On 11/05/2021 11:19 pm, Aleksei Voitylov wrote:
Please review this PR which 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
On Tue, 11 May 2021 13:10:30 GMT, Aleksei Voitylov
wrote:
> Please review this PR which 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
Please review this PR which 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.
Problem being fixed:
The initial reproducer demon
60 matches
Mail list logo