]
Darran Lofthouse reassigned WFCORE-4303:
----------------------------------------
Assignee: (was: Darran Lofthouse)
NullPointerException - with SNI configured on IBM JDK 1.8
---------------------------------------------------------
Key: WFCORE-4303
URL:
https://issues.jboss.org/browse/WFCORE-4303
Project: WildFly Core
Issue Type: Bug
Components: Security
Environment: IBM JDK 1.8:
{code}
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 8.0.5.20 - pxa6480sr5fp20-20180802_01(SR5 FP20))
IBM J9 VM (build 2.9, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20180731_393394
(JIT enabled, AOT enabled)
OpenJ9 - bd23af8
OMR - ca1411c
IBM - 98805ca)
JCL - 20180719_01 based on Oracle jdk8u181-b12
{code}
Reporter: Jan Stourac
Priority: Major
When running with IBM JDK 1.8, there is an NPE during the request performed against
https-listener which has configured 'server-ssl-sni-context' instance (when using
standard 'server-ssl-context' no exception is present):
{code}
$ curl
https://localhost:8443 -k
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to localhost:8443
{code}
related exception in server.log:
{code}
18:23:01,227 ERROR [io.undertow.request.io] (default I/O-6) UT005090: Unexpected failure:
java.lang.NullPointerException
at io.undertow.protocols.ssl.SslConduit.doUnwrap(SslConduit.java:772)
at io.undertow.protocols.ssl.SslConduit.read(SslConduit.java:567)
at
org.xnio.conduits.ConduitStreamSourceChannel.read(ConduitStreamSourceChannel.java:127)
at
io.undertow.server.protocol.http.AlpnOpenListener$AlpnConnectionListener.handleEvent(AlpnOpenListener.java:348)
at
io.undertow.server.protocol.http.AlpnOpenListener.handleEvent(AlpnOpenListener.java:305)
at
io.undertow.server.protocol.http.AlpnOpenListener.handleEvent(AlpnOpenListener.java:64)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
at org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:291)
at org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:286)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
at
org.xnio.ChannelListeners$DelegatingChannelListener.handleEvent(ChannelListeners.java:1092)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
at org.xnio.nio.QueuedNioTcpServer$1.run(QueuedNioTcpServer.java:131)
at org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:612)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:479)
{code}
When I switch to OpenSSL provider using
{code}
/subsystem=elytron/server-ssl-context=defaultSSC:write-attribute(name=providers,value=openssl)
{code}
then the exception disappears.
----
Note: sometimes I can also see shorter exception stacktrace:
{code}
18:17:15,711 ERROR [io.undertow.request.io] (default I/O-2) UT005090: Unexpected failure:
java.lang.NullPointerException
at io.undertow.protocols.ssl.SslConduit.doUnwrap(SslConduit.java:772)
at io.undertow.protocols.ssl.SslConduit.doHandshake(SslConduit.java:648)
at io.undertow.protocols.ssl.SslConduit.access$900(SslConduit.java:63)
at
io.undertow.protocols.ssl.SslConduit$SslReadReadyHandler.readReady(SslConduit.java:1136)
at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:591)
{code}