Hi there,

while testing the current tcnative tags I had test failures for TestOcspSoftFail.

- it was always the test case testNoResponderWithoutSoftFail[JSSE with OpenSSL trust false]

- it was always in line 49

- TC 9 test differs there (and no failures)

- only observed with JDK 25 and above

- only observed with NIO, not with NIO2

- only observed with tcnative and panama, not with JSSE; It seems with JSSE the test case here needs about 3.5 seconds, with tcnative and panama it needs about 7-15 seconds.

- the failure is always:

Testcase: testNoResponderWithoutSoftFail[JSSE with OpenSSL trust false] took 10.392 sec
        Caused an ERROR
Unexpected exception, expected<javax.net.ssl.SSLHandshakeException> but was<java.net.SocketException> java.lang.Exception: Unexpected exception, expected<javax.net.ssl.SSLHandshakeException> but was<java.net.SocketException>
Caused by: java.net.SocketException: Broken pipe
        at java.base/sun.nio.ch.SocketDispatcher.write0(Native Method)
at java.base/sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:65) at java.base/sun.nio.ch.NioSocketImpl.tryWrite(NioSocketImpl.java:408) at java.base/sun.nio.ch.NioSocketImpl.implWrite(NioSocketImpl.java:425)
        at java.base/sun.nio.ch.NioSocketImpl.write(NioSocketImpl.java:458)
at java.base/sun.nio.ch.NioSocketImpl$2.write(NioSocketImpl.java:825) at java.base/java.net.Socket$SocketOutputStream.implWrite(Socket.java:1097) at java.base/java.net.Socket$SocketOutputStream.write(Socket.java:1087) at java.base/sun.security.ssl.SSLSocketOutputRecord.flush(SSLSocketOutputRecord.java:271) at java.base/sun.security.ssl.HandshakeOutStream.flush(HandshakeOutStream.java:89) at java.base/sun.security.ssl.CertificateVerify$T13CertificateVerifyProducer.onProduceCertificateVerify(CertificateVerify.java:1140) at java.base/sun.security.ssl.CertificateVerify$T13CertificateVerifyProducer.produce(CertificateVerify.java:1104) at java.base/sun.security.ssl.SSLHandshake.produce(SSLHandshake.java:465) at java.base/sun.security.ssl.Finished$T13FinishedConsumer.onConsumeFinished(Finished.java:1056) at java.base/sun.security.ssl.Finished$T13FinishedConsumer.consume(Finished.java:902) at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:421) at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:477) at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:448) at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:199) at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:172) at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1506) at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1421) at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:455) at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:426) at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:483) at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:187) at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:141) at org.apache.catalina.startup.TomcatBaseTest.methodUrl(TomcatBaseTest.java:706) at org.apache.catalina.startup.TomcatBaseTest.getUrl(TomcatBaseTest.java:658) at org.apache.tomcat.util.net.ocsp.OcspBaseTest.doTest(OcspBaseTest.java:172) at org.apache.tomcat.util.net.ocsp.TestOcspSoftFail.testNoResponderWithoutSoftFail(TestOcspSoftFail.java:49) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)


The test code already allows java.net.SocketException for NIO2. It seems it can happen with NIO also, if native code is involved (tcnative and panama) and JDK is 25 an above.

Best regards,

Rainer




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to