JDK-7094552 : test/java/net/MulticastSocket/Test.java failing on Solaris 10
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 8
  • Priority: P3
  • Status: Closed
  • Resolution: Not an Issue
  • OS: generic
  • CPU: generic
  • Submitted: 2011-09-24
  • Updated: 2017-05-04
  • Resolved: 2011-11-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Resolved
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Description
#Test Results (version 2)
#Fri Sep 23 01:37:27 UTC 2011
#checksum:55090452730e56cc
#-----testdescription-----
$file=/Users/aurora/sandbox/testbase/test/java/net/MulticastSocket/Test.java
$root=/Users/aurora/sandbox/testbase/test
keywords=bug4488458
run=ASSUMED_ACTION main Test\n
source=Test.java
title=IPv4 and IPv6 multicasting broken on Linux

#-----environment-----

#-----testresult-----
description=file:/Users/aurora/sandbox/testbase/test/java/net/MulticastSocket/Test.java
elapsed=8020 0:00:08.020
end=Fri Sep 23 01:37:27 UTC 2011
environment=regtest
execStatus=Failed. Execution failed: `main' threw exception: java.lang.Exception: Test failed - see log file for details
hostname=sc14160049
javatestOS=SunOS 5.10 (x86)
javatestVersion=4.1.4
script=com.sun.javatest.regtest.RegressionScript 
sections=script_messages build compile main
start=Fri Sep 23 01:37:19 UTC 2011
test=java/net/MulticastSocket/Test.java
work=/Users/aurora/sandbox/gresults/testoutput/jdk_net/JTwork/java/net/MulticastSocket

#section:script_messages
----------messages:(4/179)----------
JDK under test: (/Users/aurora/sandbox/jdk)
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b9265)
Java HotSpot(TM) Server VM (build 22.0-b03, mixed mode)

#section:build
----------messages:(3/89)----------
command: build Test
reason: Named class compiled on demand
elapsed time (seconds): 0.013
result: Passed. Build successful

#section:compile
----------messages:(3/168)----------
command: compile /Users/aurora/sandbox/testbase/test/java/net/MulticastSocket/Test.java
reason: .class file out of date or does not exist
elapsed time (seconds): 0.013
result: Passed. Compilation successful

#section:main
----------messages:(3/107)----------
command: main Test
reason: Assumed action based on file name: run main Test 
elapsed time (seconds): 8.005
----------System.out:(24/616)----------
**********************
Test 1: /224.80.80.80
Join: /224.80.80.80
Send packet to: /224.80.80.80
Got packet! - Good.
Send packet to: /224.80.80.80
Got packet! - Good.
Leave: /224.80.80.80
No packet received within timeout! - Good.
Join: /224.80.80.80
Send packet to: /224.80.80.80
Got packet! - Good.
Send packet to: /224.80.80.80
Got packet! - Good.
Leave: /224.80.80.80
No packet received within timeout! - Good.
Test passed.
**********************
Test 2: /ff01:0:0:0:0:0:0:a
Join: /ff01:0:0:0:0:0:0:a
Failed: Unexpected exception thrown: 
Test failed!!
**********************
2 test(s) executed. 1 test(s) failed.
----------System.err:(25/1374)----------
java.net.SocketException: Cannot assign requested address
	at java.net.PlainDatagramSocketImpl.join(Native Method)
	at java.net.AbstractPlainDatagramSocketImpl.join(AbstractPlainDatagramSocketImpl.java:168)
	at java.net.MulticastSocket.joinGroup(MulticastSocket.java:306)
	at Test.doTest(Test.java:60)
	at Test.allTests(Test.java:167)
	at Test.main(Test.java:187)
	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:474)
	at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:680)
	at java.lang.Thread.run(Thread.java:722)
java.lang.Exception: Test failed - see log file for details
	at Test.main(Test.java:199)
	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:474)
	at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:680)
	at java.lang.Thread.run(Thread.java:722)

JavaTest Message: Test threw exception: java.lang.Exception
JavaTest Message: shutting down test

result: Failed. Execution failed: `main' threw exception: java.lang.Exception: Test failed - see log file for details


