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

Some java.net tests failed with NoRouteToHostException on MacOS with special network configuration

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b17
    • OS:
      os_x_10.15

      Backports

        Description

        The following tests failed with NoRouteToHostException on some new Mac machines:
        java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java
        java/nio/channels/DatagramChannel/AdaptorMulticasting.java
        java/net/Socket/LinkLocal.java
        java/net/MulticastSocket/SetOutgoingIf.java
        java/net/MulticastSocket/Promiscuous.java
        java/net/InetAddress/CheckJNI.java

        We found there was a kind of coprocessor in the new Macs, the coprocessor is configured as a network interface but without route. So the tests always failed when they tried to send data from the network interface.

        For example, the following log of MulticastSendReceiveTests.java:
        ----------System.out:(128/4775)----------

        Test DatagramChannel to UNSPEC socket
        join 225.4.5.6 @ en0
        Send message from 10.133.68.130 -> group 225.4.5.6 (id=0x879910db)
        Waiting to receive message
        Received message from /10.133.68.130 (id=0x879910db)
        Message expected
        block 10.133.68.130
        Exclude-mode filtering not supported!
        join 225.4.5.6 @ en0 only-source 1.2.3.4
        Include-mode filtering not supported!

        Test DatagramChannel to INET socket
        join 225.4.5.6 @ en0
        Send message from 10.133.68.130 -> group 225.4.5.6 (id=0xff233b68)
        Waiting to receive message
        Received message from /10.133.68.130 (id=0xff233b68)
        Message expected
        block 10.133.68.130
        Exclude-mode filtering not supported!
        join 225.4.5.6 @ en0 only-source 1.2.3.4
        Send message from 10.133.68.130 -> group 225.4.5.6 (id=0x822f5d01)
        Waiting to receive message
        No message received (correct)
        join 225.4.5.6 @ en0 only-source 10.133.68.130
        Send message from 10.133.68.130 -> group 225.4.5.6 (id=0xb70c0190)
        Waiting to receive message
        Received message from /10.133.68.130 (id=0xb70c0190)
        Message expected

        Test DatagramChannel to INET6 socket
        join 225.4.5.6 @ en0
        Send message from 10.133.68.130 -> group 225.4.5.6 (id=0xdb98b948)
        Waiting to receive message
        Received message from /10.133.68.130 (id=0xdb98b948)
        Message expected
        block 10.133.68.130
        Exclude-mode filtering not supported!
        join 225.4.5.6 @ en0 only-source 1.2.3.4
        Include-mode filtering not supported!

        Test DatagramChannel to UNSPEC socket
        join 225.4.5.6 @ en1
        Send message from 169.254.58.241 -> group 225.4.5.6 (id=0xa85c58b1)
        Waiting to receive message
        Received message from /169.254.58.241 (id=0xa85c58b1)
        Message expected
        block 169.254.58.241
        Exclude-mode filtering not supported!
        join 225.4.5.6 @ en1 only-source 1.2.3.4
        Include-mode filtering not supported!

        Test DatagramChannel to INET socket
        join 225.4.5.6 @ en1
        Send message from 169.254.58.241 -> group 225.4.5.6 (id=0x6d0c3714)
        Waiting to receive message
        Received message from /169.254.58.241 (id=0x6d0c3714)
        Message expected
        block 169.254.58.241
        Exclude-mode filtering not supported!
        join 225.4.5.6 @ en1 only-source 1.2.3.4
        Send message from 169.254.58.241 -> group 225.4.5.6 (id=0x9a2a4472)
        Waiting to receive message
        No message received (correct)
        join 225.4.5.6 @ en1 only-source 169.254.58.241
        Send message from 169.254.58.241 -> group 225.4.5.6 (id=0x94ab1b2b)
        Waiting to receive message
        Received message from /169.254.58.241 (id=0x94ab1b2b)
        Message expected

        Test DatagramChannel to INET6 socket
        join 225.4.5.6 @ en1
        Send message from 169.254.58.241 -> group 225.4.5.6 (id=0x9aef40c5)
        Waiting to receive message
        Received message from /169.254.58.241 (id=0x9aef40c5)
        Message expected
        block 169.254.58.241
        Exclude-mode filtering not supported!
        join 225.4.5.6 @ en1 only-source 1.2.3.4
        Include-mode filtering not supported!

        Test DatagramChannel to UNSPEC socket
        join ff02:0:0:0:0:0:0:a @ en0
        Send message from fe80:0:0:0:c3a:428b:e19b:85ba%en0 -> group ff02:0:0:0:0:0:0:a (id=0xf063016a)
        Waiting to receive message
        Received message from /fe80:0:0:0:c3a:428b:e19b:85ba%4 (id=0xf063016a)
        Message expected
        block fe80:0:0:0:c3a:428b:e19b:85ba%en0
        Exclude-mode filtering not supported!
        join ff02:0:0:0:0:0:0:a @ en0 only-source fe80:0:0:0:0:0:0:1234
        Include-mode filtering not supported!

        Test DatagramChannel to INET6 socket
        join ff02:0:0:0:0:0:0:a @ en0
        Send message from fe80:0:0:0:c3a:428b:e19b:85ba%en0 -> group ff02:0:0:0:0:0:0:a (id=0x19797d9c)
        Waiting to receive message
        Received message from /fe80:0:0:0:c3a:428b:e19b:85ba%4 (id=0x19797d9c)
        Message expected
        block fe80:0:0:0:c3a:428b:e19b:85ba%en0
        Exclude-mode filtering not supported!
        join ff02:0:0:0:0:0:0:a @ en0 only-source fe80:0:0:0:0:0:0:1234
        Include-mode filtering not supported!

        Test DatagramChannel to UNSPEC socket
        join ff02:0:0:0:0:0:0:a @ en1
        Send message from fe80:0:0:0:10cf:f27d:b963:9b38%en1 -> group ff02:0:0:0:0:0:0:a (id=0x13faa23)
        Waiting to receive message
        Received message from /fe80:0:0:0:10cf:f27d:b963:9b38%7 (id=0x13faa23)
        Message expected
        block fe80:0:0:0:10cf:f27d:b963:9b38%en1
        Exclude-mode filtering not supported!
        join ff02:0:0:0:0:0:0:a @ en1 only-source fe80:0:0:0:0:0:0:1234
        Include-mode filtering not supported!

        Test DatagramChannel to INET6 socket
        join ff02:0:0:0:0:0:0:a @ en1
        Send message from fe80:0:0:0:10cf:f27d:b963:9b38%en1 -> group ff02:0:0:0:0:0:0:a (id=0xc1ee93e7)
        Waiting to receive message
        Received message from /fe80:0:0:0:10cf:f27d:b963:9b38%7 (id=0xc1ee93e7)
        Message expected
        block fe80:0:0:0:10cf:f27d:b963:9b38%en1
        Exclude-mode filtering not supported!
        join ff02:0:0:0:0:0:0:a @ en1 only-source fe80:0:0:0:0:0:0:1234
        Include-mode filtering not supported!

        Test DatagramChannel to UNSPEC socket
        join ff02:0:0:0:0:0:0:a @ en6
        Send message from fe80:0:0:0:aede:48ff:fe00:1122%en6 -> group ff02:0:0:0:0:0:0:a (id=0x2309ce22)
        ----------System.err:(18/1210)----------
        java.net.NoRouteToHostException: No route to host
        at java.base/sun.nio.ch.DatagramChannelImpl.send0(Native Method)
        at java.base/sun.nio.ch.DatagramChannelImpl.sendFromNativeBuffer(DatagramChannelImpl.java:894)
        at java.base/sun.nio.ch.DatagramChannelImpl.send(DatagramChannelImpl.java:871)
        at java.base/sun.nio.ch.DatagramChannelImpl.send(DatagramChannelImpl.java:814)
        at MulticastSendReceiveTests.sendDatagram(MulticastSendReceiveTests.java:79)
        at MulticastSendReceiveTests.test(MulticastSendReceiveTests.java:184)
        at MulticastSendReceiveTests.main(MulticastSendReceiveTests.java:276)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
        at java.base/java.lang.Thread.run(Thread.java:832)

        JavaTest Message: Test threw exception: java.net.NoRouteToHostException
        JavaTest Message: shutting down test

        We searched the following information about the coprocessor:

        The en6 interface is listed as iBridge according to system_profiler:

          iBridge:
              Type: USB
              BSD name: en6
              Kext name: AppleUSBNCM.kext
              Location: /System/Library/Extensions/AppleUSBNCM.kext
              Version: 5.0.0
              MAC Address: ac:de:48:00:11:22
              Product ID: 33331
              Vendor ID: 1452

        "iBridge is the code name for the T series coprocessor (e.g. T1 or T2 chip) in newer Macs. It manages the Touch ID sensor, as well as the FaceTime camera and audio control. It is present even on Macs that don't have a Touch Bar, like the 2018 MacBook Air and Mac mini.”

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                dfuchs Daniel Fuchs
                Reporter:
                fyuan Frank Yuan (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                11 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: