JDK-6873605 : Missing finishedDispatch() call in ORBImpl causes test failures after 5u20 b04
  • Type: Bug
  • Component: other-libs
  • Sub-Component: corba:idl
  • Affected Version: 5.0u20-rev
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-08-19
  • Updated: 2015-03-23
  • Resolved: 2009-09-21
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 Other Other JDK 6 JDK 7
5.0u21-rev b03Fixed 5.0u22-revFixed 5.0u23Fixed 6u16-revFixed 7Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
Following JCK tests starts to fail starting from jdk 5u20 b04:

api/org_omg/PortableServer/POA/index.html#NetDistributed
api/org_omg/PortableInterceptor/ServerRequestInfo/index.html#SIMethods
api/org_omg/PortableInterceptor/ORBInitInfo/index.html#add
api/org_omg/PortableInterceptor/ServerRequestInterceptor/index.html#distributed
api/org_omg/PortableInterceptor/ClientRequestInterceptor/index.html#exception
api/org_omg/PortableInterceptor/ServerRequestInterceptor/index.html#exception
api/javax_rmi/CORBA/Util/copyObject.html#CopyObjTests0001
api/javax_rmi/CORBA/Util/copyObjects.html#CopyObjs0001
api/javax_rmi/CORBA/Util/registerTarget.html#RegTgt0001
api/javax_rmi/PortableRemoteObject/unexportObject.html#UnexportObject0001

Tests below just hangs due to the same reason:
api/org_omg/PortableServer/POA/index.html#fromTo
api/javax_rmi/PortableRemoteObject/narrow.html#Narrow0003
api/javax_rmi/PortableRemoteObject/toStub.html#ToStub0001
api/javax_rmi/PortableRemoteObject/toStub.html#ToStub0002
api/javax_rmi/CORBA/Util/unexportObject.html#UnexObj0002
api/javax_rmi/CORBA/Util/copyObject.html#CopyObjTests0001
api/javax_rmi/CORBA/Util/copyObjects.html#CopyObjs0001
api/javax_rmi/CORBA/Util/registerTarget.html#RegTgt0001
api/javax_rmi/PortableRemoteObject/connect.html#Connect0001

Possibly this failure is connected with CR 6763340.

Tests fails with the message like:

Aug 19, 2009 7:14:26 PM com.sun.corba.se.impl.oa.poa.POAImpl destroy
WARNING: "IOP01611002: (BAD_INV_ORDER) Request to wait for POA destruction while servicing request would deadlock"
org.omg.CORBA.BAD_INV_ORDER:   vmcid: SUN  minor code: 1002  completed: No
        at com.sun.corba.se.impl.logging.POASystemException.destroyDeadlock(POASystemException.java:98)
        at com.sun.corba.se.impl.logging.POASystemException.destroyDeadlock(POASystemException.java:120)
        at com.sun.corba.se.impl.oa.poa.POAImpl.destroy(POAImpl.java:942)
        at javasoft.sqe.jck.lib.CORBATest$1.run(CORBATest.java:113)
        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.ORBInitInfo.addTests.main(addTests.java:253)
Aug 19, 2009 7:14:29 PM com.sun.corba.se.impl.orb.ORBImpl shutdown
WARNING: "IOP01600003: (BAD_INV_ORDER) Operation would deadlock"
org.omg.CORBA.BAD_INV_ORDER:   vmcid: OMG  minor code: 3  completed: No
        at com.sun.corba.se.impl.logging.OMGSystemException.shutdownWaitForCompletionDeadlock(OMGSystemException.java:196)
        at com.sun.corba.se.impl.logging.OMGSystemException.shutdownWaitForCompletionDeadlock(OMGSystemException.java:218)
        at com.sun.corba.se.impl.orb.ORBImpl.shutdown(ORBImpl.java:1223)
        at javasoft.sqe.tests.api.org.omg.PortableInterceptor.ORBInitInfo.addTests.add0003(addTests.java:393)
        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:592)
        at javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:399)
        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.ORBInitInfo.addTests.main(addTests.java:253)

Please see comments for more information. Please see jtr files attached.

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/build/corba/rev/cff5a173ec1e
04-12-2010

SUGGESTED FIX Note: this fix applies _after_ 6763340.
03-09-2009

SUGGESTED FIX src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java public void releaseOrDecrementInvocationInfo() ... clientInvocationInfo.decrementEntryCount(); entryCount = clientInvocationInfo.getEntryCount(); if (clientInvocationInfo.getEntryCount() == 0) { // 6763340: don't pop if this is a retry! if (!clientInvocationInfo.isRetryInvocation()) { invocationInfoStack.pop(); } finishedDispatch(); } }
21-08-2009

EVALUATION What we are hitting: // This is to avoid deadlock if (wait_for_completion && getORB().isDuringDispatch()) { throw lifecycleWrapper().destroyDeadlock() ; // <--------------- 942 } is because ORBImpl's "isDuringDispatch()" is true. This true value comes from the ThreadLocal isProcessingInvocation which is set true by startingDispatch() called from createOrIncrementInvocationInfo(). In the fix for 6763340 we have missed the corresponding call to finishedDispatch().
21-08-2009