http://buildbot.askmonty.org/buildbot/builders/kvm-fulltest/builds/10584/steps/test_1/logs/stdio
sys_vars.innodb_buffer_pool_load_now_basic 'innodb' w2 [ fail ]
|
Test ended at 2017-10-11 11:24:15
|
|
CURRENT_TEST: sys_vars.innodb_buffer_pool_load_now_basic
|
Warning: /mnt/buildbot/build/mariadb-10.2.10/libmysqld/examples/mysqltest_embedded: unknown variable 'loose-ssl-ca=/mnt/buildbot/build/mariadb-10.2.10/mysql-test/std_data/cacert.pem'
|
Warning: /mnt/buildbot/build/mariadb-10.2.10/libmysqld/examples/mysqltest_embedded: unknown variable 'loose-ssl-cert=/mnt/buildbot/build/mariadb-10.2.10/mysql-test/std_data/client-cert.pem'
|
Warning: /mnt/buildbot/build/mariadb-10.2.10/libmysqld/examples/mysqltest_embedded: unknown variable 'loose-ssl-key=/mnt/buildbot/build/mariadb-10.2.10/mysql-test/std_data/client-key.pem'
|
Warning: /mnt/buildbot/build/mariadb-10.2.10/libmysqld/examples/mysqltest_embedded: unknown option '--loose-skip-ssl'
|
--- /mnt/buildbot/build/mariadb-10.2.10/mysql-test/suite/sys_vars/r/innodb_buffer_pool_load_now_basic.result 2017-10-11 06:31:58.000000000 -0400
|
+++ /mnt/buildbot/build/mariadb-10.2.10/mysql-test/suite/sys_vars/r/innodb_buffer_pool_load_now_basic.reject 2017-10-11 11:24:13.832609279 -0400
|
@@ -4,6 +4,17 @@
|
0
|
SET GLOBAL innodb_buffer_pool_dump_now = ON;
|
SET GLOBAL innodb_buffer_pool_load_now = ON;
|
+Timeout in wait_condition.inc for SELECT variable_value != 'Buffer pool(s) load completed at 171011 11:23:43' &&
|
+SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) load completed at '
|
+ FROM information_schema.global_status
|
+WHERE LOWER(variable_name) = 'innodb_buffer_pool_load_status'
|
+Id User Host db Command Time State Info Progress
|
+1 system user NULL Daemon NULL InnoDB purge coordinator NULL 0.000
|
+4 system user NULL Daemon NULL InnoDB purge worker NULL 0.000
|
+2 system user NULL Daemon NULL InnoDB purge worker NULL 0.000
|
+3 system user NULL Daemon NULL InnoDB purge worker NULL 0.000
|
+5 system user NULL Daemon NULL InnoDB shutdown handler NULL 0.000
|
+6 root localhost test Query 0 cleaning up show full processlist 0.000
|
SELECT variable_value
|
FROM information_schema.global_status
|
WHERE LOWER(variable_name) = 'innodb_buffer_pool_load_status';
|
|
mysqltest: Result length mismatch
|
- relates to
-
MDEV-10651
sys_vars.innodb_buffer_pool_dump_pct_basic failed in buildbot
-
-
Closed
{"report":{"fcp":870,"ttfb":261.69999980926514,"pageVisibility":"visible","entityId":63825,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":32,"apdex":1,"journeyId":"b0757967-3492-4807-82c0-0bd19cdbb34f","navigationType":0,"readyForUser":949.6999998092651,"redirectCount":0,"resourceLoadedEnd":921,"resourceLoadedStart":269.1000003814697,"resourceTiming":[{"duration":41.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":269.1000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":269.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":310.6000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":41.90000057220459,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":269.3999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":269.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":311.30000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":99.09999942779541,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":269.6000003814697,"connectEnd":269.6000003814697,"connectStart":269.6000003814697,"domainLookupEnd":269.6000003814697,"domainLookupStart":269.6000003814697,"fetchStart":269.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":269.6000003814697,"responseEnd":368.69999980926514,"responseStart":368.69999980926514,"secureConnectionStart":269.6000003814697},{"duration":173.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":269.80000019073486,"connectEnd":269.80000019073486,"connectStart":269.80000019073486,"domainLookupEnd":269.80000019073486,"domainLookupStart":269.80000019073486,"fetchStart":269.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":269.80000019073486,"responseEnd":443.1000003814697,"responseStart":443.1000003814697,"secureConnectionStart":269.80000019073486},{"duration":176.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":270,"connectEnd":270,"connectStart":270,"domainLookupEnd":270,"domainLookupStart":270,"fetchStart":270,"redirectEnd":0,"redirectStart":0,"requestStart":270,"responseEnd":446.80000019073486,"responseStart":446.80000019073486,"secureConnectionStart":270},{"duration":177,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":270.19999980926514,"connectEnd":270.19999980926514,"connectStart":270.19999980926514,"domainLookupEnd":270.19999980926514,"domainLookupStart":270.19999980926514,"fetchStart":270.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":270.19999980926514,"responseEnd":447.19999980926514,"responseStart":447.19999980926514,"secureConnectionStart":270.19999980926514},{"duration":177.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":270.30000019073486,"connectEnd":270.30000019073486,"connectStart":270.30000019073486,"domainLookupEnd":270.30000019073486,"domainLookupStart":270.30000019073486,"fetchStart":270.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":270.30000019073486,"responseEnd":447.6000003814697,"responseStart":447.6000003814697,"secureConnectionStart":270.30000019073486},{"duration":242.39999961853027,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":270.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":270.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":512.8999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":177.5999994277954,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":270.6000003814697,"connectEnd":270.6000003814697,"connectStart":270.6000003814697,"domainLookupEnd":270.6000003814697,"domainLookupStart":270.6000003814697,"fetchStart":270.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":270.6000003814697,"responseEnd":448.19999980926514,"responseStart":448.19999980926514,"secureConnectionStart":270.6000003814697},{"duration":242.30000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":270.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":270.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":513.1000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":177.79999923706055,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":271.1000003814697,"connectEnd":271.1000003814697,"connectStart":271.1000003814697,"domainLookupEnd":271.1000003814697,"domainLookupStart":271.1000003814697,"fetchStart":271.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":271.1000003814697,"responseEnd":448.8999996185303,"responseStart":448.8999996185303,"secureConnectionStart":271.1000003814697},{"duration":362.70000076293945,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":271.8999996185303,"connectEnd":271.8999996185303,"connectStart":271.8999996185303,"domainLookupEnd":271.8999996185303,"domainLookupStart":271.8999996185303,"fetchStart":271.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":271.8999996185303,"responseEnd":634.6000003814697,"responseStart":634.6000003814697,"secureConnectionStart":271.8999996185303},{"duration":609.1000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":276,"connectEnd":276,"connectStart":276,"domainLookupEnd":276,"domainLookupStart":276,"fetchStart":276,"redirectEnd":0,"redirectStart":0,"requestStart":276,"responseEnd":885.1000003814697,"responseStart":885.1000003814697,"secureConnectionStart":276},{"duration":113.10000038146973,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":526.6999998092651,"connectEnd":526.6999998092651,"connectStart":526.6999998092651,"domainLookupEnd":526.6999998092651,"domainLookupStart":526.6999998092651,"fetchStart":526.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":526.6999998092651,"responseEnd":639.8000001907349,"responseStart":639.8000001907349,"secureConnectionStart":526.6999998092651},{"duration":104.10000038146973,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":816.8999996185303,"connectEnd":816.8999996185303,"connectStart":816.8999996185303,"domainLookupEnd":816.8999996185303,"domainLookupStart":816.8999996185303,"fetchStart":816.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":816.8999996185303,"responseEnd":921,"responseStart":921,"secureConnectionStart":816.8999996185303},{"duration":163.80000019073486,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":862.3000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":862.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1026.1000003814697,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":86,"responseStart":262,"responseEnd":268,"domLoading":266,"domInteractive":1060,"domContentLoadedEventStart":1060,"domContentLoadedEventEnd":1123,"domComplete":1413,"loadEventStart":1413,"loadEventEnd":1414,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1032.3999996185303},{"name":"bigPipe.sidebar-id.end","time":1033.1999998092651},{"name":"bigPipe.activity-panel-pipe-id.start","time":1033.3999996185303},{"name":"bigPipe.activity-panel-pipe-id.end","time":1038.8000001907349},{"name":"activityTabFullyLoaded","time":1153.6999998092651}],"measures":[],"correlationId":"15527dbaffef4b","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":110,"dbReadsTimeInMs":15,"dbConnsTimeInMs":24,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Reproducible reliably with this injection:
diff --git a/storage/innobase/buf/buf0dump.cc b/storage/innobase/buf/buf0dump.cc
index 945a154..0cd4cf2 100644
--- a/storage/innobase/buf/buf0dump.cc
+++ b/storage/innobase/buf/buf0dump.cc
@@ -813,6 +813,7 @@ DECLARE_THREAD(buf_dump_thread)(void*)
#ifdef WITH_WSREP
if (!wsrep_recovery) {
#endif /* WITH_WSREP */
+ my_sleep(3000000);
buf_load();
#ifdef WITH_WSREP
}
$ perl ./mtr sys_vars.innodb_buffer_pool_load_now_basic
...
sys_vars.innodb_buffer_pool_load_now_basic 'innodb' [ fail ]
Test ended at 2017-11-03 20:35:35
CURRENT_TEST: sys_vars.innodb_buffer_pool_load_now_basic
--- /data/src/10.2-bug/mysql-test/suite/sys_vars/r/innodb_buffer_pool_load_now_basic.result 2017-08-28 14:54:48.487645987 +0300
+++ /data/src/10.2-bug/mysql-test/suite/sys_vars/r/innodb_buffer_pool_load_now_basic.reject 2017-11-03 20:35:35.006826206 +0200
@@ -4,6 +4,17 @@
0
SET GLOBAL innodb_buffer_pool_dump_now = ON;
SET GLOBAL innodb_buffer_pool_load_now = ON;
+Timeout in wait_condition.inc for SELECT variable_value != 'Buffer pool(s) load completed at 171103 20:35:04' &&
+SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) load completed at '
+ FROM information_schema.global_status
+WHERE LOWER(variable_name) = 'innodb_buffer_pool_load_status'
+Id User Host db Command Time State Info Progress
+1 system user NULL Daemon NULL InnoDB purge coordinator NULL 0.000
+3 system user NULL Daemon NULL InnoDB purge worker NULL 0.000
+2 system user NULL Daemon NULL InnoDB purge worker NULL 0.000
+4 system user NULL Daemon NULL InnoDB purge worker NULL 0.000
+5 system user NULL Daemon NULL InnoDB shutdown handler NULL 0.000
+9 root localhost test Query 0 init show full processlist 0.000
SELECT variable_value
FROM information_schema.global_status
WHERE LOWER(variable_name) = 'innodb_buffer_pool_load_status';
mysqltest: Result length mismatch
So, the failure happens because of a delayed buffer pool load on server startup.
The problem was introduced by this commit in 10.2:
commit 14b1c8c80d89ab54cadedf94fa7604b8f917aecd
Author: Monty
Date: Wed Oct 5 01:09:52 2016 +0300
After merge and bug fixes
- Fixed compiler warnings
- Removed have_debug.inc from innochecksum_3
- Fixed race condition in innodb_buffer_pool_load
...
particularly, but this change:
--- a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.test
@@ -20,8 +20,10 @@ let $old_status= `SELECT variable_value FROM information_schema.global_status
# let $wait_condition =
# SELECT TRIM(SUBSTR('$old_status', -8)) != DATE_FORMAT(CURTIME(), '%k:%i:%s');
# -- source include/wait_condition.inc
-if (`SELECT variable_value LIKE '%dump completed at%' FROM information_schema.global_status
- WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status'`)
+if (`SELECT count(*) > 0 FROM information_schema.global_status
+ WHERE (LOWER(variable_name) = 'innodb_buffer_pool_dump_status' or
+ LOWER(variable_name) = 'innodb_buffer_pool_load_status')
+ and variable_value LIKE '%completed at%'`)
{
-- sleep 2
}
@@ -42,12 +44,17 @@ let $wait_condition =
-- let $file = `SELECT CONCAT(@@datadir, @@global.innodb_buffer_pool_filename)`
-- file_exists $file
+let $old_load_status=
+ `SELECT variable_value FROM information_schema.global_status
+ WHERE LOWER(variable_name) = 'innodb_buffer_pool_load_status'`;
+
# Load the dump
SET GLOBAL innodb_buffer_pool_load_now = ON;
# Wait for the load to complete
let $wait_condition =
- SELECT SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) load completed at '
+ SELECT variable_value != '$old_load_status' &&
+ SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) load completed at '
FROM information_schema.global_status
WHERE LOWER(variable_name) = 'innodb_buffer_pool_load_status';
--disable_warnings
The change apparently attempted to solve this failure:
@@ -8,4 +8,4 @@
FROM information_schema.global_status
WHERE LOWER(variable_name) = 'innodb_buffer_pool_load_status';
variable_value
-Buffer pool(s) load completed at TIMESTAMP_NOW
+Loaded 1/85 pages
mysqltest: Result length mismatch
but it's not accurate.
Here is what happens in the test now:
1) test starts
2) test stores the value of innodb_buffer_pool_dump_status variable;
3) test checks whether innodb_buffer_pool_dump_status or innodb_buffer_pool_load_status contain 'completed';
4) if they do, the test waits for 2 seconds to make sure the timestamp has changed;
5) test executes buffer pool dump and checks that it's reflected in innodb_buffer_pool_dump_status – that the value has changed comparing to the old stored value;
6) test stores the value of innodb_buffer_pool_load_status (it thinks it wouldn't have changed since the beginning of the test, since we didn't do any loads yet);
7) test executes buffer pool load and checks that it's reflected in innodb_buffer_pool_dump_status – that the value has changed comparing to the old stored value
If the test is running after server restart without innodb_buffer_pool_load_at_startup, then at step (3) neither of the variables would contain "completed", as neither a dump nor a load has been done yet, so the test proceeds immediately, and in both further checks, at steps (5) and (7), the value necessarily changes comparing to the original ones.
If the test runs after some other test which executed either a dump or a load, or if the load has already happened on server startup, then on step 4 it waits for 2 seconds, and then at further checks at steps (5) and (7) the values will also change, because they'll contain different timestamps.
The problem happens if the load is delayed, as imitated by the injection above. In this case, when the test checks values at step (3), they still don't contain any "completed", so it proceeds. And after that, it (wrongly) assumes that the values cannot change any longer, except for when we expect it. However, by step 6, the delayed load on startup finishes, the value gets the current timestamp, and thus when the test executes step (7), the new value gets the same timestamp as the previous one, and the check fails.
The solution could be to split the check on step (3), to check the dump value before doing the dump, and load value before doing the load, not both at once. There can still be a tiny window for a race condition, but the accuracy of the checks is limited anyway, because of
MDEV-9867.