JDK-6974142 : NetworkInterface.getNetworkInterfaces throws SocketException on jtg-linux17 machine
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 7
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2010-08-03
  • Updated: 2011-01-25
  • Resolved: 2010-08-03
Related Reports
Duplicate :  
Description
http://sqeweb.sfbay.sun.com/nfs/tools/gtee/results/19/b05/jdk7b104/product/javase/linux-i586/client/mixed/linux-i586_javase_client_mixed_JT_JDK_com_sun_jdi/workDir/com/sun/jdi/ListenAddress.jtr

http://sqeweb.sfbay.sun.com/nfs/tools/gtee/results/19/b05/jdk7b104/product/javase/linux-i586/client/mixed/linux-i586_javase_client_mixed_JT_JDK_com_sun_jdi/analysis.html

java.net.SocketException: Address family not supported by protocol
	at java.net.NetworkInterface.getAll(Native Method)
	at java.net.NetworkInterface.getNetworkInterfaces(NetworkInterface.java:316)
	at ListenAddress.main(ListenAddress.java:93)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:613)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:717)

Note, that this failure occures on this particular (jtg-linux17) machine only (). Other linux-i586 (or other archs) machines seem to work fine. Note, that this CR looks familiar to 6972374.
Tescase name is com/sun/jdi/ListenAddress.java

Comments
EVALUATION The output of 'ifconfig -a' on the machine in question shows that it does not have IPv6 configured. The fix for 6931566 refactored the native network interface implemenation and left out a call to ipv6_available, to check if IPv6 is available and to be used, before trying to iterate over the IPv6 interfaces. CR 6964714, which has a slightly different description, fixes this problem by putting back the ipv6_available call.
03-08-2010