JDK-8042390 : TEST_BUG: java/rmi/activation/Activatable/checkActivateRef/CheckActivateRef.java fails intermittently with NullPointerException
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.rmi
  • Affected Version: 9
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • Submitted: 2014-05-05
  • Updated: 2023-01-05
  • Resolved: 2023-01-05
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
TESTFAIL:java/rmi/activation/Activatable/checkActivateRef/CheckActivateRef.java

The test java/rmi/activation/Activatable/checkActivateRef/CheckActivateRef.java failed on solaris platform in nightly

----------System.err:(82/5793)----------

Regression test for bug 4105080

java.security.policy = =/Users/aurora/sandbox/gresults/testoutput/jdk_rmi/JTwork/scratch/security.policy_new
RMID: starting rmid on port #45337...
JAVAVM: command = [/Users/aurora/CommonData/jdk/jre/bin/java, -d64, -ea, -esa, -Xmx512m, -Djava.security.policy=/Users/aurora/sandbox/testbase/test/java/rmi/activation/Activatable/checkActivateRef/rmid.security.policy, -Dsun.rmi.server.activation.debugExec=true, -Dtest.src=/Users/aurora/sandbox/testbase/test/java/rmi/activation/Activatable/checkActivateRef, -Dtest.classes=/Users/aurora/sandbox/gresults/testoutput/jdk_rmi/JTwork/classes/java/rmi/activation/Activatable/checkActivateRef, -Djava.rmi.server.logLevel=v, -Dsun.rmi.activation.execTimeout=60000, sun.rmi.server.Activation, -log, /Users/aurora/sandbox/gresults/testoutput/jdk_rmi/JTwork/scratch/./log, -port, 45337, -C-Dtest.src=/Users/aurora/sandbox/testbase/test/java/rmi/activation/Activatable/checkActivateRef, -C-Dtest.classes=/Users/aurora/sandbox/gresults/testoutput/jdk_rmi/JTwork/classes/java/rmi/activation/Activatable/checkActivateRef, -C-d64, -C-ea, -C-esa, -C-Xmx512m, -C-Djava.rmi.server.useCodebaseOnly=false]
RMID: rmid not started, will retry for 9900ms
RMID: rmid not started, will retry for 9800ms
TEST FAILED: 
Test failed with: null
java.lang.NullPointerException
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:290)
	at sun.rmi.transport.Transport$1.run(Transport.java:179)
	at sun.rmi.transport.Transport$1.run(Transport.java:176)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:175)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
	at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:276)
	at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:253)
	at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:162)
	at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:194)
	at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:148)
	at com.sun.proxy.$Proxy0.lookup(Unknown Source)
	at RMID.lookupSystem(RMID.java:236)
	at RMID.start(RMID.java:273)
	at RMID.start(RMID.java:219)
	at CheckActivateRef.main(CheckActivateRef.java:117)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:484)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:745)
RMID: testlibrary finished shutting down rmid
activation daemon shut down
RMID: RMID's process still not terminated after more than 200 milliseconds
RMID: RMID's process still not terminated after more than 400 milliseconds
RMID: RMID's process still not terminated after more than 600 milliseconds
RMID: rmid exited on shutdown request
ACTIVATION_LIBRARY: finished destroying rmid
RMID: removing rmid's old log file...
TestFailedException: TEST FAILED: ; nested exception is: 
	java.lang.NullPointerException
java.lang.NullPointerException
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:290)
	at sun.rmi.transport.Transport$1.run(Transport.java:179)
	at sun.rmi.transport.Transport$1.run(Transport.java:176)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:175)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
	at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:276)
	at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:253)
	at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:162)
	at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:194)
	at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:148)
	at com.sun.proxy.$Proxy0.lookup(Unknown Source)
	at RMID.lookupSystem(RMID.java:236)
	at RMID.start(RMID.java:273)
	at RMID.start(RMID.java:219)
	at CheckActivateRef.main(CheckActivateRef.java:117)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:484)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:745)

JavaTest Message: Test threw exception: TestFailedException: TEST FAILED: ; nested exception is: 
	java.lang.NullPointerException
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: TestFailedException: TEST FAILED: ; nested exception is: java.lang.NullPointerException

Comments
RMI Activation has been removed; it probably isn't worth investigating these old intermittent test failures.
05-01-2023

Note that JDK-8035388 also covers the CheckActivateRef test, but the failure pathology seems to be completely different.
18-12-2014

In recent 3 months (b29 to b38), this test failed 22 times out of the total 1794 runs
10-12-2014

22 times tests failed during samebinary runs cycles. Need to capture exact total number of runs (~1600).
09-12-2014

This is very strange. The NullPointerException occurs where it seems like it cannot happen. Well, hashToMethod_Map might end up being null if the result of hashToMethod_Maps.get(implClass) returns null at line 207 of UnicastServerRef. Either there is a latent bug in the RMI code that returns null if the weak (or soft) reference is cleared -- both are used in WeakClassHashMap -- or there is a VM bug. I've never seen this failure before. Four failures have occurred with jdk9-b10 and jdk9-b12.
07-05-2014