A thread was hanged on java.net.SocketInputStream.socketRead0(Native Method), anyone know what happend?

我怕爱的太早我们不能终老 提交于 2019-12-12 10:03:40

问题


 "[GMQMsgConsumeThread:113.105.152.146:22300, queue:Q_COOMIX_IMG_META]" prio=10 tid=0x08431000 nid=0x774c runnable [0x6e6b5000]
       java.lang.Thread.State: RUNNABLE
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:129)
        at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:113)
        at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:160)
        at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:188)
        - locked <0x83f593e0> (a com.mysql.jdbc.util.ReadAheadInputStream)
        at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1910)
        at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:501)
        at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:379)
        at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:1970)
        at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:1387)
        at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1195)
        - locked <0x83f596a0> (a java.lang.Object)
        at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:693)
        at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1266)
        - locked <0x83f596a0> (a java.lang.Object)
        at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
        at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
    .........
    .........

       Locked ownable synchronizers:
        - None

The relational environment as follows:

mysql: 5.1.56 mysql jdbc driver: MySQL Connector/J 5.0.4 DBCP 1.4

Any ideas on what could be the cause?

thanks


回答1:


This is caused by a deadlock. There is an uncommited data trying to be read. Im my case the data was on database schema, since the operations I was trying to do is an ALTER TABLE.



来源:https://stackoverflow.com/questions/9817681/a-thread-was-hanged-on-java-net-socketinputstream-socketread0native-method-an

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!