Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-608

NullPointerException in DeflatingStreamSinkConduit when connections terminated

    XMLWordPrintable

Details

    • Hide
      1. checkout 1.4.x branch
      2. use attached FileServer.java (this is taken from examples folder and just added a GzipHandler)
      3. start this FileServer
      4. prepare a example file, you want to test with. E.g. I used a ca. 4mb JSON file, named 'mos_stations.geojson'. Typically you place it on your desktop.
      5. install 'wrk' tool locally (e.g. via brew on OSX), https://github.com/wg/wrk
      6. run
        wrk -t2 -c100 -d100s -H "Accept-Encoding: gzip" http://localhost:8080/mos_stations.geojson
      7. hit CTRL+C to interrupt the wrk tool
      8. boom! exceptions occur
      Show
      checkout 1.4.x branch use attached FileServer.java (this is taken from examples folder and just added a GzipHandler) start this FileServer prepare a example file, you want to test with. E.g. I used a ca. 4mb JSON file, named 'mos_stations.geojson'. Typically you place it on your desktop. install 'wrk' tool locally (e.g. via brew on OSX), https://github.com/wg/wrk run wrk -t2 -c100 -d100s -H "Accept-Encoding: gzip" http: //localhost:8080/mos_stations.geojson hit CTRL+C to interrupt the wrk tool boom! exceptions occur
    • User Experience

    Description

      When I run a performance benchmark and terminate the 'wrk' load generator,
      Undertow produces lots of NPEs in class DeflatingStreamSinkConduit.

      Can be reproduced in latest branches 1.3.x, 1.4.x and master (2.0.0.beta)
      checked out as of today, 17th of January 2016.

      Example log from running latest branch 1.4.x

      Jan 17, 2016 3:27:37 PM io.undertow.server.Connectors executeRootHandler
      ERROR: UT005071: Undertow request failed HttpServerExchange{ GET /mos_stations.geojson request {Accept-Encoding=[gzip], Host=[localhost:8080]} response {Content-Encoding=[gzip], Connection=[keep-alive], Last-Modified=[Thu, 26 Nov 2015 18:30:02 GMT], Transfer-Encoding=[chunked], Content-Type=[application/octet-stream], Date=[Sun, 17 Jan 2016 14:27:37 GMT]}}
      java.lang.NullPointerException
      	at io.undertow.conduits.DeflatingStreamSinkConduit.performFlushIfRequired(DeflatingStreamSinkConduit.java:389)
      	at io.undertow.conduits.DeflatingStreamSinkConduit.transferFrom(DeflatingStreamSinkConduit.java:163)
      	at org.xnio.conduits.ConduitStreamSinkChannel.transferFrom(ConduitStreamSinkChannel.java:142)
      	at io.undertow.channels.DetachableStreamSinkChannel.transferFrom(DetachableStreamSinkChannel.java:127)
      	at io.undertow.server.HttpServerExchange$WriteDispatchChannel.transferFrom(HttpServerExchange.java:1951)
      	at io.undertow.io.AsyncSenderImpl$TransferTask.run(AsyncSenderImpl.java:74)
      	at io.undertow.io.AsyncSenderImpl$TransferTask.run(AsyncSenderImpl.java:103)
      	at io.undertow.io.AsyncSenderImpl.transferFrom(AsyncSenderImpl.java:256)
      	at io.undertow.server.handlers.resource.PathResource$1TransferTask.run(PathResource.java:217)
      	at io.undertow.server.handlers.resource.PathResource.serveImpl(PathResource.java:247)
      	at io.undertow.server.handlers.resource.PathResource.serve(PathResource.java:105)
      	at io.undertow.server.handlers.resource.ResourceHandler$1.handleRequest(ResourceHandler.java:316)
      	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
      	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:793)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

      Attachments

        Activity

          People

            sdouglas1@redhat.com Stuart Douglas
            nitram509_jira Martin W. Kirst (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: