Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6240230

(se) Selector doesn't act on keys with matching interestOps and readyOps

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      generic, sparc
    • OS:
      solaris_9

      Description

      selectionKeys with readyOps that match interestOps are not picked up by the selector that they are registered with. This seems to only happen when interestOps are dynamically updated (with approproate synchronisation safeguards) on a registered key.

      The test case uses the standard pattern for developing a multi-threaded, NIO-based, network server at least up to the point in which inetestOps are modified for a Write event. Start the test case specifying a port number and 'false' as arguments and then connect to the port via telnet. Type something and hit return. Tne most frequently seen behaviour is that the app disconnects you, if you then repeat this step a few times, ultimately you do not get disconnected. On my test environment it always broke on the first connect. If 'false' is replaced on the command line with 'true' an extra level of synchronisation is added around the call to select() and this resolves the problem.

      This problem is not reproducible on all systems and does not occur on Windows (and possibly Linux).


      ###@###.### 2005-03-14 17:34:37 GMT

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              alanb Alan Bateman
              Reporter:
              duke J. Duke (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: