-
Notifications
You must be signed in to change notification settings - Fork 28
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
Update server_audit.cc #1
base: mysql-5.7
Are you sure you want to change the base?
Conversation
Fix the crash issue caused by the plugin being stopped after switching from a read lock to a write lock.
Hi! Thanks for your contribution and finding what seems to be a race condition!
We would need to verify this either manually or by adding a MTR test for this case. To make it easier and faster for us to test, can you share what exact SQL commands you used to trigger the issue? What are the steps we should do to reproduce the issue?
This project is GPLv2 and all submissions are under it. Additional comments in PRs will not affect it. Regarding copyright however, we do need to attribute the authors of all contributions. Your submission is currently as Thanks! |
Steps:
sysbench --mysql-host=<mysql-host> --mysql-port=<mysql-port> --mysql-db=<mysql-db> --db-driver=mysql --mysql-user=<mysql-user> --mysql-password=<mysql-password> --threads=1000 --time=300 --verbosity=5 --thread-init-timeout=1200 --table_size=500000 --rand-type=uniform --report-interval=1 --percentile=99 --skip_trx=on --tables=100 --mysql-ignore-errors=all /usr/local/share/sysbench/oltp_read_only.lua run
#!/usr/bin/env bash
set -e
for i in {1..1000}; do
mysql -S /path/to/mysqld.sock -e "set global server_audit_logging = on;"
mysql -S /path/to/mysqld.sock -e "set global server_audit_logging = off;"
done My email is shapled@shapled.com, just use the name "shapled". Thank you! |
mysql version: How to reappear: Crash log: key_buffer_size=8388608 Thread pointer: 0x7fe780035330 Trying to get some variables. The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains ps: mysql-8.0.35 is all ok. |
Fix the crash issue caused by the plugin being stopped after switching from a read lock to a write lock.
Issue #, if available:
If auditing is disabled by another thread just after the read lock is released but before acquiring the write lock, it will cause the instance to crash.
Description of changes:
Check if the logfile object has been released.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.