Bug #79784 | update setup_instruments do not affect the global mutex/rwlock/cond | ||
---|---|---|---|
Submitted: | 28 Dec 2015 6:50 | Modified: | 21 Jan 2016 15:06 |
Reporter: | zhang yingqiang (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Performance Schema | Severity: | S3 (Non-critical) |
Version: | 5.6.24 5.7.10 | OS: | Any |
Assigned to: | Marc ALFF | CPU Architecture: | Any |
Tags: | Performance Schema; global mutex; |
[28 Dec 2015 6:50]
zhang yingqiang
[8 Jan 2016 12:36]
MySQL Verification Team
Hello zhang yingqiang, Thank you for the report and contribution. Thanks, Umesh
[8 Jan 2016 12:36]
MySQL Verification Team
-- 5.7.10 src build -- [umshastr@hod03]/export/umesh/server/source/bugs/79784/mysql-5.7.10/mysql-test: ./mtr ps_global Logging: ./mtr ps_global MySQL Version 5.7.10 Checking supported features... - SSL connections supported - binaries are debug compiled Collecting tests... Removing old var directory... Creating var directory '/export/umesh/server/source/bugs/79784/mysql-5.7.10/mysql-test/var'... Installing system database... ============================================================================== TEST RESULT TIME (ms) or COMMENT -------------------------------------------------------------------------- worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009 update performance_schema.setup_instruments set ENABLED='yes', TIMED='yes'; set DEBUG_SYNC='after_LOCK_uuid_generator WAIT_FOR continue'; select uuid();; select uuid();; show processlist; Id User Host db Command Time State Info 3 root localhost test Query 0 starting show processlist 4 root localhost test Query 1 debug sync point: after_LOCK_uuid_generator select uuid() 5 root localhost test Query 1 executing select uuid() select * from performance_schema.events_waits_current order by THREAD_ID desc limit 1; THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT SPINS OBJECT_SCHEMA OBJECT_NAME INDEX_NAME OBJECT_TYPE OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID NESTING_EVENT_TYPE OPERATION NUMBER_OF_BYTES FLAGS 26 23 23 wait/synch/mutex/sql/THD::LOCK_query_plan sql_class.h:1636 660349105508 660349290788 185280 NULL NULL NULL NULL NULL 139879367317872 22STAGE lock NULL NULL set DEBUG_SYNC='now signal continue'; update performance_schema.setup_instruments set ENABLED='no', TIMED='no'; uuid() 1c77f3e1-b601-11e5-9b4d-0010e05f3e06 uuid() 1c77f370-b601-11e5-9b4d-0010e05f3e06 main.ps_global [ pass ] 1019 -------------------------------------------------------------------------- The servers were restarted 0 times Spent 1.019 of 7 seconds executing testcases Completed: All 1 tests were successful. -- with suggested patch [umshastr@hod03]/export/umesh/server/source/bugs/79784/mysql-5.7.10/mysql-test: ./mtr ps_global Logging: ./mtr ps_global MySQL Version 5.7.10 Checking supported features... - SSL connections supported - binaries are debug compiled Collecting tests... Checking leftover processes... Removing old var directory... Creating var directory '/export/umesh/server/source/bugs/79784/mysql-5.7.10/mysql-test/var'... Installing system database... ============================================================================== TEST RESULT TIME (ms) or COMMENT -------------------------------------------------------------------------- worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009 update performance_schema.setup_instruments set ENABLED='yes', TIMED='yes'; set DEBUG_SYNC='after_LOCK_uuid_generator WAIT_FOR continue'; select uuid();; select uuid();; show processlist; Id User Host db Command Time State Info 3 root localhost test Query 0 starting show processlist 4 root localhost test Query 1 debug sync point: after_LOCK_uuid_generator select uuid() 5 root localhost test Query 1 executing select uuid() select * from performance_schema.events_waits_current order by THREAD_ID desc limit 1; THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT SPINS OBJECT_SCHEMA OBJECT_NAME INDEX_NAME OBJECT_TYPE OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID NESTING_EVENT_TYPE OPERATION NUMBER_OF_BYTES FLAGS 26 42 NULL wait/synch/mutex/sql/LOCK_uuid_generator item_strfunc.cc:5089 683659714216 1686893934440 1003234220224 NULL NULL NULL NULL NULL 46456480 41 STAGE lock NULL NULL set DEBUG_SYNC='now signal continue'; update performance_schema.setup_instruments set ENABLED='no', TIMED='no'; uuid() cf009d16-b603-11e5-97ba-0010e05f3e06 uuid() cf009c73-b603-11e5-97ba-0010e05f3e06 main.ps_global [ pass ] 1023 -------------------------------------------------------------------------- The servers were restarted 0 times Spent 1.023 of 8 seconds executing testcases Completed: All 1 tests were successful.
[21 Jan 2016 15:06]
Paul DuBois
Noted in 5.7.12, 5.8.0 changelogs. Some Performance Schema global instruments, if not enabled at server startup, could be in a state where it was not possible to enable them at runtime. This restriction has been lifted. Affected instruments include mutex, rwlock, cond, and socket instances. Thanks to Zhang Yingqiang for the patch.