JDK-6980681 : CORBA deadlock in Java SE beleived to be related to CR 6238477
  • Type: Bug
  • Component: other-libs
  • Sub-Component: corba:orb
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_10
  • CPU: sparc
  • Submitted: 2010-08-27
  • Updated: 2011-02-16
  • Resolved: 2010-10-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.
6u22-rev b07Fixed 7Fixed
Customer reports issue is in CORBA in Java SE.  The issue is beleived to be related to CR 6238477 that was reported and fixed in the Java EE.  He's seeing a deadlock in com.sun.corba.se.impl.orb.ORBImpl.  Although this issue started in Java 1.5 , he does not need it patched back to 1.5.  

Probably the easiest way to pass this on is by letting you know that this
was also fixed in Glass Fish.  They did put the bug id in the comment so the customer
believes this should help.

 // All access to resolver, localResolver, and urlOperation must be
 protected using

  // the appropriate locks. Do not hold the ORBImpl lock while accessing

  // resolver, or deadlocks may occur.

  // Note that we now have separate locks for each resolver type. This is

  // to bug 6238477, which was caused by a deadlock while resolving a

  // corbaname: URL that contained a reference to the same ORB as the

  // ORB making the call to string_to_object. This caused a deadlock
 between the

  // client thread holding the single lock for access to the urlOperation,

  // and the server thread handling the client is_a request waiting on the

  // same lock to access the localResolver.
I was not able to use the testcase provided in 6238477 in spite of great effort.

However, going by the source code, it is advisable to add another lock since the deadlock is possible, as claimed by the customer.

In addition to this, since we have this fixed in GF already and since the CORBA code in JDK is a copy of the code in GF, it is safe to port the fix for 6238477 into JDK workspace.
Also, the change required here is internal to ORBImpl class and hence the risk of regression or dependency on any other code change is almost nil.
CORBA test setups are generally complicated and considering the current scenario, we need not press for a testcase.

I will try to make the required changes and produce an FVB.

EVALUATION http://hg.openjdk.java.net/jdk7/build/corba/rev/6fe70c295e96

EVALUATION The fix is to create a separate lock for urlOperation.