Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.22.0
    • Fix Version/s: 0.22.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      Mac OS 10.5.8 (Leopard)

    • Hadoop Flags:
      Reviewed
    • Tags:
      net

      Description

      TestNetUtils fails consistently after HADOOP-6722 on Mac OS X Leopard 10.5.8:

      ------------- Standard Error -----------------
      local address: /127.0.0.1
      local port: 64991
      ------------- ---------------- ---------------
      
      Testcase: testAvoidLoopbackTcpSockets took 0.421 sec
              Caused an ERROR
      Invalid argument
      java.net.SocketException: Invalid argument
              at sun.nio.ch.Net.connect(Native Method)
              at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
              at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:192)
              at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:369)
              at org.apache.hadoop.net.TestNetUtils.testAvoidLoopbackTcpSockets(TestNetUtils.java:46)
      

      Although TCP spec seems to allow it, at least one implementation disallows this corner case.

      1. hadoop-6747-trunk-v1.patch
        0.8 kB
        Luke Lu
      2. hadoop-6747.txt
        0.9 kB
        Todd Lipcon

        Activity

        Luke Lu created issue -
        Luke Lu made changes -
        Field Original Value New Value
        Description TestNetUtils fails consistently after HADOOP-6722 on Mac OS X Leopard 10.5.8:

        {{
        ------------- Standard Error -----------------
        local address: /127.0.0.1
        local port: 64991
        ------------- ---------------- ---------------

        Testcase: testAvoidLoopbackTcpSockets took 0.421 sec
                Caused an ERROR
        Invalid argument
        java.net.SocketException: Invalid argument
                at sun.nio.ch.Net.connect(Native Method)
                at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
                at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:192)
                at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:369)
                at org.apache.hadoop.net.TestNetUtils.testAvoidLoopbackTcpSockets(TestNetUtils.java:46)
        }}

        Although TCP spec seems to allow it, at least one implementation disallows this corner case.
        TestNetUtils fails consistently after HADOOP-6722 on Mac OS X Leopard 10.5.8:

        {{{
        ------------- Standard Error -----------------
        local address: /127.0.0.1
        local port: 64991
        ------------- ---------------- ---------------

        Testcase: testAvoidLoopbackTcpSockets took 0.421 sec
                Caused an ERROR
        Invalid argument
        java.net.SocketException: Invalid argument
                at sun.nio.ch.Net.connect(Native Method)
                at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
                at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:192)
                at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:369)
                at org.apache.hadoop.net.TestNetUtils.testAvoidLoopbackTcpSockets(TestNetUtils.java:46)
        }}}

        Although TCP spec seems to allow it, at least one implementation disallows this corner case.
        Todd Lipcon made changes -
        Assignee Todd Lipcon [ tlipcon ]
        Luke Lu made changes -
        Assignee Todd Lipcon [ tlipcon ]
        Description TestNetUtils fails consistently after HADOOP-6722 on Mac OS X Leopard 10.5.8:

        {{{
        ------------- Standard Error -----------------
        local address: /127.0.0.1
        local port: 64991
        ------------- ---------------- ---------------

        Testcase: testAvoidLoopbackTcpSockets took 0.421 sec
                Caused an ERROR
        Invalid argument
        java.net.SocketException: Invalid argument
                at sun.nio.ch.Net.connect(Native Method)
                at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
                at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:192)
                at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:369)
                at org.apache.hadoop.net.TestNetUtils.testAvoidLoopbackTcpSockets(TestNetUtils.java:46)
        }}}

        Although TCP spec seems to allow it, at least one implementation disallows this corner case.
        TestNetUtils fails consistently after HADOOP-6722 on Mac OS X Leopard 10.5.8:

        {noformat}
        ------------- Standard Error -----------------
        local address: /127.0.0.1
        local port: 64991
        ------------- ---------------- ---------------

        Testcase: testAvoidLoopbackTcpSockets took 0.421 sec
                Caused an ERROR
        Invalid argument
        java.net.SocketException: Invalid argument
                at sun.nio.ch.Net.connect(Native Method)
                at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
                at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:192)
                at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:369)
                at org.apache.hadoop.net.TestNetUtils.testAvoidLoopbackTcpSockets(TestNetUtils.java:46)
        {noformat}

        Although TCP spec seems to allow it, at least one implementation disallows this corner case.
        Hide
        Luke Lu added a comment -

        Fixing the test for this case seems to make more sense here.

        Show
        Luke Lu added a comment - Fixing the test for this case seems to make more sense here.
        Luke Lu made changes -
        Attachment hadoop-6747-trunk-v1.patch [ 12443531 ]
        Hide
        Todd Lipcon added a comment -

        Hi Luke. Does this attached patch fix the issue on your OSX box?

        Show
        Todd Lipcon added a comment - Hi Luke. Does this attached patch fix the issue on your OSX box?
        Todd Lipcon made changes -
        Attachment hadoop-6747.txt [ 12443532 ]
        Luke Lu made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Luke Lu added a comment -

        Looks like we attach pretty much the same patch at the same time

        Show
        Luke Lu added a comment - Looks like we attach pretty much the same patch at the same time
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12443532/hadoop-6747.txt
        against trunk revision 940527.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 3 new or modified tests.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/496/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/496/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/496/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/496/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12443532/hadoop-6747.txt against trunk revision 940527. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/496/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/496/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/496/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/496/console This message is automatically generated.
        Hide
        Steve Loughran added a comment -

        + 0 on this; I think its important for the tests to pass, it just irritates me whenever the underlying OS fails differently from other ones and you have to look for string messages to find the cause -very, very brittle. Might be best to say "this is macos and we see invalid argument" to lock down the platforms looked at, though that is equally painful.

        Show
        Steve Loughran added a comment - + 0 on this; I think its important for the tests to pass, it just irritates me whenever the underlying OS fails differently from other ones and you have to look for string messages to find the cause -very, very brittle. Might be best to say "this is macos and we see invalid argument" to lock down the platforms looked at, though that is equally painful.
        Hide
        Jakob Homan added a comment -

        +1
        I've committed this. I went with Todd's patch because it included a bit of explanation as to why this case was being handled (and despite ending with .txt, which isn't helpful for large patches).

        Thank you Todd. Resolving as fixed.

        Show
        Jakob Homan added a comment - +1 I've committed this. I went with Todd's patch because it included a bit of explanation as to why this case was being handled (and despite ending with .txt, which isn't helpful for large patches). Thank you Todd. Resolving as fixed.
        Jakob Homan made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags [Reviewed]
        Assignee Todd Lipcon [ tlipcon ]
        Resolution Fixed [ 1 ]
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #271 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk-Commit/271/)
        HADOOP-6747. TestNetUtils fails on Mac OS X (Todd Lipcon via jghoman)

        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #271 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk-Commit/271/ ) HADOOP-6747 . TestNetUtils fails on Mac OS X (Todd Lipcon via jghoman)
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk #350 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/350/)
        HADOOP-6747. TestNetUtils fails on Mac OS X (Todd Lipcon via jghoman)

        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk #350 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/350/ ) HADOOP-6747 . TestNetUtils fails on Mac OS X (Todd Lipcon via jghoman)
        Konstantin Shvachko made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Todd Lipcon
            Reporter:
            Luke Lu
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development