Description:
Hi,
My application is running simple query in production.
At the same time, the same user used twice a function in my application at the same time and we got a java deadlock in mysql classes
Found deadlock:
"undertow task-84"
waiting to lock com.mysql.cj.jdbc.result.ResultSetImpl@3d0e5e5f
which is held by "undertow task-70"
"undertow task-70"
waiting to lock com.mysql.cj.jdbc.ConnectionImpl@686aacee
which is held by "undertow task-84"
"undertow task-70" #1287
java.lang.Thread.State: BLOCKED
at com.mysql.cj.jdbc.result.ResultSetImpl.setWrapperStatement(ResultSetImpl.java:2071)
- waiting to lock com.mysql.cj.jdbc.ConnectionImpl@686aacee
- locked on com.mysql.cj.jdbc.result.ResultSetImpl@3d0e5e5f
at com.mysql.cj.jdbc.PreparedStatementWrapper.executeQuery(PreparedStatementWrapper.java:582)
at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:462)
"undertow task-84" #1313
java.lang.Thread.State: BLOCKED
at com.mysql.cj.protocol.a.result.NativeResultset.getNextResultset(NativeResultset.java:138)
- waiting to lock com.mysql.cj.jdbc.result.ResultSetImpl@3d0e5e5f
at com.mysql.cj.jdbc.StatementImpl.removeOpenResultSet(StatementImpl.java:490)
- locked on com.mysql.cj.jdbc.ConnectionImpl@686aacee
at com.mysql.cj.jdbc.result.ResultSetImpl.realClose(ResultSetImpl.java:1863)
- locked on com.mysql.cj.jdbc.ConnectionImpl@686aacee
at com.mysql.cj.jdbc.result.ResultSetImpl.close(ResultSetImpl.java:524)
at com.mysql.cj.jdbc.StatementImpl.realClose(StatementImpl.java:1783)
at com.mysql.cj.jdbc.ClientPreparedStatement.realClose(ClientPreparedStatement.java:1310)
- locked on com.mysql.cj.jdbc.ConnectionImpl@686aacee
at com.mysql.cj.jdbc.StatementImpl.close(StatementImpl.java:428)
at com.mysql.cj.jdbc.StatementWrapper.close(StatementWrapper.java:466)
at com.mysql.cj.jdbc.PreparedStatementWrapper.close(PreparedStatementWrapper.java:930)
- locked on com.mysql.cj.jdbc.PreparedStatementWrapper@4b37c5d
at org.jboss.jca.adapters.jdbc.WrappedStatement.internalClose(WrappedStatement.java:1312)
at org.jboss.jca.adapters.jdbc.WrappedConnection.close(WrappedConnection.java:255)
- locked on org.jboss.jca.adapters.jdbc.jdk7.WrappedConnectionJDK7@75b4f459
I checked the changelog of all mysql-connector and it's not an open issue
How to repeat:
It's a random problem
Description: Hi, My application is running simple query in production. At the same time, the same user used twice a function in my application at the same time and we got a java deadlock in mysql classes Found deadlock: "undertow task-84" waiting to lock com.mysql.cj.jdbc.result.ResultSetImpl@3d0e5e5f which is held by "undertow task-70" "undertow task-70" waiting to lock com.mysql.cj.jdbc.ConnectionImpl@686aacee which is held by "undertow task-84" "undertow task-70" #1287 java.lang.Thread.State: BLOCKED at com.mysql.cj.jdbc.result.ResultSetImpl.setWrapperStatement(ResultSetImpl.java:2071) - waiting to lock com.mysql.cj.jdbc.ConnectionImpl@686aacee - locked on com.mysql.cj.jdbc.result.ResultSetImpl@3d0e5e5f at com.mysql.cj.jdbc.PreparedStatementWrapper.executeQuery(PreparedStatementWrapper.java:582) at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:462) "undertow task-84" #1313 java.lang.Thread.State: BLOCKED at com.mysql.cj.protocol.a.result.NativeResultset.getNextResultset(NativeResultset.java:138) - waiting to lock com.mysql.cj.jdbc.result.ResultSetImpl@3d0e5e5f at com.mysql.cj.jdbc.StatementImpl.removeOpenResultSet(StatementImpl.java:490) - locked on com.mysql.cj.jdbc.ConnectionImpl@686aacee at com.mysql.cj.jdbc.result.ResultSetImpl.realClose(ResultSetImpl.java:1863) - locked on com.mysql.cj.jdbc.ConnectionImpl@686aacee at com.mysql.cj.jdbc.result.ResultSetImpl.close(ResultSetImpl.java:524) at com.mysql.cj.jdbc.StatementImpl.realClose(StatementImpl.java:1783) at com.mysql.cj.jdbc.ClientPreparedStatement.realClose(ClientPreparedStatement.java:1310) - locked on com.mysql.cj.jdbc.ConnectionImpl@686aacee at com.mysql.cj.jdbc.StatementImpl.close(StatementImpl.java:428) at com.mysql.cj.jdbc.StatementWrapper.close(StatementWrapper.java:466) at com.mysql.cj.jdbc.PreparedStatementWrapper.close(PreparedStatementWrapper.java:930) - locked on com.mysql.cj.jdbc.PreparedStatementWrapper@4b37c5d at org.jboss.jca.adapters.jdbc.WrappedStatement.internalClose(WrappedStatement.java:1312) at org.jboss.jca.adapters.jdbc.WrappedConnection.close(WrappedConnection.java:255) - locked on org.jboss.jca.adapters.jdbc.jdk7.WrappedConnectionJDK7@75b4f459 I checked the changelog of all mysql-connector and it's not an open issue How to repeat: It's a random problem