Re: RFR: 8268965: TCP Connection Reset when connecting simple socket to SSL server

2021-07-05 Thread Xue-Lei Andrew Fan
On Thu, 17 Jun 2021 13:20:54 GMT, Alexey Bakhtin  wrote:

> Please review the fix for JDK-8268965.
> 
> The new jtreg test is added for the described issue.
> sun/security/ssl and javax/net/ssl tests are passed

Could I have more details about the problem?  For example, the thread stacks 
for the socket reset or the thread stacks of the call to close() method.  The 
test case does not call close() method of the socket or the I/O stream.   Will 
the reset happen if the socket and I/O call the close() methods properly?

-

PR: https://git.openjdk.java.net/jdk/pull/4520


Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible

2021-07-05 Thread Yi Yang
On Mon, 5 Jul 2021 06:01:23 GMT, Yi Yang  wrote:

>> Class loading order is different to class initialization order.
>> 
>> There are a lot more tests than just tier1. :) I don't expect many, if any, 
>> tests to be looking for a specific IOOBE message, and I can't see an easy 
>> way to find such tests without running them.  If core-libs folk are okay 
>> with this update then I guess we can just handle any test failures if they 
>> arise. But I'll run this through our tier 1-3 testing.
>> 
>> Thanks,
>> David
>
> @dholmes-ora @AlanBateman @PaulSandoz do you have any comments on the latest 
> version? Thanks.

> @kelthuzadx I did not see any response to my query about the change in 
> initialization (not load) order. I also remain concerned about introducing 
> cross dependencies between core classes (e.g. String now uses Precondition, 
> so does that impact Precondition using String?) But these are things for the 
> core-libs folk to be concerned about, or not.
> 
> Cheers,
> David

Hi David, the following are initialization orders:

$./java -Xlog:class+init -version
[0.255s][info][class,init] 0 Initializing 'java/lang/Object'(no method) 
(0x00080e18)
[0.255s][info][class,init] 1 Initializing 'java/lang/CharSequence'(no method) 
(0x00080006ba68)
[0.255s][info][class,init] 2 Initializing 'java/lang/String' 
(0x0008e978)
[0.255s][info][class,init] 3 Initializing 'java/util/Comparator'(no method) 
(0x0008000fd760)
[0.255s][info][class,init] 4 Initializing 
'java/lang/String$CaseInsensitiveComparator'(no method) (0x000800130988)
[0.255s][info][class,init] 5 Initializing 'java/lang/System' 
(0x00088c68)
[0.256s][info][class,init] 6 Initializing 
'java/lang/reflect/AnnotatedElement'(no method) (0x00081f88)
[0.256s][info][class,init] 7 Initializing 'java/lang/reflect/Type'(no method) 
(0x00082930)
[0.256s][info][class,init] 8 Initializing 'java/lang/Class' (0x00081830)
[0.256s][info][class,init] 9 Initializing 'java/lang/ThreadGroup'(no method) 
(0x00080001d348)
[0.257s][info][class,init] 10 Initializing 'java/lang/Thread' 
(0x00080001c470)
[0.258s][info][class,init] 11 Initializing 'java/security/AccessController' 
(0x00089a80)
[0.258s][info][class,init] 12 Initializing 'java/security/AccessControlContext' 
(0x0008000743c8)
[0.258s][info][class,init] 13 Initializing 'java/lang/Module' 
(0x0008bab0)
[0.259s][info][class,init] 14 Initializing 'java/lang/Module$ArchivedData' 
(0x0008001a05a8)
[0.259s][info][class,init] 15 Initializing 'jdk/internal/misc/CDS' 
(0x000800018bf8)
[0.259s][info][class,init] 16 Initializing 'java/lang/Iterable'(no method) 
(0x00080008be28)
[0.259s][info][class,init] 17 Initializing 'java/util/Collection'(no method) 
(0x00080008c028)
[0.260s][info][class,init] 18 Initializing 'java/util/AbstractCollection'(no 
method) (0x0008000381e0)
[0.260s][info][class,init] 19 Initializing 
'java/util/ImmutableCollections$AbstractImmutableCollection'(no method) 
(0x00080008c2f8)
[0.260s][info][class,init] 20 Initializing 'java/util/Set'(no method) 
(0x0008000189f8)
[0.260s][info][class,init] 21 Initializing 
'java/util/ImmutableCollections$AbstractImmutableSet'(no method) 
(0x00080008d018)
[0.260s][info][class,init] 22 Initializing 
'java/util/ImmutableCollections$Set12'(no method) (0x00080008ba18)
[0.369s][info][class,init] 23 Initializing 'jdk/internal/misc/UnsafeConstants' 
(0x0008000b4ea0)
[0.369s][info][class,init] 24 Initializing 'java/lang/reflect/AccessibleObject' 
(0x00080005b4d8)
[0.370s][info][class,init] 25 Initializing 'java/lang/reflect/ReflectAccess'(no 
method) (0x000800013610)
[0.370s][info][class,init] 26 Initializing 'jdk/internal/access/SharedSecrets' 
(0x000800013408)
[0.370s][info][class,init] 27 Initializing 'java/lang/invoke/MethodHandles' 
(0x000800131720)
[0.371s][info][class,init] 28 Initializing 'java/lang/invoke/MemberName' 
(0x0008000de230)
[0.371s][info][class,init] 29 Initializing 
'java/lang/invoke/MemberName$Factory' (0x000800023468)
[0.372s][info][class,init] 30 Initializing 'java/security/Permission'(no 
method) (0x000800023020)
[0.372s][info][class,init] 31 Initializing 'java/security/BasicPermission'(no 
method) (0x000800025de8)
[0.372s][info][class,init] 32 Initializing 
'java/lang/reflect/ReflectPermission'(no method) (0x000800025b98)
[0.372s][info][class,init] 33 Initializing 'java/lang/StringLatin1' 
(0x000800022e18)
[0.373s][info][class,init] 34 Initializing 
'java/lang/invoke/MethodHandles$Lookup' (0x0008000e3708)
[0.373s][info][class,init] 35 Initializing 'java/util/Objects'(no method) 
(0x00080008b810)
[0.374s][info][class,init] 36 Initializing 'jdk/internal/reflect/Reflection' 
(0x0008fb28)
[0.374s][info][class,init] 37 Initializing 'java/util/ImmutableCollections' 
(0x00080008d420)
[0.374s][info][class,init] 38 Initializing 'java/util/List'(no method) 

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible

