-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSL problems after locally scoped disconnect #431
Comments
Are both Perl and MySQL using |
I assume this also fails with v5.006 or that you didn't test this version? |
- Stop calling `mysql_library_end()` in `dbd_db_destroy()` as this leads to issues with OpenSSL in specific circumstances. - Call `myql_library_end()` instead of `mysql_server_end()` as the latter has been deprecated. See also: - https://dev.mysql.com/doc/c-api/8.4/en/mysql-server-end.html - https://dev.mysql.com/doc/c-api/8.4/en/mysql-library-end.html Closes perl5-dbi#431
- Stop calling `mysql_library_end()` in `dbd_db_destroy()` as this leads to issues with OpenSSL in specific circumstances. - Call `myql_library_end()` instead of `mysql_server_end()` as the latter has been deprecated. See also: - https://dev.mysql.com/doc/c-api/8.4/en/mysql-server-end.html - https://dev.mysql.com/doc/c-api/8.4/en/mysql-library-end.html Closes perl5-dbi#431
I also filed this: https://bugs.mysql.com/bug.php?id=115326 |
yes |
I'm sorry I don't quite understand the question. If you are asking if the MySQL library is using the same SSL library I can't answer. I would assume so - but I don't think this is germane to the problem. I think the problem is essentially that |
- Stop calling `mysql_library_end()` in `dbd_db_destroy()` as this leads to issues with OpenSSL in specific circumstances. - Call `myql_library_end()` instead of `mysql_server_end()` as the latter has been deprecated. - Add missing define for `dbd_discon_all` See also: - https://dev.mysql.com/doc/c-api/8.4/en/mysql-server-end.html - https://dev.mysql.com/doc/c-api/8.4/en/mysql-library-end.html Closes perl5-dbi#431
Will you be releasing this version to CPAN soon? |
This is scheduled for next week https://github.com/perl5-dbi/DBD-mysql/milestone/11 |
DBD::mysql version
5.003, 5.004, 5.005
MySQL client version
8.0.37
Server version
8.4.0
Operating system version
Linux (amazonlinux:2), libssl.so.1.0.2k
What happened?
Creating a connection using
DBD::mysql
versions 5.003 - 5.005 in a locally scoped block and then disconnecting in the same locally scope block puts SSL in a state where downstream SSL connections fail with a 500 (internal response).The script below will demonstrate the problem:
The problem persists regardless of the 8.x MySQL client library I use to build
DBD::mysql
(I've tried several), so I believe the problem is related to what has been changed from version 5.002 to version 5.003. The problem does not manifest itself in 5.002 or when using version 4.050.The output of the program above is attached:
bug-report.txt
Other information
In version 5.003
mysql_library_end()
was added. Removing this line "fixes" the issue, although there may be other side effects of removing this line (memory leaks?). At the very least this sub is probably being called prematurely as it appears to remove plugins (like openssl plugin that apparently resets the TLS context):Incidentally, it appears that
dbd_db_destroy()
is being invoked when a database handle goes out scope in either a closure or a sub. This implies you probably should not be callingmysql_library_end()
in that subroutine?dbd_discon_all
might be the appropriate place to callmysql_library_end()
but it appears to have been disabled back in 2003. You should also know thatmysql_server_end()
is called indbd_discon_all()
already. (mysql_server_end
is an alias formysql_library_end()
).The text was updated successfully, but these errors were encountered: