tyrus
  1. tyrus
  2. TYRUS-198

Implement TyrusHttpUpgradeHandler#destroy()

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1
    • Component/s: None
    • Labels:
      None

      Description

      I guess that's the way to find out client disconnects(HttpUpgradeHandler#destroy() specifies about client disconnects) in servlet container

        Activity

        Hide
        Pavel Bucek added a comment -

        seems like duplicate of TYRUS-175.. can you please confirm? (maybe close this one and add comment to TYRUS-175?)

        Show
        Pavel Bucek added a comment - seems like duplicate of TYRUS-175 .. can you please confirm? (maybe close this one and add comment to TYRUS-175 ?)
        Hide
        jitu added a comment -

        TYRUS-175 claims that close frame is sent, but still @OnClose method is not called (but not sure whether it is received by the server). In that sense, it seems to be different.

        Show
        jitu added a comment - TYRUS-175 claims that close frame is sent, but still @OnClose method is not called (but not sure whether it is received by the server). In that sense, it seems to be different.
        Hide
        Pavel Bucek added a comment -

        well, destroy is sometimes called. Unfortunately, it does not seem to be reliable.

        When I close browser tab (connection is interrupted), TyrusUpgradeHandler#onError is called with NPE:

        [2013-06-18T18:07:51.238+0200] [glassfish 4.0] [SEVERE] [] [] [tid: _ThreadID=29 _ThreadName=Thread-8] [timeMillis: 1371571671238] [levelValue: 1000] [[
          java.lang.NullPointerException
        	at org.apache.catalina.connector.InputBuffer.isReady(InputBuffer.java:281)
        	at org.apache.catalina.connector.CoyoteInputStream.isReady(CoyoteInputStream.java:299)
        	at org.glassfish.tyrus.servlet.TyrusHttpUpgradeHandler.onDataAvailable(TyrusHttpUpgradeHandler.java:140)
        	at org.apache.catalina.connector.InputBuffer$ReadHandlerImpl.processDataAvailable(InputBuffer.java:488)
        	at org.apache.catalina.connector.InputBuffer$ReadHandlerImpl.onDataAvailable(InputBuffer.java:453)
        	at org.glassfish.grizzly.http.io.InputBuffer.append(InputBuffer.java:855)
        	at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:220)
        	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
        	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
        	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
        	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
        	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
        	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
        	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:837)
        	at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
        	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
        	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
        	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
        	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
        	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
        	at java.lang.Thread.run(Thread.java:722)]]

        line 140 in TyrusUpgradeHandler is servletInputStream.isReady() call.. seems like a bug in servlet impl? Jitu, do you have any comments/insight?

        Show
        Pavel Bucek added a comment - well, destroy is sometimes called. Unfortunately, it does not seem to be reliable. When I close browser tab (connection is interrupted), TyrusUpgradeHandler#onError is called with NPE: [2013-06-18T18:07:51.238+0200] [glassfish 4.0] [SEVERE] [] [] [tid: _ThreadID=29 _ThreadName= Thread -8] [timeMillis: 1371571671238] [levelValue: 1000] [[ java.lang.NullPointerException at org.apache.catalina.connector.InputBuffer.isReady(InputBuffer.java:281) at org.apache.catalina.connector.CoyoteInputStream.isReady(CoyoteInputStream.java:299) at org.glassfish.tyrus.servlet.TyrusHttpUpgradeHandler.onDataAvailable(TyrusHttpUpgradeHandler.java:140) at org.apache.catalina.connector.InputBuffer$ReadHandlerImpl.processDataAvailable(InputBuffer.java:488) at org.apache.catalina.connector.InputBuffer$ReadHandlerImpl.onDataAvailable(InputBuffer.java:453) at org.glassfish.grizzly.http.io.InputBuffer.append(InputBuffer.java:855) at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:220) at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:837) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545) at java.lang. Thread .run( Thread .java:722)]] line 140 in TyrusUpgradeHandler is servletInputStream.isReady() call.. seems like a bug in servlet impl? Jitu, do you have any comments/insight?
        Hide
        jitu added a comment -

        I also think that it is servlet container's issue esp grizzly is detecting and informing about disconnect. Adding Shing Wai to the watcher's list.

        Show
        jitu added a comment - I also think that it is servlet container's issue esp grizzly is detecting and informing about disconnect. Adding Shing Wai to the watcher's list.
        Hide
        Pavel Bucek added a comment -

        fixed in the trunk (rev 691)

        Show
        Pavel Bucek added a comment - fixed in the trunk (rev 691)

          People

          • Assignee:
            Pavel Bucek
            Reporter:
            jitu
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: