Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
When I call Connection::close(), I get an AssertionError from PacketOutputStream. Disabling assertions doesn't work because these exceptions are for some reason thrown explicitly and on purpose. Please change these to common catchable/swallowable exceptions. I am now having to catch this specifically (or worse Throwable which gets things like OutOfMemoryError) when trying to swallow exceptions on close().
Here is a stack trace with c3p0:
java.lang.AssertionError: Last packet not finished
|
at org.mariadb.jdbc.internal.common.packet.PacketOutputStream.startPacket(PacketOutputStream.java:38)
|
at org.mariadb.jdbc.internal.common.packet.commands.ClosePacket.send(ClosePacket.java:66)
|
at org.mariadb.jdbc.internal.mysql.MySQLProtocol.close(MySQLProtocol.java:563)
|
at org.mariadb.jdbc.internal.mysql.MySQLProtocol.close(MySQLProtocol.java:600)
|
at org.mariadb.jdbc.MySQLConnection.close(MySQLConnection.java:249)
|
at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:549)
|
at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:234)
|
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:470)
|
at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:964)
|
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
|
It can happen elsewhere:
java.lang.AssertionError: Last packet not finished
|
at org.mariadb.jdbc.internal.common.packet.PacketOutputStream.startPacket(PacketOutputStream.java:38)
|
at org.mariadb.jdbc.internal.common.packet.commands.StreamedQueryPacket.send(StreamedQueryPacket.java:76)
|
at org.mariadb.jdbc.internal.mysql.MySQLProtocol.executeQuery(MySQLProtocol.java:789)
|
at org.mariadb.jdbc.MySQLStatement.execute(MySQLStatement.java:282)
|
at org.mariadb.jdbc.MySQLStatement.executeQuery(MySQLStatement.java:302)
|
at org.mariadb.jdbc.MySQLStatement.executeQuery(MySQLStatement.java:361)
|
at org.mariadb.jdbc.MySQLConnection.getAutoCommit(MySQLConnection.java:199)
|
at com.mchange.v2.c3p0.impl.C3P0ImplUtils.resetTxnState(C3P0ImplUtils.java:270)
|
at com.mchange.v2.c3p0.impl.NewPooledConnection.reset(NewPooledConnection.java:388)
|
at com.mchange.v2.c3p0.impl.NewPooledConnection.markClosedProxyConnection(NewPooledConnection.java:362)
|
at com.mchange.v2.c3p0.impl.NewProxyConnection.close(NewProxyConnection.java:1246)
|
Attachments
Issue Links
- relates to
-
CONJ-68 java.io.IOException: Last packet not finished
- Closed