Hi, Please find below a fix for a test that has been seeing failing intermittently (once)...
https://bugs.openjdk.java.net/browse/JDK-8231037 8231037: java/net/InetAddress/ptr/Lookup.java fails intermittently due to reverse lookup failed webrev: http://cr.openjdk.java.net/~dfuchs/webrev_8231037/webrev.00/ This test wants to check that if a lookup works with the IPv4 stack then a reverse lookup should work with the dual stack too. The test starts with a hostname, spawns a subprocess in which it resolves the hostname to an IPv4 address using -Djava.net.preferIPv4Stack, then tries to reverse lookup the IPv4 address obtained from the subprocess using the default (dual) stack, and complains if doesn't get back the original hostname. The trick is that AFAIU going from hostname to IP address is no guarantee that going from IP address to hostname will succeed. The proposed fix is to start two subprocesses instead of one: - one that takes the host name and resolves it to an IPv4 address, using -Djava.net.preferIPv4Stack, - one that takes the IPv4 address and resolve it to a hostname, still using -Djava.net.preferIPv4Stack. If both are successful, then we verify, in the main process, that we are also able to resolve the IPv4 address to the same hostname using the default dual stack. I believe this preserves the spirit of the test, while eliminating the root cause of the instability that caused the test to intermittently fail. Some more diagnosis has also been added. best regards, -- daniel