[CONJ-34] AssertionError is thrown from PacketOutputStream when server goes away Created: 2013-05-06 Updated: 2015-04-20 Resolved: 2013-05-06 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.1.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Chad Retz (Inactive) | Assignee: | Vladislav Vaintroub |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| 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:
It can happen elsewhere:
|
| Comments |
| Comment by Marissa Hollingsworth [ 2013-05-14 ] |
|
Does anyone know what may cause the second case mentioned in the description? The exception seems to occur frequently when the setAutoCommit command is executed. Caused by: java.lang.AssertionError: Last packet not finished |
| Comment by Vladislav Vaintroub [ 2013-05-14 ] |
|
One of possible causes is that server has shut down or connection was killed, or inactivity timeout was reached, and as reasult socket was closed on the server side. |