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

(so) Platform differences of Selector reporting the OP_WRITE event

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.4.1
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      hopper
    • CPU:
      generic
    • OS:
      solaris_8
    • Verification:
      Verified

      Description

      Customer Problem Description:
      -----------------------------
      On Windows, OP_WRITE (Socket writable) is reported by the Selector when a non-blocking Socket is initially writable, then only when it becomes writable again (I assume when the underlying buffer has space after being full). In other words, when writable state changes.


      On Solaris, OP_WRITE is reported constantly for Sockets whose output buffers are not full. This means that the select loop is constantly busy reporting that Sockets are writable. This appears to cause OP_READ not to be reported correctly.

      The difference is important in our product LREPCAST for the way that pings to the client and the use of the backlog queue are handled.

      In the sample program attached, you will see that a ready channel is repeatedly reported as Writable and the buffer text "Brian" is continuously displayed
      on the telnet window.

      Whereas, on Windows only one notification will occur and "Brian" is displayed
      exactly once.

      To run the testcase:

      On one terminal window (or cmd window) , run java WriteTest
      Open another terminal window (or cmd window) and run telnet localhost 1110

      You will notice the difference in behaviour on Solaris and Win32 platform.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kkladkosunw Konstantin Kladko (Inactive)
              Reporter:
              cprasadsunw Ck Prasad (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: