Uploaded image for project: 'Immutant'
  1. Immutant
  2. IMMUTANT-615

User can't catch errors that occur when writing the ring response

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.1.0, 2.1.2
    • Fix Version/s: 2.1.4
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      I found that the easiest way to reproduce this is to load a page that requests a few resources from my server via AJAX and to close it before it finishes loading everything.

      Show
      I found that the easiest way to reproduce this is to load a page that requests a few resources from my server via AJAX and to close it before it finishes loading everything.

      Description

      I noticed that there where a lot of exceptions in my server logs

      10:42:27.600 ERROR [io.undertow.request] (XNIO-1 task-1) Undertow request failed HttpServerExchange{ GET /silvretta_arena/data request {Accept=[application/json, text/javascript, */*; q=0.01], X-Requested-With=[XMLHttpRequest], Accept-Language=[en-US,en;q=0.8,de;q=0.6], Accept-Encoding=[gzip, deflate, sdch], User-Agent=[Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36], Connection=[keep-alive], Cookie=[cookieconsent_dismissed=yes; ring-session=a8ae01bf-8588-408f-95fe-9c61646723d3; __utma=111872281.946050606.1455025588.1455698596.1457346980.6; __utmc=111872281; __utmz=111872281.1455267585.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none);], Referer=[http://localhost:3000/silvretta_arena], Host=[localhost:3000]} response {Access-Control-Allow-Headers=[Origin, X-Requested-With, Content-Type, Accept, Cache-Control, Accept-Language, Accept-Encoding, Authorization], Server=[undertow], X-XSS-Protection=[1; mode=block], Access-Control-Expose-Headers=[content-length], Date=[Thu, 17 Mar 2016 09:42:27 GMT], Connection=[keep-alive], Access-Control-Allow-Origin=[*], etag=[274c88347f636838a28fbd3721c339a02cef2d], Vary=[Accept-Encoding, Origin, Accept-Language], Access-Control-Allow-Credentials=[true], X-Content-Type-Options=[nosniff], Transfer-Encoding=[chunked], Content-Type=[application/json; charset=utf-8], Access-Control-Allow-Methods=[HEAD, GET, POST, PUT, DELETE, OPTIONS, TRACE]}}
      java.io.IOException: Broken pipe
      	at sun.nio.ch.FileDispatcherImpl.writev0(Native Method) ~[na:1.7.0_75]
      	at sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:51) ~[na:1.7.0_75]
      	at sun.nio.ch.IOUtil.write(IOUtil.java:148) ~[na:1.7.0_75]
      	at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:524) ~[na:1.7.0_75]
      	at org.xnio.nio.NioSocketConduit.write(NioSocketConduit.java:162) ~[xnio-nio-3.4.0.Beta1.jar:3.4.0.Beta1]
      	at io.undertow.server.protocol.http.HttpResponseConduit.write(HttpResponseConduit.java:621) ~[undertow-core-1.3.0.Beta9.jar:1.3.0.Beta9]
      	at io.undertow.conduits.ChunkedStreamSinkConduit.doWrite(ChunkedStreamSinkConduit.java:163) ~[undertow-core-1.3.0.Beta9.jar:1.3.0.Beta9]
      	at io.undertow.conduits.ChunkedStreamSinkConduit.write(ChunkedStreamSinkConduit.java:127) ~[undertow-core-1.3.0.Beta9.jar:1.3.0.Beta9]
      	at io.undertow.conduits.ChunkedStreamSinkConduit.write(ChunkedStreamSinkConduit.java:216) ~[undertow-core-1.3.0.Beta9.jar:1.3.0.Beta9]
      	at org.xnio.conduits.ConduitStreamSinkChannel.write(ConduitStreamSinkChannel.java:158) ~[xnio-api-3.4.0.Beta1.jar:3.4.0.Beta1]
      	at io.undertow.channels.DetachableStreamSinkChannel.write(DetachableStreamSinkChannel.java:179) ~[undertow-core-1.3.0.Beta9.jar:1.3.0.Beta9]
      	at io.undertow.server.HttpServerExchange$WriteDispatchChannel.write(HttpServerExchange.java:1888) ~[undertow-core-1.3.0.Beta9.jar:1.3.0.Beta9]
      	at org.xnio.channels.Channels.writeBlocking(Channels.java:152) ~[xnio-api-3.4.0.Beta1.jar:3.4.0.Beta1]
      	at io.undertow.io.UndertowOutputStream.write(UndertowOutputStream.java:161) ~[undertow-core-1.3.0.Beta9.jar:1.3.0.Beta9]
      	at io.undertow.io.UndertowOutputStream.write(UndertowOutputStream.java:102) ~[undertow-core-1.3.0.Beta9.jar:1.3.0.Beta9]
      	at immutant.web.internal.ring$eval1911$fn__1912.invoke(ring.clj:131) ~[na:na]
      	at clojure.lang.MultiFn.invoke(MultiFn.java:238) ~[clojure-1.8.0.jar:na]
      	at immutant.web.internal.undertow$eval3572$fn__3610$action__3611.invoke(undertow.clj:159) ~[na:na]
      	at immutant.web.internal.undertow$eval3572$fn__3610.invoke(undertow.clj:172) ~[na:na]
      	at immutant.web.internal.ring$eval1829$fn__1852$G__1818__1863.invoke(ring.clj:106) ~[na:na]
      	at immutant.web.internal.ring$write_response.invokeStatic(ring.clj:149) ~[na:na]
      	at immutant.web.internal.ring$write_response.invoke(ring.clj:142) ~[na:na]
      	at immutant.web.internal.undertow$create_http_handler$reify__3650.handleRequest(undertow.clj:239) ~[na:na]
      	at org.projectodd.wunderboss.web.undertow.async.websocket.UndertowWebsocket$2.handleRequest(UndertowWebsocket.java:104) ~[wunderboss-web-undertow-0.12.0.jar:na]
      	at io.undertow.server.session.SessionAttachmentHandler.handleRequest(SessionAttachmentHandler.java:68) ~[undertow-core-1.3.0.Beta9.jar:1.3.0.Beta9]
      	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:199) ~[undertow-core-1.3.0.Beta9.jar:1.3.0.Beta9]
      	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:778) ~[undertow-core-1.3.0.Beta9.jar:1.3.0.Beta9]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_75]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_75]
      	at java.lang.Thread.run(Thread.java:745) ~[na:1.7.0_75]
      

      From the stack trace I figured that this is either a Problem with Immutant or Undertow. I'm not entirely sure though.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                eschon Egon Steiner
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: