grizzly
  1. grizzly
  2. GRIZZLY-958

Problem with Suspend/Resume mode in Grizzly

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.9.28
    • Fix Version/s: 1.9.29
    • Component/s: http
    • Labels:
      None
    • Environment:

      Windows / JDK 1.6.0_21

      Description

      Suspend and Resuming a response can cause NPE in some situation :

      java.lang.NullPointerException
      at com.sun.grizzly.tcp.Response.resume(Response.java:784)
      at com.acme.MyExecutor.run(MyExecutor.java:55)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:619)

      I've attach a runnable Maven test case project that reproduce it.

        Activity

        Hide
        oleksiys added a comment -

        Project: grizzly
        Repository: svn
        Revision: 5711
        Author: oleksiys
        Date: 2011-01-19 16:58:35 UTC
        Link:

        Log Message:
        ------------
        + fix issue #954
        http://java.net/jira/browse/GRIZZLY-954
        "Grizzly somehow mixes sessions from different requests returning wrong resource"

        Grizzly had problem with pipelined HTTP requests processing when SelectorThread operates in async mode.
        Fixed.

        + fix issue #958
        http://java.net/jira/browse/GRIZZLY-958
        "Problem with Suspend/Resume mode in Grizzly"

        suspended thread shouldn't try to finish response

        Revisions:
        ----------
        5711

        Modified Paths:
        ---------------
        trunk/code/modules/http/src/main/java/com/sun/grizzly/arp/AsyncTask.java
        trunk/code/modules/http/src/main/java/com/sun/grizzly/arp/DefaultAsyncExecutor.java
        trunk/code/modules/http/src/main/java/com/sun/grizzly/arp/AsyncProcessorTask.java
        trunk/code/modules/http/src/main/java/com/sun/grizzly/arp/AsyncExecutor.java
        trunk/code/modules/http/src/main/java/com/sun/grizzly/http/ProcessorTask.java

        Show
        oleksiys added a comment - Project: grizzly Repository: svn Revision: 5711 Author: oleksiys Date: 2011-01-19 16:58:35 UTC Link: Log Message: ------------ + fix issue #954 http://java.net/jira/browse/GRIZZLY-954 "Grizzly somehow mixes sessions from different requests returning wrong resource" Grizzly had problem with pipelined HTTP requests processing when SelectorThread operates in async mode. Fixed. + fix issue #958 http://java.net/jira/browse/GRIZZLY-958 "Problem with Suspend/Resume mode in Grizzly" suspended thread shouldn't try to finish response Revisions: ---------- 5711 Modified Paths: --------------- trunk/code/modules/http/src/main/java/com/sun/grizzly/arp/AsyncTask.java trunk/code/modules/http/src/main/java/com/sun/grizzly/arp/DefaultAsyncExecutor.java trunk/code/modules/http/src/main/java/com/sun/grizzly/arp/AsyncProcessorTask.java trunk/code/modules/http/src/main/java/com/sun/grizzly/arp/AsyncExecutor.java trunk/code/modules/http/src/main/java/com/sun/grizzly/http/ProcessorTask.java

          People

          • Assignee:
            Unassigned
            Reporter:
            David GAY
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: