JDK-6779953 : api/org_omg/PortableInterceptor/ServerRequestInfo/index.html#SIMethods test fails randomly for 6u12
  • Type: Bug
  • Component: other-libs
  • Sub-Component: corba:idl
  • Affected Version: 6u12
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2008-12-03
  • Updated: 2011-01-19
  • Resolved: 2009-01-26
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
6u12 b04Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
on Windows Vista:
WARNING: "IOP01210228: (BAD_OPERATION) This ORB instance has been destroyed, so no operations can be performed on it"
org.omg.CORBA.BAD_OPERATION:   vmcid: SUN  minor code: 228  completed: No
        at com.sun.corba.se.impl.logging.ORBUtilSystemException.orbDestroyed(ORBUtilSystemException.java:586)
        at com.sun.corba.se.impl.logging.ORBUtilSystemException.orbDestroyed(ORBUtilSystemException.java:608)
        at com.sun.corba.se.impl.orb.ORBImpl.checkShutdownState(ORBImpl.java:1278)
        at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1652)
        at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1540)
        at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:922)
        at com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:181)
        at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:694)
        at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:451)
        at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1211)
        at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:389)
        at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:418)
Dec 4, 2008 12:52:43 PM com.sun.corba.se.impl.orb.ORBImpl checkShutdownState
WARNING: "IOP01600004: (BAD_INV_ORDER) ORB has shutdown"
org.omg.CORBA.BAD_INV_ORDER:   vmcid: OMG  minor code: 4  completed: No
        at com.sun.corba.se.impl.logging.OMGSystemException.badOperationAfterShutdown(OMGSystemException.java:224)
        at com.sun.corba.se.impl.logging.OMGSystemException.badOperationAfterShutdown(OMGSystemException.java:246)
        at com.sun.corba.se.impl.orb.ORBImpl.checkShutdownState(ORBImpl.java:1282)
        at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1652)
        at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1540)
        at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:922)
        at com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:181)
        at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:694)
        at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:451)
        at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1211)
        at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:389)
        at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:418)

These additional exceptions can indicate problems with the test. But since NPE started to appear in a code that works for older releases I suspect a regression.
JCK            : JCK runtime 6b b24
J2SE           : FAIL - since jdk 6u12 build 01 
Platform[s]    : FAIL - Any 
Java options   : FAIL - Any

Starting from jdk 6u12 build 01 two testcases of api/org_omg/PortableInterceptor/ServerRequestInfo/index.html#SIMethods test started to fail randomly. Approximately 1 time in 10 they fail with NullPointerException on any platform. Since behavior of the tests changed and they started to fail sometimes I suppose there is a regression. Failures appears more often on OpenSolaris and Windows Vista.

Problem can be easily reproduced, but we need to run test many times to see the failure.
Steps to reproduce:
1. Install jdk (for ex. to /export/jdk/jdk1.6.0_12/)
2. Install JCK6b (for ex. to /export/JCK/JCK-runtime-6b)
3. Prepare a simple script to run a test (run.sh) of the following content
#!/bin/bash

export JAVA=/export/jdk/jdk1.6.0_12/bin/java
export CLASSPATH="/export/JCK/JCK-runtime-6b/classes"

OPTS=""
TEST="javasoft.sqe.tests.api.org.omg.PortableInterceptor.ServerRequestInfo.SIMethodsTests"

$JAVA -version
$JAVA $OPTS $i $TOPTS
4. Run the test 100 times with the command like 
for i in {1..100}; do ./rerun.sh 1>$i 2>&1; done
5. Run a command like below to get file names with output from filed tests.
for i in {1..10}; do grep -q Failed. $i && echo "$i - failed"; done

With the version of jdk previous to 6u12 you will see all the testcases passed 100% of time even thow stack traces like this appears:
Dec 2, 2008 5:46:54 PM com.sun.corba.se.impl.orb.ORBImpl checkShutdownState
WARNING: "IOP01210228: (BAD_OPERATION) This ORB instance has been destroyed, so no operations can be performed on it"
org.omg.CORBA.BAD_OPERATION:   vmcid: SUN  minor code: 228  completed: No
        at com.sun.corba.se.impl.logging.ORBUtilSystemException.orbDestroyed(ORBUtilSystemException.java:586)
        at com.sun.corba.se.impl.logging.ORBUtilSystemException.orbDestroyed(ORBUtilSystemException.java:608)
        at com.sun.corba.se.impl.orb.ORBImpl.checkShutdownState(ORBImpl.java:1289)
        at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1651)
        at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1540)
        at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:922)
        at com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:181)
        at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:694)
        at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:451)
        at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1189)
        at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:398)

With jdk 6u12 b01 on all platform you will see that 2 testcases (simethods0003 and simethods0006) fails aproximately 10% of time with NPE and following stack trace:
java.lang.NullPointerException
        at com.sun.corba.se.impl.transport.SelectorImpl.unregisterForEvent(SelectorImpl.java:164)
        at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.closeConnectionResources(SocketOrChannelConnectionImpl.java:809)
        at com.sun.corba.se.impl.transport.CorbaConnectionCacheBase.close(CorbaConnectionCacheBase.java:76)
        at com.sun.corba.se.impl.transport.CorbaTransportManagerImpl.close(CorbaTransportManagerImpl.java:169)
        at com.sun.corba.se.impl.orb.ORBImpl.destroy(ORBImpl.java:1335)
        at javasoft.sqe.jck.lib.CORBATest$1.run(CORBATest.java:118)
        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.CORBATest.invokeTestCase(CORBATest.java:129)
        at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
        at javasoft.sqe.jck.lib.CORBATest.run(CORBATest.java:69)
        at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:127)
        at javasoft.sqe.tests.api.org.omg.PortableInterceptor.ServerRequestInfo.SIMethodsTests.main(SIMethodsTests.java:371)

Other exeptions may appear.
On linux:
java.lang.NullPointerException
	at com.sun.corba.se.impl.transport.SelectorImpl.unregisterForEvent(SelectorImpl.java:164)
	at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.closeConnectionResources(SocketOrChannelConnectionImpl.java:809)
	at com.sun.corba.se.impl.transport.CorbaConnectionCacheBase.close(CorbaConnectionCacheBase.java:76)
	at com.sun.corba.se.impl.transport.CorbaTransportManagerImpl.close(CorbaTransportManagerImpl.java:169)
	at com.sun.corba.se.impl.orb.ORBImpl.destroy(ORBImpl.java:1335)
	at javasoft.sqe.jck.lib.CORBATest$1.run(CORBATest.java:118)
	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.CORBATest.invokeTestCase(CORBATest.java:129)
	at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
	at javasoft.sqe.jck.lib.CORBATest.run(CORBATest.java:69)
	at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:127)
	at javasoft.sqe.tests.api.org.omg.PortableInterceptor.ServerRequestInfo.SIMethodsTests.main(SIMethodsTests.java:371)
Dec 3, 2008 12:36:21 PM com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolManagerImpl close
WARNING: "IOP00710328: (INTERNAL) ThreadGroup java.lang.ThreadGroup[name=ORB ThreadGroup 17,maxpri=10] has 1 active threads: destroy may cause exception"
org.omg.CORBA.INTERNAL:   vmcid: SUN  minor code: 328  completed: No
	at com.sun.corba.se.impl.logging.ORBUtilSystemException.threadGroupHasActiveThreadsInClose(ORBUtilSystemException.java:6569)
	at com.sun.corba.se.impl.logging.ORBUtilSystemException.threadGroupHasActiveThreadsInClose(ORBUtilSystemException.java:6593)
	at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolManagerImpl.close(ThreadPoolManagerImpl.java:109)
	at com.sun.corba.se.impl.orb.ORBImpl.destroy(ORBImpl.java:1343)
	at javasoft.sqe.tests.api.org.omg.PortableInterceptor.ServerRequestInfo.SIMethodsTests.callStop(SIMethodsTests.java:132)
	at javasoft.sqe.tests.api.org.omg.PortableInterceptor.ServerRequestInfo.SIMethodsTests.simethods0009(SIMethodsTests.java:705)
	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:597)
	at javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:406)
	at javasoft.sqe.jck.lib.CORBATest.access$001(CORBATest.java:43)
	at javasoft.sqe.jck.lib.CORBATest$1.run(CORBATest.java:100)
	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.CORBATest.invokeTestCase(CORBATest.java:129)
	at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
	at javasoft.sqe.jck.lib.CORBATest.run(CORBATest.java:69)
	at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:127)
	at javasoft.sqe.tests.api.org.omg.PortableInterceptor.ServerRequestInfo.SIMethodsTests.main(SIMethodsTests.java:371)
Dec 3, 2008 12:36:21 PM com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolManagerImpl close
WARNING: "IOP00710330: (INTERNAL) ThreadGroup java.lang.ThreadGroup[name=ORB ThreadGroup 17,maxpri=10] could not be destroyed"
org.omg.CORBA.INTERNAL:   vmcid: SUN  minor code: 330  completed: No
	at com.sun.corba.se.impl.logging.ORBUtilSystemException.threadGroupDestroyFailed(ORBUtilSystemException.java:6629)
	at com.sun.corba.se.impl.logging.ORBUtilSystemException.threadGroupDestroyFailed(ORBUtilSystemException.java:6648)
	at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolManagerImpl.close(ThreadPoolManagerImpl.java:117)
	at com.sun.corba.se.impl.orb.ORBImpl.destroy(ORBImpl.java:1343)
	at javasoft.sqe.tests.api.org.omg.PortableInterceptor.ServerRequestInfo.SIMethodsTests.callStop(SIMethodsTests.java:132)
	at javasoft.sqe.tests.api.org.omg.PortableInterceptor.ServerRequestInfo.SIMethodsTests.simethods0009(SIMethodsTests.java:705)
	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:597)
	at javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:406)
	at javasoft.sqe.jck.lib.CORBATest.access$001(CORBATest.java:43)
	at javasoft.sqe.jck.lib.CORBATest$1.run(CORBATest.java:100)
	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.CORBATest.invokeTestCase(CORBATest.java:129)
	at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
	at javasoft.sqe.jck.lib.CORBATest.run(CORBATest.java:69)
	at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:127)
	at javasoft.sqe.tests.api.org.omg.PortableInterceptor.ServerRequestInfo.SIMethodsTests.main(SIMethodsTests.java:371)
Caused by: java.lang.IllegalThreadStateException
	at java.lang.ThreadGroup.destroy(ThreadGroup.java:743)
	at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolManagerImpl.close(ThreadPoolManagerImpl.java:114)
	... 19 more
simethods0006: Failed. Could not access the test case: java.lang.NullPointerException

These additional exeptions may appear even if all testcase passes.

On OpenSolaris
java.lang.NullPointerException
        at com.sun.corba.se.impl.transport.SelectorImpl.unregisterForEvent(SelectorImpl.java:164)
        at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.closeConnectionResources(SocketOrChannelConnectionImpl.java:809)
        at com.sun.corba.se.impl.transport.CorbaConnectionCacheBase.close(CorbaConnectionCacheBase.java:76)
        at com.sun.corba.se.impl.transport.CorbaTransportManagerImpl.close(CorbaTransportManagerImpl.java:169)
        at com.sun.corba.se.impl.orb.ORBImpl.destroy(ORBImpl.java:1335)
        at javasoft.sqe.jck.lib.CORBATest$1.run(CORBATest.java:118)
        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.CORBATest.invokeTestCase(CORBATest.java:129)
        at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
        at javasoft.sqe.jck.lib.CORBATest.run(CORBATest.java:69)
        at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:127)
        at javasoft.sqe.tests.api.org.omg.PortableInterceptor.ServerRequestInfo.SIMethodsTests.main(SIMethodsTests.java:371)
Dec 3, 2008 12:08:04 PM com.sun.corba.se.impl.orb.ORBImpl checkShutdownState
WARNING: "IOP01600004: (BAD_INV_ORDER) ORB has shutdown"
org.omg.CORBA.BAD_INV_ORDER:   vmcid: OMG  minor code: 4  completed: No
        at com.sun.corba.se.impl.logging.OMGSystemException.badOperationAfterShutdown(OMGSystemException.java:224)
        at com.sun.corba.se.impl.logging.OMGSystemException.badOperationAfterShutdown(OMGSystemException.java:246)
        at com.sun.corba.se.impl.orb.ORBImpl.checkShutdownState(ORBImpl.java:1282)
        at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1652)
        at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1540)
        at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:922)
        at com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:181)
        at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:694)
        at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:451)
        at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1211)
        at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:389)
        at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:418)
simethods0003: Failed. Could not access the test case: java.lang.NullPointerException

Comments
EVALUATION I've found two problems here that need to be fixed. First, the SelectorImpl.unregisterForEvent code needs to check for a null seclectionKey and avoid the NPE> Second, the code in CorbaMessageMediatorImpl checks for an ORB shutdown by calling ORBImpl.checkShutdownState, and this throws an unwanted exception. The fix required here is to add another accessor method on the ORB to find out if the ORB is shutdown, in which case do NOT handle the incoming message. This will avoid most of the spurious log messages, thought perhaps one could occasionally happen if the ORB is shutdown after the check.
19-12-2008

SUGGESTED FIX here are the diffs (note that the code should be mostly the same as JDK 6u12, but the line numbers are different) diff -r 5de73d2d685e src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java --- a/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java Mon Dec 01 13:38:26 2008 -0800 +++ b/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java Thu Dec 18 15:44:42 2008 -0800 @@ -2199,6 +2199,12 @@ return entry ; } + + @Override + public synchronized boolean orbIsShutdown() { + return ((status == STATUS_DESTROYED) || + (status == STATUS_SHUTDOWN)) ; + } } // Class ORBImpl //////////////////////////////////////////////////////////////////////// diff -r 5de73d2d685e src/share/classes/com/sun/corba/se/impl/protocol/CorbaMessageMediatorImpl.java --- a/src/share/classes/com/sun/corba/se/impl/protocol/CorbaMessageMediatorImpl.java Mon Dec 01 13:38:26 2008 -0800 +++ b/src/share/classes/com/sun/corba/se/impl/protocol/CorbaMessageMediatorImpl.java Thu Dec 18 15:44:42 2008 -0800 @@ -1771,6 +1771,9 @@ dprint(".handleRequest: " + opAndId(messageMediator) + ": sending response"); } + if (orb.orbIsShutdown()) + return ; + // REVISIT - type and location CDROutputObject outputObject = (CDROutputObject) messageMediator.getOutputObject(); @@ -1786,6 +1789,8 @@ if (orb.subcontractDebugFlag) { dprint(".handleRequest<-: " + opAndId(messageMediator)); } + if (orb.orbIsShutdown()) + return ; // release NIO ByteBuffers to ByteBufferPool @@ -1816,9 +1821,8 @@ ((CDRInputObject)messageMediator.getInputObject()).unmarshalHeader(); ORB orb = (ORB)messageMediator.getBroker(); - synchronized( orb ) { - orb.checkShutdownState(); - } + if (orb.orbIsShutdown()) + return ; ObjectKey okey = messageMediator.getObjectKeyCacheEntry().getObjectKey(); if (orb.subcontractDebugFlag) { diff -r 5de73d2d685e src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java --- a/src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java Mon Dec 01 13:38:26 2008 -0800 +++ b/src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java Thu Dec 18 15:44:42 2008 -0800 @@ -189,8 +189,11 @@ if (eventHandler.shouldUseSelectThreadToWait()) { SelectionKey selectionKey = eventHandler.getSelectionKey(); - selectionKey.cancel(); - selector.wakeup(); + if (selectionKey != null) { + selectionKey.cancel(); + selector.wakeup(); + } + return; } diff -r 5de73d2d685e src/share/classes/com/sun/corba/se/spi/orb/ORB.java --- a/src/share/classes/com/sun/corba/se/spi/orb/ORB.java Mon Dec 01 13:38:26 2008 -0800 +++ b/src/share/classes/com/sun/corba/se/spi/orb/ORB.java Thu Dec 18 15:44:42 2008 -0800 @@ -615,6 +615,12 @@ return null ; } + /** Return whether or not the ORB is shutdown. A shutdown ORB cannot process + * incoming requests. + */ + public boolean orbIsShutdown() { + return true ; + } }
19-12-2008