[opencms-dev] OpenCMS v5 and Oracle Deadlock

Alexander Kandzior alex at opencms.org
Wed Feb 16 22:46:26 CET 2005


Wow that's some kind of input I would love to have had 18 months back. As
you said the current code base for 6.0 is completly different, so the fix
can't be applied.

Quite frankly we at Alkacon lack the time to patch version 5.0 and we have
not planned any further release on the 5.0.x branch. 

If someone wants to volunteer and collect a set of bugfix patches that would
make up a 5.0.2 version please contact me, that would be greatly
appreciated. 

Best Regards,
Alex.

Alexander Kandzior
Alkacon Software - The OpenCms Experts
http://www.alkacon.com

 

> -----Original Message-----
> From: opencms-dev-bounces at opencms.org 
> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of ian snead
> Sent: Wednesday, February 16, 2005 7:21 PM
> To: opencms-dev at opencms.org
> Subject: [opencms-dev] OpenCMS v5 and Oracle Deadlock
> 
> Hello all,
> 
> We have been hitting the reported deadlock condition 
> discussed in the past.
> 
> I realize this will be fixed in the upcomming v6, but in the 
> meantime...
> 
> I've been doing some reading into the data layer, and I 
> wanted to suggest a patch. Is there any reason not to do the 
> following ?
> 
> In com.opencms.dbpool.CmsPool, 
> 
>     + Remove all the .notify() calls to the stack.
>     + Synchronize on DriverManager.class instead of the stack.
> 
> It looks like the race condition is between the stack and the 
> driver manager class instance monitors, would this solve it?
> 
> I've done this, and things look just fine on my machine. Have 
> not subjected the server to a load test yet. 
> 
> If anything jumps out at you about this, I'd love the feedback!!!
> 
> Thanks,
> 
> Ian Snead
> Applications Analyst
> Georgia State Department of Audits and Accounts, IT Division
> 
> 
> Here is a pertinant stack dump from kill -3 on Tomcat :
> 
> "http-8443-Processor15":
> 	at com.opencms.dbpool.CmsPool.getConnection(CmsPool.java:217)
> 	- waiting to lock <0x392d0d10> (a java.util.Stack)  
> <---------- stack of connections
> 	at com.opencms.dbpool.CmsPool.connect(CmsPool.java:206)
> 	at com.opencms.dbpool.CmsDriver.connect(CmsDriver.java:107)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:512)
> 	- locked <0xaf87b628> (a java.lang.Class)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:193)
> 	- locked <0xaf87b628> (a java.lang.Class)
> 	at 
> com.opencms.file.genericSql.CmsDbAccess.readFile(CmsDbAccess.j
> ava:6060)
> 	at 
> com.opencms.file.genericSql.CmsResourceBroker.readFile(CmsReso
> urceBroker.java:5203)
> 	at com.opencms.file.CmsObject.readFile(CmsObject.java:2888)
> 	at com.opencms.core.OpenCms.initResource(OpenCms.java:793)
> 	at 
> com.opencms.core.OpenCmsHttpServlet.doGet(OpenCmsHttpServlet.java:363)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> 
> "http-8443-Processor23":
> 	at java.sql.DriverManager.getDrivers(DriverManager.java:321)
> 	- waiting to lock <0xaf87b628> (a java.lang.Class)
> 	at 
> oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:305)
> 	at com.opencms.dbpool.CmsPool.createConnection(CmsPool.java:338)
> 	at 
> com.opencms.dbpool.CmsPool.createConnections(CmsPool.java:320)
> 	at com.opencms.dbpool.CmsPool.putConnection(CmsPool.java:301)
> 	- locked <0x392d0d10> (a java.util.Stack)
> 
> Code changes in CmsPool, swap :
> 
> synchronized(m_availableConnections) 
>     to
> synchronized(DriverManager.class)
>     and
> m_availableConnections.notify();
>     to
> // m_availableConnections.notify();
> 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list To 
> change your list options, or to unsubscribe from the list, 
> please visit http://mail.opencms.org/mailman/listinfo/opencms-dev
> 
> 




More information about the opencms-dev mailing list