test result: Failed. Execution failed: `main' threw exception: java.lang.Exception: Test failed - see log file for details

Comments
EVALUATION When a persistent route is added for ff00::/8 these test all pass.
10-11-2011

EVALUATION With the follow system changes now all java/net/MulticastSocket tests pass on sc14160049. We may need to make these changes persistent so they are not lost during reboot. [jlabs.SFBay.Sun.COM]sc14160049 : su uadmin Password: # ifconfig xnf0 inet6 plumb # ifconfig xnf0 inet6 up # ifconfig -a lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 xnf0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet xxx.xxx.xxx.xxx netmask fffff800 broadcast xxx.xxx.xxx.255 ether 0:16:3e:b:a0:96 lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1 inet6 ::1/128 xnf0: flags=2000841<UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 2 inet6 fe80::216:3eff:fe0b:a096/10 ether 0:16:3e:b:a0:96 # route add -inet6 ff00::/8 fe80::216:3eff:fe0b:a096 add net ff00::/8: gateway fe80::216:3eff:fe0b:a096 # netstat -rn -f inet6 Routing Table: IPv6 Destination/Mask Gateway Flags Ref Use If --------------------------- --------------------------- ----- --- ------- ----- fe80::/10 fe80::216:3eff:fe0b:a096 U 1 0 xnf0 ff00::/8 fe80::216:3eff:fe0b:a096 UG 1 0 ::1 ::1 UH 1 1312 lo0 sc14160049 : jtreg -v1 -samevm -ea -esa -jdk:/java/re/jdk/7/latest/binaries/solaris-i586 java/net/MulticastSocket Passed: java/net/MulticastSocket/B6425815.java Passed: java/net/MulticastSocket/B6427403.java Passed: java/net/MulticastSocket/JoinGroup.java Passed: java/net/MulticastSocket/Leave.java Passed: java/net/MulticastSocket/MulticastTTL.java Passed: java/net/MulticastSocket/NoLoopbackPackets.java Passed: java/net/MulticastSocket/SetLoopbackMode.java Passed: java/net/MulticastSocket/SetOutgoingIf.java Passed: java/net/MulticastSocket/SetTTLAndGetTTL.java Passed: java/net/MulticastSocket/SetTTLTo0.java Passed: java/net/MulticastSocket/Test.java Passed: java/net/MulticastSocket/TestDefaults.java Passed: java/net/MulticastSocket/TestInterfaces.java Passed: java/net/MulticastSocket/TimeToLive.java Test results: passed: 14
30-09-2011

EVALUATION Looking at the output of ifconfig. Again this is a slightly strange configuration: [jlabs.SFBay.Sun.COM]sc14160049 : ifconfig -a lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 xnf0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 10.xxx.xxx.xxx netmask fffff800 broadcast 10.xxx.xxx.255 lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1 inet6 ::1/128 IPv6 is enabled, but there is only the loopback address up and running. I would have expected to see an IPv6 address plumbed for xnf0. If we take a look at the routing table I believe we can see that the system doesn't know what interface to join the IPv6 node-local multicast group on. [jlabs.SFBay.Sun.COM]sc14160049 : netstat -rn -f inet6 Routing Table: IPv6 Destination/Mask Gateway Flags Ref Use If --------------------------- --------------------------- ----- --- ------- ----- ::1 ::1 UH 1 963 lo0 Typically you would see something like: marino : netstat -rn -f inet6 Routing Table: IPv6 Destination/Mask Gateway Flags Ref Use If --------------------------- --------------------------- ----- --- ------- ----- fe80::/10 fe80::21b:24ff:febd:f29c U 1 0 e1000g0 ff00::/8 fe80::21b:24ff:febd:f29c U 1 0 e1000g0 ::1 ::1 UH 1 315 lo0 I suspect this is because there isn't an IPv6 address associated with a real interface. We could get root access to the machine and manually add a route, but I wonder if the test should just not try any IPv6 multicasting unless there is a site, link-local, or global address assigned? The test also doesn't check if the interface isUp, supportsMulticasting.
27-09-2011