United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4488458 : JCK1.3a, api/java_net/MulticastSocket/descriptions.html#..., linux

Details
Type:
Bug
Submit Date:
2001-08-06
Status:
Closed
Updated Date:
2001-09-25
Project Name:
JDK
Resolved Date:
2001-09-18
Component:
core-libs
OS:
linux
Sub-Component:
java.net
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
1.4.0
Fixed Versions:
1.4.0 (beta3)

Related Reports

Sub Tasks

Description

Name: iaR10016			Date: 08/06/2001


JDK            : JDK1.4.0-beta-b74
JCK            : JCK1.3a
Platform[s]    : Suse Linux 7.1 (The tests pass under RedHat Linux 6.2, RedHat Linux 7.1, Turbo Linux 6.0)
switch/Mode    : -client -Xmixed
JCK test owner : http://javaweb.eng/jck/usr/owners.jto

Failing Tests:
==============
api/java_net/MulticastSocket/descriptions.html#leaveGroup [MulticastSocket2006]
api/java_net/MulticastSocket/descriptions.html#joinGroup [MulticastSocket1004, MulticastSocket2005, MulticastSocket2102]
api/java_net/MulticastSocket/descriptions.html#setTTL [MulticastSocket1017, MulticastSocket1018, MulticastSocket1019, MulticastSocket2009]
api/java_net/MulticastSocket/descriptions.html#getInterface [MulticastSocket1001, MulticastSocket2003]
api/java_net/MulticastSocket/descriptions.html#setTimeToLive [MulticastSocket1020, MulticastSocket1021, MulticastSocket1022, MulticastSocket2010]
api/java_net/MulticastSocket/descriptions.html#getTimeToLive [MulticastSocket1029, MulticastSocket2011]
api/java_net/MulticastSocket/descriptions.html#getTTL [MulticastSocket1002, MulticastSocket2004]

