Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-9673

NullPointerException with JDK9 + wildfly-openssl + Http2 utilized

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 14.0.0.Final
    • 12.0.0.Beta1
    • Web (Undertow)
    • None
    • Hide
      1. clone and build wildfly
      2. start wildfly ./dist/target/wildfly-<version>/bin/standalone.sh
      3. configure wildfly-openssl via WF CLI:
        /core-service=management/security-realm=ApplicationRealm/server-identity=ssl:write-attribute(name=protocol,value=openssl.TLS)
        
      4. grab h2spec tool (uses GO lang) and execute:
        ./bin/h2spec -t -k -p 8443 -h 127.0.0.1
        or e.g.:
        ./bin/h2spec -t -k -p 8443 -h 127.0.0.1 http2/7
        to execute just some failing tests subset
        
      Show
      clone and build wildfly start wildfly ./dist/target/wildfly-<version>/bin/standalone.sh configure wildfly-openssl via WF CLI: /core-service=management/security-realm=ApplicationRealm/server-identity=ssl:write-attribute(name=protocol,value=openssl.TLS) grab h2spec tool (uses GO lang) and execute: ./bin/h2spec -t -k -p 8443 -h 127.0.0.1 or e.g.: ./bin/h2spec -t -k -p 8443 -h 127.0.0.1 http2/7 to execute just some failing tests subset

      I can see bunch of NPEs and IllegalStateExceptions when I execute http2 testsuite against running Wildfly server (build from master/62583a78a850ba3fb182dda9b5ed35d99e016960 revision) running with JDK9 and wildfly-openssl (my openssl version is OpenSSL 1.1.0g-fips 2 Nov 2017):

      2018-01-15 13:15:04,095 ERROR [io.undertow.request.io] (default I/O-16) UT005090: Unexpected failure: java.lang.NullPointerException
              at io.undertow.core//io.undertow.protocols.http2.Http2Channel.sendPing(Http2Channel.java:794)
              at io.undertow.core//io.undertow.protocols.http2.Http2Channel.createChannelImpl(Http2Channel.java:489)
              at io.undertow.core//io.undertow.protocols.http2.Http2Channel.createChannel(Http2Channel.java:342)
              at io.undertow.core//io.undertow.protocols.http2.Http2Channel.createChannel(Http2Channel.java:68)
              at io.undertow.core//io.undertow.server.protocol.framed.AbstractFramedChannel.receive(AbstractFramedChannel.java:451)
              at io.undertow.core//io.undertow.server.protocol.http2.Http2ReceiveListener.handleEvent(Http2ReceiveListener.java:109)
              at io.undertow.core//io.undertow.server.protocol.http2.Http2ReceiveListener.handleEvent(Http2ReceiveListener.java:60)
              at org.jboss.xnio//org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
              at io.undertow.core//io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:921)
              at io.undertow.core//io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:902)
              at org.jboss.xnio//org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
              at org.jboss.xnio//org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
              at io.undertow.core//io.undertow.protocols.ssl.SslConduit$SslReadReadyHandler.readReady(SslConduit.java:1145)
              at io.undertow.core//io.undertow.protocols.ssl.SslConduit$1.run(SslConduit.java:168)
              at org.jboss.xnio.nio//org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:612)
              at org.jboss.xnio.nio//org.xnio.nio.WorkerThread.run(WorkerThread.java:479)
      
      14:32:23,593 ERROR [io.undertow.request] (default task-128) UT005071: Undertow request failed HttpServerExchange{ POST / request {Host=[127.0.0.1:8443]} response {Last-Modified=[Mon, 15 Jan 2018 07:43:34 GMT], X-Powered-By=[Undertow/1], Server=[WildFly/11], Content-Length=[2438], Content-Type=[text/html], Accept-Ranges=[bytes]}}: java.lang.IllegalStateException: UT000127: Response has already been sent
      	at io.undertow.core//io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:122)
      	at io.undertow.core//io.undertow.server.handlers.resource.PathResource$1ServerTask.run(PathResource.java:184)
      	at io.undertow.core//io.undertow.server.handlers.resource.PathResource.serveImpl(PathResource.java:253)
      	at io.undertow.core//io.undertow.server.handlers.resource.PathResource.serve(PathResource.java:111)
      	at io.undertow.core//io.undertow.server.handlers.resource.ResourceHandler$1.handleRequest(ResourceHandler.java:337)
      	at io.undertow.core//io.undertow.server.Connectors.executeRootHandler(Connectors.java:332)
      	at io.undertow.core//io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
      	at java.base/java.lang.Thread.run(Thread.java:844)
      

      All exceptions seems to repeat. This causes 16 tests to fail. When I use JDK8 or when I switch back to JSSE ALPN instead of wildfly-openssl, no test fail at all and there are no NPEs in server.log anymore, although the IllegalStateExceptions still remains there.

              sdouglas1@redhat.com Stuart Douglas (Inactive)
              jstourac@redhat.com Jan Stourac
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: