tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gnath <>
Subject Re: Dead lock with tomcat-jdbc.jar on Tomcat 6.0.35
Date Fri, 27 Jan 2012 07:03:53 GMT
Hi All, 

Quick update: after i looked at the dead lock trace, it looked to me like an issue with mysql
driver jar. As i mentioned that we are using mysql-connector-java.3.1.12-bin.jar, and i have
been seeing these bugs that are filed against something related to deadlock:

Please suggest if anyone has faced such issues and the upgrade of Mysql connector jar had
fixed this issue?


 From: gnath <>
To: "" <> 
Sent: Thursday, January 26, 2012 9:38 PM
Subject: Dead lock with tomcat-jdbc.jar on Tomcat 6.0.35
Hello all,

So we have 2 Linux servers running our application with  Tomcat-6.0.35, JDK 1.6.30. We are
tomcat-jdbc.jar (Verison 1.1.1), 


We have 'removeAbandoned' flag to true in our configuration. We initially had commons-dbcp.jar
1.3 version and as it gave problems, we started using tomcat-jdbc.jar. One of the servers
is working normally, but we saw one issue on the second server. it hasn't been releasing the
and was consistently growing slowly. So i collected thread dump and i 
saw a deadlock :

Found one Java-level deadlock:
  waiting to lock monitor 0x000000005d7944b8 (object 0x00000005bd522568, a com.mysql.jdbc.Connection),
  which is held by "[Pool-Cleaner]:Tomcat Connection Pool[1-1015483951]"
"[Pool-Cleaner]:Tomcat Connection Pool[1-1015483951]":
  waiting to lock monitor 0x000000005dcdea28 (object 0x00000005bd659ce8, a com.mysql.jdbc.ResultSet),
  which is held by "catalina-exec-1"

Java stack information for the threads listed above:
        at com.mysql.jdbc.Connection.getCharsetConverter(
        - waiting to lock <0x00000005bd522568> (a com.mysql.jdbc.Connection)
        at com.mysql.jdbc.Field.getStringFromBytes(
        at com.mysql.jdbc.Field.getName(
        at com.mysql.jdbc.ResultSet.buildIndexMapping(
        at com.mysql.jdbc.ResultSet.findColumn(
        - locked <0x00000005bd659ce8> (a com.mysql.jdbc.ResultSet)
        at com.mysql.jdbc.ResultSet.getInt(

"[Pool-Cleaner]:Tomcat Connection Pool[1-1015483951]":
        at com.mysql.jdbc.ResultSet.close(
        - waiting to lock <0x00000005bd659ce8> (a com.mysql.jdbc.ResultSet)
        at com.mysql.jdbc.Statement.realClose(
        - locked <0x00000005bd522568> (a com.mysql.jdbc.Connection)
        - locked <0x00000005bd5e81c0> (a com.mysql.jdbc.ServerPreparedStatement)
        at com.mysql.jdbc.PreparedStatement.realClose(
        at com.mysql.jdbc.ServerPreparedStatement.realClose(
        - locked <0x00000005bd525ba0> (a java.lang.Object)
        - locked <0x00000005bd522568> (a com.mysql.jdbc.Connection)
        - locked <0x00000005bd5e81c0> (a com.mysql.jdbc.ServerPreparedStatement)
        at com.mysql.jdbc.Connection.closeAllOpenStatements(
        at com.mysql.jdbc.Connection.realClose(
        at com.mysql.jdbc.Connection.close(
        - locked <0x00000005bd522568> (a com.mysql.jdbc.Connection)
        at org.apache.tomcat.jdbc.pool.PooledConnection.disconnect(

Please help us on this. Could it be a problem with tomcat-jdbc.jar? What should be our next
steps? I have read some article saying tomcat-jdbc.jar would give better performance than
commons dbcp pool.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message