Test source location:
=====================
/net/jdk/export/disk8/local.java/jck1.3a/JCK-runtime-13a/api/java_net/MulticastSocket/*.java

jtr file location:
==================
/net/jtgb4u4c.eng/export/sail16/results/merlin/b74/jck13a/linux/suse7.1_single_gnome_client_linux-11/workDir/api/java_net/MulticastSocket/descriptions_leaveGroup.jtr
/net/jtgb4u4c.eng/export/sail16/results/merlin/b74/jck13a/linux/suse7.1_single_gnome_client_linux-11/workDir/api/java_net/MulticastSocket/descriptions_joinGroup.jtr
/net/jtgb4u4c.eng/export/sail16/results/merlin/b74/jck13a/linux/suse7.1_single_gnome_client_linux-11/workDir/api/java_net/MulticastSocket/descriptions_setTTL.jtr
/net/jtgb4u4c.eng/export/sail16/results/merlin/b74/jck13a/linux/suse7.1_single_gnome_client_linux-11/workDir/api/java_net/MulticastSocket/descriptions_getInterface.jtr
/net/jtgb4u4c.eng/export/sail16/results/merlin/b74/jck13a/linux/suse7.1_single_gnome_client_linux-11/workDir/api/java_net/MulticastSocket/descriptions_setTimeToLive.jtr
/net/jtgb4u4c.eng/export/sail16/results/merlin/b74/jck13a/linux/suse7.1_single_gnome_client_linux-11/workDir/api/java_net/MulticastSocket/descriptions_getTimeToLive.jtr
/net/jtgb4u4c.eng/export/sail16/results/merlin/b74/jck13a/linux/suse7.1_single_gnome_client_linux-11/workDir/api/java_net/MulticastSocket/descriptions_getTTL.jtr

How to reproduce:
====================
Run the following script under Suse Linux 7.1
(probably, you need to change JCK and JAVA_HOME paths):
--------Script START---------------------
#!/bin/sh
JAVA_HOME=/net/jdk/export/disk8/local.java/jdk1.4/linux-i386
JCK=/net/jdk/export/disk8/local.java/jck1.3a/JCK-runtime-13a
export CLASSPATH="$JCK/classes:$JCK/javatest.jar"
executeClass="javasoft.sqe.tests.api.java.net.MulticastSocket.setTTLTests"
$JAVA_HOME/bin/java -Xfuture ${executeClass}
---------Script END----------------------

Test output:
=============
MulticastSocket2009: Failed. Can not get current interface:java.net.SocketException: Invalid argument
MulticastSocket1017: Failed. Can not get current interface:java.net.SocketException: Invalid argument
MulticastSocket1018: Failed. Can not create MulticastTEstServer :java.net.SocketException: Invalid argument
MulticastSocket1019: Failed. Can not create MulticastTEstServer :java.net.SocketException: Invalid argument
STATUS:Failed.tests: 4; failed: 4; first test case failure: MulticastSocket2009

Specific Machine Info:
=====================
Hostname: linux-11
OS: Suse linux 7.1

======================================================================

                                    

Comments
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
merlin-beta3

FIXED IN:
merlin-beta3

INTEGRATED IN:
merlin-beta3

VERIFIED IN:
merlin-beta3


                                     
2004-06-14
EVALUATION


The problem is not specific to SuSE 7.1. Instead it will
happen on any distribution using the 2.2 kernel once IPv6
is enabled. The problem stems from a kernel bug whereby it
doesn't allow some IPv6 socket options be queried. Specifically
support is missing which prevents querying the IPV6_MULTICAST_IF,
IPV6_MULTICAST_HOPS, and IPV6_MULTICAST_LOOP socket options. These
are required by the MulticastSocket getInterface, getTimeToLive,
and getLoopback methods. As this is a potential show-stopper to 
supporting IPv6 on the Linux 2.2 kernel we need to investigate a
kernel patch.

Note that the tests will pass if an IPv4 socket is used
(-Djava.net.preferIPv4Stack=true).

alan.bateman@ireland 2001-08-07


On further investigation we have at 3 issues :-

1. With the 2.2 kernel it't not possible to query a number
of IPv6 socket options. This is a kernel bug that is easy
to patch. However we can also workaround the issue by
caching the relevant socket options in the java.net code.
This avoids the need for a kernel patch. In general however
we need to recommend to developers using IPv6 that they
should upgrade to the 2.4 kernel.

2. The default hops limit for multicast packets when
IPv6 is enabled is -1 and not the expected 1. This is
based on the assumption that the ttl will be specified
by the scope field in the multicast address. This is
causing the getTTL test to fail. We need to change the
MulticastSocket constructor to set the initial ttl/hops
to 1.

3. Linux's IPV6_{ADD,DROP}_MEMBERSHIP socket options
don't detect IPv4-mapped addresses. This is kernel bug
that exists even in the latest 2.4.7 release.
If we attempt to join a IPv4 multicast group with an
IPv6 socket the join should be redirected to the IGMP
module. I've patched my kernel to do this and it would
be nice to get this rolled into an offical Linux
release. However there is a workaround whereby the
corresponding IPv4 socket options can be used with an
IPv6 socket. 

I have now fixed the above 3 issues and the relevant
JCK tests pass in the following configurations :-

RedHat 6.1 	IPv4 only
RedHat 6.1	IPv6 enabled
RedHat 6.2	IPv4 only
RedHat 6.2	IPv6 enabled
RedHat 7.1	IPv4 only
RedHat 7.2	IPv6 enabled

However there is one final issue to diagnose - the 
submitter has observed failures on SuSE 7.0 when run
with -Djava.net.preferIPv4Stack=true (b74). This 
configuration needs to be tested with our latest
networking build to see if the failures still exist.

alan.bateman@ireland 2001-08-10


The remaining failures when only IPv4 is used on SuSE 7.0 is 
now understood. There was one final case when the data structure
returned from IP_MULTICAST_IF is different that we expected.
With this fixed resolved there are 2 remaining failures 
reported ("Network is unreachable"). These stems from the
lack of a default route for multicast packets and are fixed
by adding the route. The reason that the other multicast 
tests don't fail without an explicit route is because they
set MulticastSocket.setInterface to establish the interface
for outgoing multicasts.

###@###.### 2001-08-14
                                     
2001-08-14



Hardware and Software, Engineered to Work Together