[PATCH] 8246633: Improve the performance of ObjectInputStream.resolveClass(ObjectStreamClass)
Peter Kessler OS
peter.kessler at os.amperecomputing.com
Thu Jun 11 18:14:38 UTC 2020
Daniel,
Thanks for the suggestion to run more tests.
I'm not sure what the criteria for "success" is here.
I have run
$ jtreg-5.0-b01/bin/jtreg \
-verbose:summary -a -ea -esa -agentvm -conc:8 -ignore:quiet -timeout:2 \
-exclude:./test/jdk/ProblemList.txt \
-jdk:${jdk} \
./test/jdk/:jdk_core ./test/jdk/:jdk_svc
on aarch64 and x86_64, using the available OracleJDK build 15-ea+25-1229,
and a build I did of jdk-15+25 with the patch (called jdk-15+25+ below).
The results are ... confusing.
I ran the tests 4 times on each JDK. The summary of the results on x86_64
are
15-ea+25-1229
Test results: passed: 6,718; failed: 4; error: 9
Test results: passed: 6,708; failed: 13; error: 10
Test results: passed: 6,713; failed: 9; error: 9
Test results: passed: 6,718; failed: 4; error: 9
jdk-15+25+
Test results: passed: 6,719; failed: 6; error: 9
Test results: passed: 6,712; failed: 12; error: 10
Test results: passed: 6,718; failed: 7; error: 9
Test results: passed: 6,718; failed: 7; error: 9
The fact that in different runs different tests pass, fail, or error is
unfortunate. Counting the different failures in the 4 runs shows
15-ea+25-1229
3 FAILED: com/sun/jdi/PrivateTransportTest.java
1 FAILED: java/io/Serializable/unresolvableObjectStreamClass/UnresolvableObjectStreamClass.java
1 FAILED: java/net/httpclient/ProxyAuthDisabledSchemes.java
2 FAILED: java/net/httpclient/ProxyAuthDisabledSchemesSSL.java
1 FAILED: java/net/httpclient/ResponseBodyBeforeError.java
1 FAILED: java/net/httpclient/ResponsePublisher.java
2 FAILED: java/net/httpclient/ShortResponseBody.java
2 FAILED: java/net/httpclient/ShortResponseBodyWithRetry.java
1 FAILED: java/net/httpclient/SpecialHeadersTest.java
1 FAILED: java/net/httpclient/StreamingBody.java
4 FAILED: java/security/KeyStore/PKCS12/MetadataStoreLoadTest.java
1 FAILED: java/security/KeyStore/PKCS12/StoreTrustedCertAPITest.java
2 FAILED: java/security/KeyStore/PKCS12/StoreTrustedCertKeytool.java
4 FAILED: sun/security/pkcs11/Secmod/AddTrustedCert.java
4 FAILED: tools/jlink/plugins/StripNativeDebugSymbolsPlugin/StripNativeDebugSymbolsPlugin
jdk-15+25+
1 FAILED: com/sun/jdi/PrivateTransportTest.java
3 FAILED: java/io/Serializable/unresolvableObjectStreamClass/UnresolvableObjectStreamClass.java
1 FAILED: java/net/httpclient/ProxyAuthDisabledSchemes.java
1 FAILED: java/net/httpclient/ProxyAuthDisabledSchemesSSL.java
1 FAILED: java/net/httpclient/ResponsePublisher.java
1 FAILED: java/net/httpclient/ShortResponseBody.java
1 FAILED: java/net/httpclient/ShortResponseBodyWithRetry.java
1 FAILED: java/net/httpclient/SpecialHeadersTest.java
1 FAILED: java/net/httpclient/SplitResponseAsync.java
1 FAILED: java/net/httpclient/StreamingBody.java
1 FAILED: java/security/KeyStore/PKCS12/MetadataStoreLoadTest.java
3 FAILED: java/security/KeyStore/PKCS12/StoreTrustedCertAPITest.java
2 FAILED: java/security/KeyStore/PKCS12/StoreTrustedCertKeytool.java
1 FAILED: java/util/logging/Logger/bundleLeak/BundleTest.java
1 FAILED: jdk/jfr/event/runtime/TestThreadAllocationEvent.java
4 FAILED: sun/security/lib/cacerts/VerifyCACerts.java
4 FAILED: sun/security/pkcs11/Secmod/AddTrustedCert.java
4 FAILED: tools/jlink/plugins/StripNativeDebugSymbolsPlugin/StripNativeDebugSymbolsPluginTest.java
To your worry about "potential damage", I would have worried about
java/io/Serializable/unresolvableObjectStreamClass/UnresolvableObjectStreamClass.java,
except it did not fail all the time with the patch, and it also failed
without the patch. Many of the other failures seem intermittent. I am not
sure how to classify the failures that persisted across the 4 runs I did.
The summary of the results on aarch64 is not as good, for either build:
15-ea+25-1229
Test results: passed: 6,658; failed: 74; error: 10
Test results: passed: 6,657; failed: 74; error: 11
Test results: passed: 6,660; failed: 71; error: 10
Test results: passed: 6,663; failed: 69; error: 10
jdk-15+25+
Test results: passed: 6,661; failed: 73; error: 11
Test results: passed: 6,659; failed: 75; error: 10
Test results: passed: 6,663; failed: 71; error: 11
Test results: passed: 6,655; failed: 79; error: 11
Comparing the failures and errors in 3rd run of each, the differences from
15-ea+25-1229 to jdk-15+25+ are
> Error: sun/tools/jstatd/TestJstatdExternalRegistry.java
< FAILED: com/sun/jdi/PrivateTransportTest.java
> FAILED: java/io/Serializable/unresolvableObjectStreamClass/UnresolvableObjectStreamClass.java
< FAILED: java/security/KeyStore/PKCS12/MetadataStoreLoadTest.java
< FAILED: java/security/KeyStore/PKCS12/StoreTrustedCertAPITest.java
> FAILED: jdk/net/ExtendedSocketOption/AsynchronousSocketChannelNAPITest.java
> FAILED: sun/security/lib/cacerts/VerifyCACerts.java
Again, UnresolvableObjectStreamClass.java would be worrying, except that it
did not always fail with the patch and also sometimes (not shown) failed
with the OracleJDK 15-ea+25-1229 build.
Comparing the failures across the 4 runs shows the difference between the
persistent (that is, they failed on all 4 runs) between 15-ea+25-1229 and
jdk-15+25+ to be
< FAILED: com/sun/jdi/PrivateTransportTest.java
< FAILED: java/security/KeyStore/PKCS12/StoreTrustedCertKeytool.java
> FAILED: sun/security/lib/cacerts/VerifyCACerts.java
Similar to, but not the same as, the persistent failures on x86_64.
(Can I attribute the generally higher rate of failure on aarch64 compared to
x86_64 to fact that aarch64 is a new platform for Oracle?)
What further testing would you recommend?
... peter
-----Original Message-----
From: Daniel Fuchs <daniel.fuchs at oracle.com>
Date: Tuesday, June 9, 2020 at 10:18 AM
To: Peter Kessler OS <peter.kessler at os.amperecomputing.com>, "core-libs-dev at openjdk.java.net" <core-libs-dev at openjdk.java.net>
Subject: Re: [PATCH] 8246633: Improve the performance of ObjectInputStream.resolveClass(ObjectStreamClass)
Hi Peter,
This is not a review. I second Roger's observations.
On 05/06/2020 00:08, Peter Kessler OS wrote:
> Tested with `make run-test-tier1` on Linux (CentOS 7) on both aarch64 and x86_64. I had one failure on each of the runs
The code you are proposing to change affects RMI and JMX too.
For an initial evaluation of the potential damage you will need to
test at least with jdk_core and jdk_svc (and if that's successful
then probably some of the lower tiers too):
$ jtreg -verbose:summary -a -ea -esa -agentvm -conc:8 -ignore:quiet
-timeout:2 -exclude:./test/jdk/ProblemList.txt -jdk:<tested-jdk>
./test/jdk/:jdk_core ./test/jdk/:jdk_svc
best regards,
-- daniel
More information about the core-libs-dev
mailing list