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

Check NIO native code to ensure that it restarts any sys calls

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.4.0, 1.4.2
    • Fix Version/s: 1.4.2_07
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b02
    • CPU:
      generic
    • OS:
      generic, linux

      Description


      The NIO native code should be examined to see if there are any
      placed where it should restart following interruption by a
      signal -- ie: any system calls that return EINTR.

      Specifically the following should be reviewed on Solaris/Linux :-

      - SocketChannelImpl.accept as accept is not automatically
      restarted

      - Selector implementor based on "poll" may not be automatically
      started (SocketChannel.finishConnect also; /dev/poll should be
      okay because ioctl is automatically restarted).


      Further notes :-

      4178050 & 4425033 were recently fixed in HotSpot to ensure that system
      calls are transparent restarted. This addresses the issue for
      legacy networking as it must use HPI for blocking I/O (to get
      the interruptable I/O semantics on Solaris).

      Solaris lwp signal handler redirects process signal (such as
      SIGPIPE). The "alogrithm" it uses to pick a thread makes it
      more likely to pick a blocked thread.

      If poll is interrupted and transparently restart it may be
      necesary to adjust the timeout -- eg: if EINTR after x ms
      then need to restart poll with timeout-x ms.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                lyobssunw Lew Yobs (Inactive)
                Reporter:
                alanb Alan Bateman
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: