Description:
My jstack message just like the following section.
It will never return. There is a "while(){}" in MysqlIO.skipFully.
It is similar to bug #73053: https://bugs.mysql.com/bug.php?id=73053.
Please help me to make clear what happens here.
java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.socketAvailable(Native Method)
at java.net.AbstractPlainSocketImpl.available(AbstractPlainSocketImpl.java:478)
- locked <0x000000079a3eaab8> (a java.net.SocksSocketImpl)
at java.net.SocketInputStream.available(SocketInputStream.java:238)
at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:61)
at com.mysql.jdbc.util.ReadAheadInputStream.skip(ReadAheadInputStream.java:283)
at com.mysql.jdbc.MysqlIO.skipFully(MysqlIO.java:2974)
at com.mysql.jdbc.MysqlIO.nextRowFast(MysqlIO.java:2171)
at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1964)
at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:3316)
at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:463)
at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:3040)
at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2288)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2681)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2551)
- locked <0x0000000795bc53f0> (a com.mysql.jdbc.JDBC4Connection)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)
- locked <0x0000000795bc53f0> (a com.mysql.jdbc.JDBC4Connection)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1192)
- locked <0x0000000795bc53f0> (a com.mysql.jdbc.JDBC4Connection)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:67)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:41)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:66)
at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:45)
at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:108)
at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:75)
How to repeat:
config:
jdbc:mysql://${jdbc.base.host}:${jdbc.base.port}/${jdbc.base.dbname}?useUnicode=true&zeroDateTimeBehavior=convertToNull&autoReconnect=true
and do not config connectTimeout or socketTimeout value
use connector/J version 3.1.24 or 3.1.38
when the mysql server close the connection firstly, then client just waiting like what description said.
Description: My jstack message just like the following section. It will never return. There is a "while(){}" in MysqlIO.skipFully. It is similar to bug #73053: https://bugs.mysql.com/bug.php?id=73053. Please help me to make clear what happens here. java.lang.Thread.State: RUNNABLE at java.net.PlainSocketImpl.socketAvailable(Native Method) at java.net.AbstractPlainSocketImpl.available(AbstractPlainSocketImpl.java:478) - locked <0x000000079a3eaab8> (a java.net.SocksSocketImpl) at java.net.SocketInputStream.available(SocketInputStream.java:238) at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:61) at com.mysql.jdbc.util.ReadAheadInputStream.skip(ReadAheadInputStream.java:283) at com.mysql.jdbc.MysqlIO.skipFully(MysqlIO.java:2974) at com.mysql.jdbc.MysqlIO.nextRowFast(MysqlIO.java:2171) at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1964) at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:3316) at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:463) at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:3040) at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2288) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2681) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2551) - locked <0x0000000795bc53f0> (a com.mysql.jdbc.JDBC4Connection) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861) - locked <0x0000000795bc53f0> (a com.mysql.jdbc.JDBC4Connection) at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1192) - locked <0x0000000795bc53f0> (a com.mysql.jdbc.JDBC4Connection) at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:67) at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:41) at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:66) at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:45) at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:108) at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:75) How to repeat: config: jdbc:mysql://${jdbc.base.host}:${jdbc.base.port}/${jdbc.base.dbname}?useUnicode=true&zeroDateTimeBehavior=convertToNull&autoReconnect=true and do not config connectTimeout or socketTimeout value use connector/J version 3.1.24 or 3.1.38 when the mysql server close the connection firstly, then client just waiting like what description said.