Bug #84597 | mysqladmin shutdown hangs after flush-logs error | ||
---|---|---|---|
Submitted: | 21 Jan 2017 19:17 | Modified: | 23 Jan 2017 8:19 |
Reporter: | Juan Arruti | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Command-line Clients | Severity: | S3 (Non-critical) |
Version: | 5.7.17 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[21 Jan 2017 19:17]
Juan Arruti
[23 Jan 2017 8:19]
MySQL Verification Team
Hello Juan Arruti, Thank you for the report. Verified as described with 5.7.17 build. Thanks, Umesh
[23 Jan 2017 8:19]
MySQL Verification Team
test results
Attachment: 84597.results (application/octet-stream, text), 19.50 KiB.
[10 Feb 2017 7:00]
MySQL Verification Team
-- Confirmed with daily build, no longer seen reported issue i.e no error upon flush logs on slave, and even slave shutdown just went fine without any issues... [umshastr@hod03]/export/umesh/server/binaries/DailyBuilds/mysql-5.7.18: bin/mysql -uroot -S /tmp/mysql_slave.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 33 Server version: 5.7.18-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial) Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. root@localhost [(none)]> select count(*),@@super_read_only,@@read_only from mysql.gtid_executed; +----------+-------------------+-------------+ | count(*) | @@super_read_only | @@read_only | +----------+-------------------+-------------+ | 1 | 1 | 1 | +----------+-------------------+-------------+ 1 row in set (0.00 sec) root@localhost [(none)]> \q Bye [umshastr@hod03]/export/umesh/server/binaries/DailyBuilds/mysql-5.7.18: bin/mysql -uroot -S /tmp/mysql_slave.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 34 Server version: 5.7.18-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial) Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. root@localhost [(none)]> \q Bye [umshastr@hod03]/export/umesh/server/binaries/DailyBuilds/mysql-5.7.18: bin/mysqladmin -uroot -S /tmp/mysql_slave.sock flush-logs [umshastr@hod03]/export/umesh/server/binaries/DailyBuilds/mysql-5.7.18: bin/mysqladmin -uroot -S /tmp/mysql_slave.sock flush-logs [umshastr@hod03]/export/umesh/server/binaries/DailyBuilds/mysql-5.7.18: bin/mysqladmin -uroot -S /tmp/mysql_slave.sock flush-logs [umshastr@hod03]/export/umesh/server/binaries/DailyBuilds/mysql-5.7.18: bin/mysqladmin -uroot -S /tmp/mysql_slave.sock flush-logs [umshastr@hod03]/export/umesh/server/binaries/DailyBuilds/mysql-5.7.18: bin/mysqladmin -uroot -S /tmp/mysql_slave.sock flush-logs [umshastr@hod03]/export/umesh/server/binaries/DailyBuilds/mysql-5.7.18: bin/mysql -uroot -S /tmp/mysql_slave.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 40 Server version: 5.7.18-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial) Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. root@localhost [(none)]> flush logs; Query OK, 0 rows affected (0.02 sec) root@localhost [(none)]> flush logs; Query OK, 0 rows affected (0.01 sec) root@localhost [(none)]> select count(*),@@super_read_only,@@read_only from mysql.gtid_executed; +----------+-------------------+-------------+ | count(*) | @@super_read_only | @@read_only | +----------+-------------------+-------------+ | 1 | 1 | 1 | +----------+-------------------+-------------+ 1 row in set (0.00 sec) root@localhost [(none)]> root@localhost [(none)]> \q Bye [umshastr@hod03]/export/umesh/server/binaries/DailyBuilds/mysql-5.7.18: bin/mysqladmin -uroot -S /tmp/mysql_slave.sock flush-logs [umshastr@hod03]/export/umesh/server/binaries/DailyBuilds/mysql-5.7.18: bin/mysqladmin -uroot -S /tmp/mysql_slave.sock flush-logs [umshastr@hod03]/export/umesh/server/binaries/DailyBuilds/mysql-5.7.18: bin/mysqladmin -uroot -S /tmp/mysql_slave.sock flush-logs [umshastr@hod03]/export/umesh/server/binaries/DailyBuilds/mysql-5.7.18: bin/mysqladmin -uroot -S /tmp/mysql_slave.sock flush-logs [umshastr@hod03]/export/umesh/server/binaries/DailyBuilds/mysql-5.7.18: bin/mysqladmin -uroot -S /tmp/mysql_slave.sock flush-logs [umshastr@hod03]/export/umesh/server/binaries/DailyBuilds/mysql-5.7.18: bin/mysqladmin -uroot -S /tmp/mysql_slave.sock flush-logs [umshastr@hod03]/export/umesh/server/binaries/DailyBuilds/mysql-5.7.18: bin/mysql -uroot -S /tmp/mysql_slave.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 47 Server version: 5.7.18-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial) Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. root@localhost [(none)]> select count(*),@@super_read_only,@@read_only from mysql.gtid_executed; +----------+-------------------+-------------+ | count(*) | @@super_read_only | @@read_only | +----------+-------------------+-------------+ | 1 | 1 | 1 | +----------+-------------------+-------------+ 1 row in set (0.00 sec) root@localhost [(none)]> select count(*),@@super_read_only,@@read_only from mysql.gtid_executed; +----------+-------------------+-------------+ | count(*) | @@super_read_only | @@read_only | +----------+-------------------+-------------+ | 1 | 1 | 1 | +----------+-------------------+-------------+ 1 row in set (0.00 sec) root@localhost [(none)]> select count(*),@@super_read_only,@@read_only from mysql.gtid_executed; +----------+-------------------+-------------+ | count(*) | @@super_read_only | @@read_only | +----------+-------------------+-------------+ | 1 | 1 | 1 | +----------+-------------------+-------------+ 1 row in set (0.00 sec) root@localhost [(none)]> \q Bye [umshastr@hod03]/export/umesh/server/binaries/DailyBuilds/mysql-5.7.18: bin/mysqladmin -uroot -S /tmp/mysql_slave.sock shutdown [umshastr@hod03]/export/umesh/server/binaries/DailyBuilds/mysql-5.7.18: [umshastr@hod03]/export/umesh/server/binaries/DailyBuilds/mysql-5.7.18: cat docs/INFO_SRC commit: 2dffd6c476c478d602beb3cf31f554c6d355a9ea date: 2017-02-09 15:14:33 +0530 build-date: 2017-02-09 18:00:30 +0100 short: 2dffd6c branch: mysql-5.7 MySQL source 5.7.18 Per internal discussion with Sujatha, this seems to be fixed post https://clustra.no.oracle.com/orabugs/bug.php?id=22857926
[1 Jun 2017 19:46]
Sveta Smirnova
Most likely fixed with this commit: commit b24fedd4a043088f3d9117bea3011788d4f6531e Author: Sujatha Sivakumar <sujatha.sivakumar@oracle.com> Date: Tue Nov 15 12:01:05 2016 +0530 Bug#22857926: ASSERTION `! IS_SET()' AT SQL_ERROR.CC:38 IN READ_ONLY MODE FOR MANY RPL CMDS. Problem: ======= This bug is opened to fix assertion `! is_set()' at sql_error.cc:380 in "void Diagnostics_area::set_ok_status (ulonglong, ulonglong, const char*)" for many RPL commands. This issue has been fixed for couple of commands with Bug#22097534. But, still issue exists for few other commands. RPL commands affected:- ======================= [PENDING] 1. FLUSH LOGS; [PENDING] 2. RESET SLAVE ALL; [PENDING] 3. SET GLOBAL gtid_purged='aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1'; [FIXED] 4. CHANGE MASTER TO.. [FIXED] 5. CHANGE REPLICATION FILTER [FIXED] 6. START SLAVE; [FIXED] 7. STOP SLAVE; Analysis: ======== When the above set of commands are executed they will try to update replication specific system tables. For example mysql.gtid_executed mysql.salve_master_info mysql.relay_log_info This scenario is applicable to all replication specific internal system tables. During the fix for Bug22097534 it was concluded that "read only" mode should prevent changes to user data, but not to prevent normal Server operations or to prevent a DBA from managing the state of the MySQL Server itself. Hence the above commands should be able to update data in replication specific internal tables. Fix: === There exists a flag named 'ignore_global_read_lock' whose intention is to ignore the read only option and allow commits to replication specific system tables. Reused this flag as part of fix. If this flag is set then the additional check for 'read only' option is not done. Hence 'read only' mode error will not be reported and command will complete successfully.
[1 Jun 2017 19:47]
Sveta Smirnova
At least we cannot repeat this bug with version 5.7.18 anymore.