JDK-4738340 : Deadlock in the classloader loading, with out circular locking
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.4.0_02,1.4.1
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,solaris_1
  • CPU: generic,x86
  • Submitted: 2002-08-28
  • Updated: 2012-10-08
  • Resolved: 2002-10-09
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
1.4.0_03 03Fixed
Related Reports
Duplicate :  
Description


[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr: ============================= 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr: "Thread-14": 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:   waiting to lock monitor 0x8140d0 (object 0x5ff840a0, a com.sun.enterprise.util.ConnectorClassLoader), 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:   which is held by "Thread-8" 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr: "Thread-8": 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:   waiting to lock monitor 0x2a6348 (object 0x60147820, a com.iplanet.ias.loader.EJBClassLoader), 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:   which is held by "Thread-14" 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr: Java stack information for the threads listed above: 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr: =================================================== 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr: "Thread-14": 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at java.lang.ClassLoader.loadClass(ClassLoader.java:295) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       - waiting to lock <5ff840a0> (a com.sun.enterprise.util.ConnectorClassLoader) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at java.lang.ClassLoader.loadClass(ClassLoader.java:299) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       - locked <60147820> (a com.iplanet.ias.loader.EJBClassLoader) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at java.lang.ClassLoader.loadClass(ClassLoader.java:262) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at com.sun.corba.se.internal.io.ValueHandlerImpl$StreamFactory.run(ValueHandlerImpl.java:784) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at java.security.AccessController.doPrivileged(Native Method) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at com.sun.corba.se.internal.io.ValueHandlerImpl.createInputStream(ValueHandlerImpl.java:748) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:196) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at com.sun.corba.ee.internal.iiop.CDRInputStream_1_0.read_value(Unknown Source) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at com.sun.corba.ee.internal.iiop.CDRInputStream.read_value(Unknown Source) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at org.omg.stub.com.sun.ecperf.orders.cartses.ejb._CartSesEJB_EJBObjectImpl_Tie._invoke(Unknown Source) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(Unknown Source) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(Unknown Source) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(Unknown Source) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at com.sun.corba.ee.internal.iiop.ORB.process(Unknown Source) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at com.sun.corba.ee.internal.iiop.RequestProcessor.process(Unknown Source) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at com.iplanet.ias.corba.ee.internal.iiop.ServicableWrapper.service(Unknown Source) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at com.iplanet.ias.util.threadpool.FastThreadPool$ThreadPoolThread.run(Unknown Source) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at java.lang.Thread.run(Thread.java:536) 





[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr: "Thread-8": 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at java.lang.ClassLoader.loadClass(ClassLoader.java:295) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       - waiting to lock <60147820> (a com.iplanet.ias.loader.EJBClassLoader) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at java.lang.ClassLoader.loadClass(ClassLoader.java:262) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at com.sun.corba.se.internal.io.ValueHandlerImpl$StreamFactory.run(ValueHandlerImpl.java:784) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at java.security.AccessController.doPrivileged(Native Method) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at com.sun.corba.se.internal.io.ValueHandlerImpl.createInputStream(ValueHandlerImpl.java:748) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:196) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at com.sun.corba.ee.internal.iiop.CDRInputStream_1_0.read_value(Unknown Source) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at com.sun.corba.ee.internal.iiop.CDRInputStream.read_value(Unknown Source) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at org.omg.stub.com.sun.ecperf.orders.orderses.ejb._OrderSesEJB_EJBObjectImpl_Tie._invoke(Unknown Source) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(Unknown Source) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(Unknown Source) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(Unknown Source) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at com.sun.corba.ee.internal.iiop.ORB.process(Unknown Source) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at com.sun.corba.ee.internal.iiop.RequestProcessor.process(Unknown Source) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at com.iplanet.ias.corba.ee.internal.iiop.ServicableWrapper.service(Unknown Source) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at com.iplanet.ias.util.threadpool.FastThreadPool$ThreadPoolThread.run(Unknown Source) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr:       at java.lang.Thread.run(Thread.java:536) 
[21/Aug/2002:09:57:33] WARNING ( 8313): CORE3283: stderr: Found 1 deadlock. 


Both threads are executing the same funtion, where as thread 8, acquired ConnectorClassLoader instead of EJBClassLoader.  Thread 8 is not holding any lock. This behavior is seen with JDK 1.4.02, but not with JDK 1.4.01.  

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.4.0_03 1.4.1_02 mantis FIXED IN: 1.4.0_03 1.4.1_02 mantis INTEGRATED IN: 1.4.0_03 1.4.1_02 mantis
14-06-2004

SUGGESTED FIX The fix is saving and clearing the _do_not_unlock_if_synchronized flag upon entering InterpreterRuntime::profile_method() and InterpreterRuntime::frequency_counter_overflow() and restoring the flag at the end of the calls. Also in InterpreterRuntime::exception_handler_for_exception(), we need to check the _do_not_unlock_if_synchronized flag at the beginning and if it's set, return Interpreter::remove_activation_entry() right away. Otherwise, a standard exception handler lookup will be done, which may surprisingly find a matchig exception handler for bci 0, or trigger a classloading and upcalls into Java. ###@###.### 2002-09-23
23-09-2002

EVALUATION It's a regression from the fix of 4501186. Basically after the _do_not_unlock_if_synchronized is set in the interpreter, the call_VM after that may trigger a classloading which makes an upcall into Java with the _do_not_unlock_if_synchronized flag set. ###@###.### 2002-09-23
23-09-2002