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

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

XMLWordPrintable

    • b02
    • generic
    • generic, linux


      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.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: