Bug #88616 | MySql connector crashes with NullPointerException when accessign a closed conn | ||
---|---|---|---|
Submitted: | 23 Nov 2017 9:18 | Modified: | 27 Dec 2017 12:09 |
Reporter: | magnus persson | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | Connector / J | Severity: | S1 (Critical) |
Version: | 8.0.8-dmr | OS: | Any |
Assigned to: | Assigned Account | CPU Architecture: | Any |
[23 Nov 2017 9:18]
magnus persson
[23 Nov 2017 11:30]
Chiranjeevi Battula
Hello magnus persson, Thank you for the bug report. I tried to reproduce the issue at my end using MySQL Connector / J 8.0.8 dmr and MySQL 5.7.20 but not seeing any issues. Could you please provide repeatable test case (exact steps, database/create table statements, full stack trace, sample code etc. - please make it as private if you prefer) to confirm this issue at our end? Thanks, Chiranjeevi.
[23 Nov 2017 11:36]
Chiranjeevi Battula
1) Frist run with connection kills run: Connecting to a database... Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary. Thu Nov 23 15:54:58 IST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification. Connected database successfully... java.sql.SQLException: Can not read response from server. Expected to read 4,505 bytes, read 2,318 bytes before connection was unexpectedly lost. Connection Closed! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:121) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:116) at com.mysql.cj.jdbc.StatementImpl.executeQuery(StatementImpl.java:1488) at mysqlbugs.Bug_88616.main(Bug_88616.java:42) BUILD SUCCESSFUL (total time: 5 seconds) 2) Second run run: Connecting to a database... Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary. Thu Nov 23 15:55:45 IST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification. Connected database successfully... select query via msyql connector return when max_execution_time is set Connection Closed! BUILD SUCCESSFUL (total time: 10 seconds)
[27 Nov 2017 6:19]
magnus persson
Did you do this in your test: for(i=0;i<10000000;i++) { do_a_query_wihout_a_connectionpool() } while the code above runs, login in the mysql: show full processlist; kill <the connection used above> The result for me is a nullpointerexcpetion in the code above.
[27 Nov 2017 12:09]
Chiranjeevi Battula
Hello magnus persson, Thank you for your feedback. Could you please provide repeatable test case (exact steps, sample code etc. - please make it as private if you prefer) to confirm this issue at our end? Thanks, Chiranjeevi.
[28 Dec 2017 1:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".