JDK-6332349 : 44 JCK6.0-runtime tests fails in api/java_rmi/ and api/javax_management/remote/
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.rmi
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris
  • CPU: sparc
  • Submitted: 2005-10-04
  • Updated: 2012-03-22
  • Resolved: 2005-10-07
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 6
6 b56Fixed
Related Reports
Relates :  
Description
JCK	       : 6.0 b08
J2SE	       : FAIL - b53, b54
                 PASS - b52
Platform[s]    : FAIL - solaris, linux                 
switch/Mode    : FAIL - "-esa"
                 PASS without "-esa"

JCK test owner : http://javaweb.sfbay/jcce/tcks/jck/docs/others/owners.jto

Failing Tests:
===============
api/java_rmi/Naming/index.html#Bind[Bind0004]							
api/java_rmi/Naming/index.html#Rebind[Rebind0002]						
api/java_rmi/Naming/index.html#Rebind[Rebind0003]						
api/java_rmi/ServerException/index.html#RemoteCallException[ServerException2002]		
api/java_rmi/ServerException/index.html#RemoteCallException[ServerException2003]		
api/java_rmi/ServerException/index.html#RemoteCallException[ServerException2004]		
api/java_rmi/ServerException/index.html#RemoteCallException[ServerException2005]		
api/java_rmi/activation/Activatable/Constructor.html#ConstructorTest0001[ConstructorTest0001]	
api/java_rmi/registry/LocateRegistry/index.html#GetRegistry[LocateRegistry0010]			
api/java_rmi/registry/LocateRegistry/index.html#GetRegistry[LocateRegistry0012]			
api/java_rmi/registry/LocateRegistry/index.html#GetRegistry[LocateRegistry0014]			
api/java_rmi/registry/LocateRegistry/index.html#GetRegistry[LocateRegistry0016]			
api/java_rmi/registry/LocateRegistry/index.html#GetRegistry[LocateRegistry1005]			
api/java_rmi/server/RemoteObject/index.html#Equals[Equals0002]					
api/java_rmi/server/RemoteObject/index.html#Equals[Equals0003]					
api/java_rmi/server/RemoteObject/index.html#Equals[Equals0004]					
api/java_rmi/server/RemoteObject/index.html#Equals[Equals0005]					
api/java_rmi/server/RemoteObject/index.html#Equals[Equals0006]					
api/java_rmi/server/RemoteObject/index.html#Equals[Equals0007]					
api/java_rmi/server/RemoteObject/index.html#HashCode[HashCode0002]				
api/java_rmi/server/RemoteObject/index.html#HashCode[HashCode0003]				
api/java_rmi/server/RemoteObject/index.html#HashCode[HashCode0004]				
api/java_rmi/server/UnicastRemoteObject/Unexp.html#Unexp[UnicastRemoteObject0002]		
api/java_rmi/server/UnicastRemoteObject/Unexp.html#Unexp[UnicastRemoteObject0003]		
api/java_rmi/server/UnicastRemoteObject/Unexp.html#Unexp[UnicastRemoteObject0004]		
api/javax_management/remote/JMXConnector/index.html#RMIConnectorTest[ConnectorClose001]		
api/javax_management/remote/JMXConnector/index.html#RMIConnectorTest[ConnectorClose002]		
api/javax_management/remote/JMXConnector/index.html#RMIConnectorTest[ConnectorConnect003]	
api/javax_management/remote/JMXConnector/index.html#RMIConnectorTest[ConnectorConnect004]	
api/javax_management/remote/JMXConnector/index.html#RMIConnectorTest[ConnectorConnect005]	
api/javax_management/remote/JMXConnector/index.html#RMIConnectorTest[ConnectorConnect007]	
api/javax_management/remote/JMXConnector/index.html#RMIConnectorTest[ConnectorConnect008]	
api/javax_management/remote/JMXConnector/index.html#RMIConnectorTest[ConnectorConnect009]	
api/javax_management/remote/JMXConnectorFactory/index.html#JMXConnectorFactoryTest[connectTest0006]	
api/javax_management/remote/JMXConnectorServer/index.html#RMIConnectorServerTest[ConnectorServerStartStopTest0002]	
api/javax_management/remote/JMXConnectorServer/index.html#RMIConnectorServerTest[ConnectorServerStartStopTest0003]	
api/javax_management/remote/JMXConnectorServer/index.html#RMIConnectorServerTest[ConnectorServerStartStopTest0004]	
api/javax_management/remote/rmi/RMIConnector/JRMPAddNotificationListener.html#JRMPAddNotificationListener[addListener0002]	
api/javax_management/remote/rmi/RMIConnector/JRMPGetMBeanServerConnectionTest.html#JRMPGetMBeanServerConnection[getMBeanServerConnection0002]	
api/javax_management/remote/rmi/RMIConnector/JRMPGetMBeanServerConnectionTest.html#JRMPGetMBeanServerConnection[getMBeanServerConnection0003]	
api/javax_management/remote/rmi/RMIConnector/JRMPGetMBeanServerConnectionTest.html#JRMPGetMBeanServerConnection[getMBeanServerConnection0004]	
api/javax_management/remote/rmi/RMIConnector/JRMPRemoveConnectionNotificationListener.html#JRMPRemoveConnectionNotificationListener[removeConnectionNotificationListener0003]	
api/javax_management/remote/rmi/RMIConnectorServer/index.html#RMIConnectorServerJNDI_REBIND_ATTRIBUTETest[JNDI_REBIND_ATTRIBUTEJRMPTest0002]	
api/javax_management/remote/rmi/RMIConnectorServer/index.html#RMIConnectorServerJNDI_REBIND_ATTRIBUTETest[JNDI_REBIND_ATTRIBUTEJRMPTest0003]

jtr file location:
==================
attached

How to reproduce:
====================
-----------------script starts ----------------
#!/bin/sh
JDK=/net/koori/onestop/jdk/1.6.0/promoted/all/b53/binaries/linux-i586
JCK=/net/jsqalab/export/testsuites/JCK/jck6.0/b08/JCK-runtime-60

LD=LIBRARY_PATH="$JCK/lib/SunOS.sparc:$JCK/lib/Linux.i386/jmx"
export LD_LIBRARY_PATH
CLASSPATH="$JCK/classes:$JCK/lib/javatest.jar"
POLICY="-Djava.security.policy=$JCK/lib/jck.policy"

TEST="javasoft.sqe.tests.api.java.rmi.Naming.RebindTests -network.tcpPortRange 0"

echo `cat $JCK/build.txt | grep JCK_VERSION` `cat $JCK/build.txt | grep JCK_BUILD`
$JDK/bin/java  -esa -showversion -cp $CLASSPATH $POLICY $TEST
-----------------script ends ---------------- 

Test output:
=============
java.lang.AssertionError
        at sun.rmi.transport.DGCAckHandler.<init>(DGCAckHandler.java:79)
        at sun.rmi.transport.ConnectionOutputStream.saveObject(ConnectionOutputStream.java:70)
        at sun.rmi.transport.LiveRef.write(LiveRef.java:246)
        at sun.rmi.server.UnicastRef.writeExternal(UnicastRef.java:462)
        at java.rmi.server.RemoteObject.writeObject(RemoteObject.java:363)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:589)
        at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1454)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1385)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1143)
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:325)
        at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
        at java.rmi.Naming.bind(Naming.java:111)
        at javasoft.sqe.tests.api.java.rmi.Naming.RebindTests$2.run(RebindTests.java:121)
        at javasoft.sqe.jck.lib.SecurityTestRunner.runTestWithTCKSM(SecurityTestRunner.java:278)
        at javasoft.sqe.jck.lib.SecurityTestRunner.runTestWithPermissions(SecurityTestRunner.java:235)
        at javasoft.sqe.jck.lib.SecurityTestRunner.runTestWithAllPermissions(SecurityTestRunner.java:157)
        at javasoft.sqe.jck.lib.AllPermissionSM.testRun(AllPermissionSM.java:86)
        at javasoft.sqe.jck.lib.AllPermissionSM.testRun(AllPermissionSM.java:111)
        at javasoft.sqe.tests.api.java.rmi.Naming.RebindTests.Rebind0002(RebindTests.java:192)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:589)
        at javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:399)
        at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
        at javasoft.sqe.jck.lib.RegistryTest.run(RegistryTest.java:168)
        at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:127)
        at javasoft.sqe.tests.api.java.rmi.Naming.RebindTests.main(RebindTests.java:58)
Rebind0002: Failed. Test case throws exception: java.lang.AssertionError
also tests :
api/javax_management/remote/JMXConnectorFactory/index.html#JMXConnectorFactoryTest[connectTest0001]
api/javax_management/remote/JMXConnectorFactory/index.html#JMXConnectorFactoryTest[connectTest0003]
api/java_rmi/Naming/index.html#List[List0001]

fail with "-esa" switch and pass w/o "-esa" key. Seems they are connected to this problem also.

Comments
SUGGESTED FIX ------- DGCAckHandler.java ------- *** /tmp/sccs.GBaWOq Tue Oct 4 11:24:37 2005 --- DGCAckHandler.java Tue Oct 4 11:24:27 2005 *************** *** 76,84 **** * invoking this instance's "release" method. **/ DGCAckHandler(UID id) { - assert !idTable.containsKey(id); this.id = id; ! idTable.put(id, this); } /** --- 76,86 ---- * invoking this instance's "release" method. **/ DGCAckHandler(UID id) { this.id = id; ! if (id != null) { ! assert !idTable.containsKey(id); ! idTable.put(id, this); ! } } /**
04-10-2005

EVALUATION The DGCAckHandler constructor is missing a check for null, but because HashMap allows null keys, it is mostly harmless unless (system) assertions are enabled, when it is exposed by making many remote invocations fail with an AssertionError. Must be fixed, and the fix is trivial.
04-10-2005

EVALUATION Under investigation.
04-10-2005

EVALUATION sun.rmi.transport.DGCAckHandler.java: DGCAckHandler(UID id) { assert !idTable.contains(id); // This is line 79 (where exception is thrown), and in b52 it was commented, but in b53 it became uncommented this.id = id; idTable.put(id, this); } *** (#1 of 1): [ UNSAVED ] ###@###.###
04-10-2005