Bug #58858 sys_vars.innodb_max_dirty_pages_pct_func fails sporadically
Submitted: 10 Dec 2010 8:29 Modified: 28 Jan 2011 15:45
Reporter: Alexander Nozdrin Email Updates:
Status: Closed Impact on me:
None 
Category:Tests: Engine Severity:S3 (Non-critical)
Version:5.5.8 OS:Any
Assigned to: Vinay Fisrekar CPU Architecture:Any
Tags: pb2, sporadic, test failure

[10 Dec 2010 8:29] Alexander Nozdrin
Description:
Not sure if that's a test issue, or an InnoDB bug.

Failed in daily-5.5-bugteam.

Symptoms:

sys_vars.innodb_max_dirty_pages_pct_func w8 [ fail ]
        Test ended at 2010-12-10 00:47:21

CURRENT_TEST: sys_vars.innodb_max_dirty_pages_pct_func
--- /export/home/pb2/test/sb_0-2652677-1291937796.13/mysql-5.5.8-solaris10-x86_64-test/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_func.result	Fri Dec 10 01:59:11 2010
+++ /export/home/pb2/test/sb_0-2652677-1291937796.13/mysql-5.5.8-solaris10-x86_64-test/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_func.reject	Fri Dec 10 02:47:21 2010
@@ -85,7 +85,7 @@
 'We expect dirty pages pct to be BELOW_MAX after some time depending on performance'
 CALL check_pct(10);
 PCT_VALUE
-BELOW_MAX
+ABOVE_MAX
 DROP PROCEDURE add_records;
 DROP PROCEDURE add_until;
 DROP PROCEDURE check_pct;

mysqltest: Result content mismatch

sys_vars.innodb_max_dirty_pages_pct_func w8 [ retry-pass ]    873

Retrying test sys_vars.innodb_max_dirty_pages_pct_func, attempt(3/3)...

sys_vars.innodb_max_dirty_pages_pct_func w8 [ retry-pass ]    753

How to repeat:
Log: http://pb2.norway.sun.com/web.py?action=archive_download&archive_id=2652771&pretty=please
[3 Jan 2011 6:45] Vinay Fisrekar
Test has a functionality to check how "Innodb_buffer_pool_pages_dirty" variable varies on DML operations and test fails if it goes beyond certain percentage w.r.t  "Innodb_buffer_pool_pages_total".

In this test we perform DML which causes "Innodb_buffer_pool_pages_dirty" variable to go up and then we wait for some time so that server get time to write pages to disk. with this wait time "Innodb_buffer_pool_pages_dirty" variable value goes to 0.
Test is behaving correctly w.r.t to above. ( We should have been getting additional message (which comes from "include/wait_condition.inc" file) if test fails with above case.)

"dirty_pct" function which calculates percentage value which is called before printing "Above Max" or "Below Max", is responsible for increase in "Innodb_buffer_pool_pages_dirty" value , due to which test fails randomly.

If we add  "SELECT dirty_pct() AS tmp" before and after calling "dirty_pct()" , here what we get n which varies on each run.

+SELECT dirty_pct() AS tmp;
+tmp
+11.91406250000000000
 'We expect dirty pages pct to be BELOW_MAX after some time depending on performance'
 CALL check_pct(10);
 PCT_VALUE
-BELOW_MAX
+ABOVE_MAX
+SELECT dirty_pct() AS tmp;
+tmp
+9.37500000000000000
[17 Jan 2011 9:09] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/128903

3556 Vinay Fisrekar	2011-01-17
      BUG#58858 : sys_vars.innodb_max_dirty_pages_pct_func fails sporadically
      
      Modified check_pct procedure to check return value of wait condition instead 
      of calling "dirty_pct".
[17 Jan 2011 12:09] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/128940

3557 Vinay Fisrekar	2011-01-17
      BUG#58858 : sys_vars.innodb_max_dirty_pages_pct_func fails sporadically
      
      Modified check_pct procedure to check return value of wait condition instead 
      of calling "dirty_pct".
      
      Adding Review comments:
      1) Added comment for success variable value
      2) Procedure check_pct changed For Adding BOOLEAN input and SELECT QUERY Change
[17 Jan 2011 12:17] Horst Hunger
OK to push.
[18 Jan 2011 4:05] Bugs System
Pushed into mysql-5.1 5.1.56 (revid:vinay.fisrekar@sun.com-20110118035452-lictvi6f81lzg7nj) (version source revid:vinay.fisrekar@sun.com-20110118035452-lictvi6f81lzg7nj) (merge vers: 5.1.56) (pib:24)
[18 Jan 2011 4:06] Bugs System
Pushed into mysql-5.5 5.5.10 (revid:vinay.fisrekar@sun.com-20110118040000-y5km9vsooe79zxgt) (version source revid:vinay.fisrekar@sun.com-20110118040000-y5km9vsooe79zxgt) (merge vers: 5.5.10) (pib:24)
[18 Jan 2011 4:07] Bugs System
Pushed into mysql-trunk 5.6.2 (revid:vinay.fisrekar@sun.com-20110118040242-ldhz3912pctd6ums) (version source revid:vinay.fisrekar@sun.com-20110118040242-ldhz3912pctd6ums) (merge vers: 5.6.2) (pib:24)
[18 Jan 2011 19:48] Paul DuBois
Changes to test suite. No changelog entry needed.