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

        Catherine Hope created issue -
        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.
        Catherine Hope made changes -
        Field Original Value New Value
        Attachment 6586.patch [ 12449554 ]
        Regis Xu made changes -
        Assignee Regis Xu [ regis_xu ]
        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.
        Regis Xu made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 5.0M15 [ 12315054 ]
        Resolution Fixed [ 1 ]
        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
        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
        Catherine Hope added a comment -

        Verified, thanks!

        Show
        Catherine Hope added a comment - Verified, thanks!
        Catherine Hope made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        20h 14m 1 Regis Xu 16/Jul/10 09:52
        Resolved Resolved Closed Closed
        5d 5h 24m 1 Catherine Hope 21/Jul/10 15:16

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development