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

(so) System spins when interestOps(int) invoked (solaris/iMQ)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.4.0
    • 1.4.0
    • core-libs
    • rc1
    • sparc
    • solaris_7

      After several iterations of changing the interetOps on a single key,
      the system begins to spin:
          the cnt returns from select = 1
          but the set of selectedKeys is empty

      I am attaching a test case which demonstrates the problem.


      I'm changing interestOps because I need a way to:

      - prevent two threads from reading or writing on the
        same channel at the same time [ message order restrictions
        on the server]

      - I dont want to spin when the socket is available for writin
        but I have no data to write

      - I cant have seperate keys for read and write and cancel
         them seperately (because of problems on windows)

       ----------------------
      To run the test case:
         compile both files
         Run Server (receives messages and sends them back to the client)
         Run Client (sends messages to the server)

      When the error occurs, you should see something like:

      ERROR: System is spinning ..
      1001 iterations of errors
      Cnt from select = 1 doesnt match keys.size() 0

            mmcclosksunw Michael Mccloskey (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: