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

Flush in RMI TCPChannel createConnection can hang indefinitely

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 9
    • Fix Version/s: tbd
    • Component/s: core-libs
    • Labels:
      None

      Description

      sun.rmi.transport.tcp.TCPChannel.createConnection line 227 can hang indefinitely.
      The initialization of the socket timeout should occur before the first flush.

      This method flushes the DataOutputStream without the socket
      timeout settings when choosing the stream protocol [1]. If the connection is lost
      or the destination server does not return a response during the flush,
      this method waits forever because the timeout settings is set the
      default value of SO_TIMEOUT, i.e., infinite.

        Attachments

        1. 8151212.patch
          3 kB
        2. reproducer.zip
          15 kB
        3. reproducer-raw.txt
          23 kB

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rriggs Roger Riggs
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: