Harmony
  1. Harmony
  2. HARMONY-6586

[classlib][luni] java.net.ServerSocket.accept throws BindException when the accept fails with ECONNABORTED

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0M15
    • Component/s: Classlib
    • Labels:
      None
    • Patch Info:
      Patch Available
    • Estimated Complexity:
      Moderate

      Description

      Socket accept calls should be repeated if the accept system call fails with errno ECONNABORTED, instead of the current behaviour which throws a java.net.BindException if the accept fails for any reason. In cases where the accept fails with a different error the RI throws a SocketException. This problem was found running Tomcat regression tests, but I don't have a simple testcase to reproduce the scenario.

      1. 6586.patch
        3 kB
        Catherine Hope

        Activity

        Hide
        Catherine Hope added a comment -

        Verified, thanks!

        Show
        Catherine Hope added a comment - Verified, thanks!
        Hide
        Hudson added a comment -

        Integrated in Harmony-select-1.5-head-linux-x86_64 #67 (See http://hudson.zones.apache.org/hudson/job/Harmony-select-1.5-head-linux-x86_64/67/)
        Apply patch for HARMONY-6586: [classlib][luni] java.net.ServerSocket.accept throws BindException when the accept fails with ECONNABORTED

        Show
        Hudson added a comment - Integrated in Harmony-select-1.5-head-linux-x86_64 #67 (See http://hudson.zones.apache.org/hudson/job/Harmony-select-1.5-head-linux-x86_64/67/ ) Apply patch for HARMONY-6586 : [classlib] [luni] java.net.ServerSocket.accept throws BindException when the accept fails with ECONNABORTED
        Hide
        Hudson added a comment -

        Integrated in Harmony-1.5-head-linux-x86_64 #897 (See http://hudson.zones.apache.org/hudson/job/Harmony-1.5-head-linux-x86_64/897/)
        Apply patch for HARMONY-6586: [classlib][luni] java.net.ServerSocket.accept throws BindException when the accept fails with ECONNABORTED

        Show
        Hudson added a comment - Integrated in Harmony-1.5-head-linux-x86_64 #897 (See http://hudson.zones.apache.org/hudson/job/Harmony-1.5-head-linux-x86_64/897/ ) Apply patch for HARMONY-6586 : [classlib] [luni] java.net.ServerSocket.accept throws BindException when the accept fails with ECONNABORTED
        Hide
        Regis Xu added a comment -

        Thanks Catherine!!

        Patch was applied at r964715, please verify.

        Show
        Regis Xu added a comment - Thanks Catherine!! Patch was applied at r964715, please verify.
        Hide
        Catherine Hope added a comment -

        The patch attached repeats the select/accept calls in org.apache.harmony.luni.platform.OSNetworkSystem.acceptStreamSocket if accept fails with errno ECONNABORTED, replaces the BindException with a SocketException and also removes the native method org.apache.harmony.luni.platform.OSNetworkSystem.acceptSocketImpl as it is not referenced anywhere.

        Show
        Catherine Hope added a comment - The patch attached repeats the select/accept calls in org.apache.harmony.luni.platform.OSNetworkSystem.acceptStreamSocket if accept fails with errno ECONNABORTED, replaces the BindException with a SocketException and also removes the native method org.apache.harmony.luni.platform.OSNetworkSystem.acceptSocketImpl as it is not referenced anywhere.

          People

          • Assignee:
            Regis Xu
            Reporter:
            Catherine Hope
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development