JDK-7016182 : new InitialContext(); hungs
  • Type: Bug
  • Component: other-libs
  • Sub-Component: corba:orb
  • Affected Version: beta2
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • OS: solaris
  • CPU: generic
  • Submitted: 2011-02-01
  • Updated: 2012-09-27
  • Resolved: 2012-09-27
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
6u27Resolved
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
CU reports the hang in the following code pattern:

ORB orb = ORB.init((String[])null, properties);
Hashtable environment = new Hashtable();
environment.put("java.naming.factory.initial",
"com.sun.jndi.cosnaming.CNCtxFactory");
environment.put("java.naming.provider.url", "iiop://" + hostname + ":"
+ portId);
environment.put("java.naming.corba.orb", orb);
// Setup naming context
namingContext = new InitialContext(environment); -----> hung up here

Details:
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
Java HotSpot(TM) Server VM (build 17.0-b16, mixed mode)

The orb properties:
/opt/cems/jre/bin/orbd -ORBInitialPort 1050 -ORBServerHost 47.224.244.57 -defaultdb /opt/cems/adm/orb.db -Dcom.sun.CORBA.connection.ORBHighWaterMark=4050 -Dcom.sun.CORBA.connection.ORBLowWaterMark=4000 -J-Xmx256m

Stack Trace:
"Thread-9" daemon prio=3 tid=0x0032bc00 nid=0x1c in Object.wait() [0xb637e000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0xe760a370> (a java.lang.Object)
at java.lang.Object.wait(Object.java:485)
at com.sun.corba.se.impl.transport.CorbaResponseWaitingRoomImpl.waitForResponse(CorbaResponseWaitingRoomImpl.java:140)
- locked <0xe760a370> (a java.lang.Object)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.waitForResponse(SocketOrChannelConnectionImpl.java:1084)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.waitForResponse(CorbaMessageMediatorImpl.java:253)
at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete1(CorbaClientRequestDispatcherImpl.java:362)
at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:336)
at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:129)
at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:213)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:404)
at com.sun.jndi.cosnaming.CNCtx.initUsingIiopUrl(CNCtx.java:298)
at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:264)
at com.sun.jndi.cosnaming.CNCtx.initOrbAndRootContext(CNCtx.java:232)
at com.sun.jndi.cosnaming.CNCtx.<init>(CNCtx.java:87)
at com.sun.jndi.cosnaming.CNCtxFactory.getInitialContext(CNCtxFactory.java:32)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at com.nortel.cdma.gsf.util.NamingServerUtilities.getNamingContext(NamingServerUtilities.java:122)
at com.nortel.cdma.gsf.process.ProcessWatchdog.waitForNamingServer(ProcessWatchdog.java:3669)
at com.nortel.cdma.gsf.process.NamingServerThread.run(NamingServerThread.java:273)
- locked <0xe760a2e0> (a com.nortel.cdma.gsf.process.NamingServerThread)

This hangs seems to correspond to waiting in the waitForResponse() function. Seems that java ORB isn't responding

A pstack output is in the attachment

Comments
Fix was integrated and tracked via 7046238
27-09-2012

EVALUATION regression from 6929137.
16-03-2011