2021-07-05 Thread David Holmes
On Mon, 5 Jul 2021 06:01:23 GMT, Yi Yang  wrote:

>> Class loading order is different to class initialization order.
>> 
>> There are a lot more tests than just tier1. :) I don't expect many, if any, 
>> tests to be looking for a specific IOOBE message, and I can't see an easy 
>> way to find such tests without running them.  If core-libs folk are okay 
>> with this update then I guess we can just handle any test failures if they 
>> arise. But I'll run this through our tier 1-3 testing.
>> 
>> Thanks,
>> David
>
> @dholmes-ora @AlanBateman @PaulSandoz do you have any comments on the latest 
> version? Thanks.

@kelthuzadx  I did not see any response to my query about the change in 
initialization (not load) order. I also remain concerned about introducing 
cross dependencies between core classes (e.g. String now uses Precondition, so 
does that impact Precondition using String?) But these are things for the 
core-libs folk to be concerned about, or not.

Cheers,
David

-

PR: https://git.openjdk.java.net/jdk/pull/4507


Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible

2021-07-05 Thread Yi Yang
On Thu, 17 Jun 2021 05:16:14 GMT, David Holmes  wrote:

>> After JDK-8265518(#3615), it's possible to replace all variants of 
>> checkIndex by 
>> Objects.checkIndex/Objects.checkFromToIndex/Objects.checkFromIndexSize in 
>> the whole JDK codebase.
>
> Class loading order is different to class initialization order.
> 
> There are a lot more tests than just tier1. :) I don't expect many, if any, 
> tests to be looking for a specific IOOBE message, and I can't see an easy way 
> to find such tests without running them.  If core-libs folk are okay with 
> this update then I guess we can just handle any test failures if they arise. 
> But I'll run this through our tier 1-3 testing.
> 
> Thanks,
> David

@dholmes-ora @AlanBateman @PaulSandoz do you have any comments on the latest 
version? Thanks.

-

PR: https://git.openjdk.java.net/jdk/pull/4507