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

NetworkInterface.getNetworkInterfaces() triggers intermittent test failures

    XMLWordPrintable

Details

    • b55
    • generic
    • windows

    Backports

      Description

         ThreadLocalRandom initialization causes sun/net/www/protocol/http/B6369510.java failed intermittently. This due to the initial seed creation using NetworkIntereface.getNetworkInterfaces() for its random number creation. The NetworkIntereface.getNetworkInterfaces() call flow can fail intermittently
        due to GetAdaptersAddresses failing. Further discussion details below.

          This happened once in JDK9/b38 same binaries runs on Windows. It is probably related with teredo pseudo interface, which may change timely.

        The error is like:
        ----------System.err:(31/2081)----------
        java.lang.Error: IP Helper Library GetAdaptersAddresses function failed
        at java.net.NetworkInterface.getAll(Native Method)
        at java.net.NetworkInterface.getNetworkInterfaces(NetworkInterface.java:343)
        at java.util.concurrent.ThreadLocalRandom.initialSeed(ThreadLocalRandom.java:153)
        at java.util.concurrent.ThreadLocalRandom.<clinit>(ThreadLocalRandom.java:137)
        at java.util.concurrent.ConcurrentSkipListMap.doPut(ConcurrentSkipListMap.java:857)
        at java.util.concurrent.ConcurrentSkipListMap.putIfAbsent(ConcurrentSkipListMap.java:1962)
        at java.util.concurrent.ConcurrentSkipListSet.add(ConcurrentSkipListSet.java:241)
        at java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:816)
        at java.net.InetAddress.getAllByName0(InetAddress.java:1249)
        at java.net.InetAddress.getAllByName0(InetAddress.java:1169)
        at java.net.InetAddress.getHostFromNameService(InetAddress.java:615)
        at java.net.InetAddress.getHostName(InetAddress.java:540)
        at java.net.InetAddress.getHostName(InetAddress.java:512)
        at java.net.InetSocketAddress$InetSocketAddressHolder.getHostName(InetSocketAddress.java:82)
        at java.net.InetSocketAddress$InetSocketAddressHolder.access$600(InetSocketAddress.java:56)
        at java.net.InetSocketAddress.getHostName(InetSocketAddress.java:345)
        at B6369510.doClient(B6369510.java:63)
        at B6369510.<init>(B6369510.java:52)
        at B6369510.main(B6369510.java:45)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
        at java.lang.Thread.run(Thread.java:745)

        Attachments

          Issue Links

            Activity

              People

                msheppar Mark Sheppard
                xiaofeya Xiaofeng Yang
                Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: