JDK-4173960 : Activatable objects cannot be restarted.
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.rmi
  • Affected Version: 1.2.0
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 1998-09-15
  • Updated: 1999-01-19
  • Resolved: 1999-01-19
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.
Other
1.2.0 1.2fcsFixed
Related Reports
Relates :  
Description
The following RMI regression tests are failing:

test/java/rmi/activation/Activatable/checkRegisterInLog
test/java/rmi/activation/Activatable/restartCrashedService

Whenever an Activatable object is registered and then RMID is shutdown, the activation system does not recover its state properly.  Consequently, when rmid is restarted, Activatable objects that were registered when rmid was previously running are no longer useable, rmid can not restart or activate these objects.

These two tests fail with the following errors:

restartCrashedService:


Starting java for class: sun.rmi.server.Activation
bootclasspath = -Xbootclasspath:.:.:.:/js/files6/JDK1.2FCS-H/solaris/jre/lib/rt.jar:/js/files6/JDK1.2FCS-H/solaris/jre/lib/i18n.jar:/js/files6/JDK1.2FCS-H/solaris/jre/classes
command = /js/files6/JDK1.2FCS-H/solaris/jre/bin/java -Xbootclasspath:.:.:.:/js/files6/JDK1.2FCS-H/solaris/jre/lib/rt.jar:/js/files6/JDK1.2FCS-H/solaris/jre/lib/i18n.jar:/js/files6/JDK1.2FCS-H/solaris/jre/classes sun.rmi.server.Activation -port 1098 -log /js/files/JDK1.2/test/java/rmi/activation/Activatable/restartCrashedService/./log -C-Xbootclasspath:.:.:.:/js/files6/JDK1.2FCS-H/solaris/jre/lib/rt.jar:/js/files6/JDK1.2FCS-H/solaris/jre/lib/i18n.jar:/js/files6/JDK1.2FCS-H/solaris/jre/classes
finished starting vm.
finished starting rmid.
RestartCrashedService: received ping from restartable
Test1 passed: rmid restarted service
TUE SEP 15 19:26:27 EDT 1998:EXECGROUP-0:ERR:RESTARTABLE SERVICE STARTED
Test2 passed: rmid did not restart activatable service

Crash restartable object
EXCEPTION: Test1 failed: service not restarted by timeout
EXCEPTION: test failed
message: EXCEPTION: Test1 failed: service not restarted by timeout
java.lang.RuntimeException: EXCEPTION: Test1 failed: service not restarted by timeout
        at RestartCrashedService.bomb(Compiled Code)
        at RestartCrashedService.main(Compiled Code)
ACTIVATION DAEMON SHUT DOWN
removing rmid's old log file...
Exception in thread "main" java.lang.RuntimeException: EXCEPTION: test failed
        at RestartCrashedService.bomb(Compiled Code)
        at RestartCrashedService.main(Compiled Code)


checkRegisterInLog:


Regression test for bug 4110548

removing rmid's old log file...
starting rmid...
bootclasspath = -Xbootclasspath:.:.:.:/js/files6/JDK1.2FCS-H/solaris/jre/lib/rt.jar:/js/files6/JDK1.2FCS-H/solaris/jre/lib/i18n.jar:/js/files6/JDK1.2FCS-H/solaris/jre/classes
finished starting rmid.
Creating group descriptor
Registering group
Creating descriptor
Registering descriptor
ACTIVATION DAEMON SHUT DOWN
starting rmid...
bootclasspath = -Xbootclasspath:.:.:.:/js/files6/JDK1.2FCS-H/solaris/jre/lib/rt.jar:/js/files6/JDK1.2FCS-H/solaris/jre/lib/i18n.jar:/js/files6/JDK1.2FCS-H/solaris/jre/classes
finished starting rmid.
Activate the object via method call

failure: unexpected exception java.rmi.NoSuchObjectException: activatable object no longer registered
java.rmi.NoSuchObjectException: activatable object no longer registered
        at sun.rmi.server.ActivatableRef.activate(Compiled Code)
        at sun.rmi.server.ActivatableRef.invoke(Compiled Code)
        at CheckRegisterInLog_Stub.ping(Compiled Code)
        at CheckRegisterInLog.main(Compiled Code)
ACTIVATION DAEMON SHUT DOWN
Exception in thread "main" java.lang.RuntimeException: CheckRegisterInLog got exception activatable object no longer registered
        at CheckRegisterInLog.main(Compiled Code)
cycler:checkRegisterInLog:\> 





Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.2fcs FIXED IN: 1.2fcs INTEGRATED IN: 1.2fcs VERIFIED IN: 1.2fcs
14-06-2004

SUGGESTED FIX In earlier versions (prior to this problem) of the file Activation.java, the method Activation.LogRegisterObject.apply(Object state) used its state parameter to apply update changes to the state it was rebuilding in its recover method. In recent versions of this file, the apply method was changed so that it used the following line to restore the state of objects that were registed in rmi's reliable log: ((Activation) state).getGroupEntry(desc.getGroupID()). registerObject(id, desc, false); The getGroupEntry method directly modifies the pointer, Activation.idTable. The method does not update the apply method's state parameter. Unfortunately, while the updated state changes are recorded in Activation.idTable, the line idTable = state.idTable causes the updated changes to be replaced with an empty hashtable. The changes from log.recover are lost. Consequently, object entries recovered from rmid's logfile are not retained in Activation.idTable. Make one of two changes: remove the line, idTable = state.idTable or rewrite the LogRegisterObject apply method so that it records updated state in its state parameter variable.
11-06-2004

EVALUATION I have tested the suggested fix on both failing regression tests and the tests now run properly. lairdd@east 1998-09-15 Integrated into the JDK1.2 "L" build. ann.wollrath@East 1998-09-28
15-09-1998