Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-17748

innodb.alter_inplace_perfschema fails in buildbot with wrong result

Details

    Description

      http://buildbot.askmonty.org/buildbot/builders/kvm-rpm-centos74-amd64-debug/builds/1109

      10.3 45769429d9a3bfa37ead21aa0d36214f

      innodb.alter_inplace_perfschema 'innodb' w3 [ fail ]
              Test ended at 2018-11-14 12:56:58
       
      CURRENT_TEST: innodb.alter_inplace_perfschema
      --- /usr/share/mysql-test/suite/innodb/r/alter_inplace_perfschema.result	2018-11-14 10:19:55.000000000 +0000
      +++ /dev/shm/var/3/log/alter_inplace_perfschema.reject	2018-11-14 12:56:58.235306852 +0000
      @@ -11,7 +11,6 @@
       SELECT DISTINCT object_name FROM performance_schema.events_waits_history_long
       WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%';
       object_name
      -tmp/Innodb Merge Temp File
       SET DEBUG_SYNC = 'now SIGNAL gone';
       connection ddl;
       disconnect ddl;
       
      mysqltest: Result length mismatch
      

      Attachments

        Issue Links

          Activity

            I think that this could occasionally fail in 10.2 as well.
            Starting with MariaDB 10.2 (and MySQL 5.7), temporary file creation for the merge sort in ALGORITHM=INPLACE is deferred until the main memory buffer runs out.
            I determined a tight limit for this in 10.2, but apparently that is too tight.

            marko Marko Mäkelä added a comment - I think that this could occasionally fail in 10.2 as well. Starting with MariaDB 10.2 (and MySQL 5.7), temporary file creation for the merge sort in ALGORITHM=INPLACE is deferred until the main memory buffer runs out. I determined a tight limit for this in 10.2, but apparently that is too tight.

            diff --git a/mysql-test/suite/innodb/t/alter_inplace_perfschema.test b/mysql-test/sui
            te/innodb/t/alter_inplace_perfschema.test
            index b832596..d5851e8 100644
            --- a/mysql-test/suite/innodb/t/alter_inplace_perfschema.test
            +++ b/mysql-test/suite/innodb/t/alter_inplace_perfschema.test
            @@ -10,7 +10,7 @@ update performance_schema.setup_consumers set enabled='yes';
             CREATE TABLE t1 (a serial, b varchar(255)) ENGINE=InnoDB;
             
             BEGIN;
            -let $n=247;
            +let $n=260;
             --disable_query_log
             while ($n) {
             dec $n;
            

            The limit could be too tight. we can increase the limit

            thiru Thirunarayanan Balathandayuthapani added a comment - diff --git a/mysql-test/suite/innodb/t/alter_inplace_perfschema.test b/mysql-test/sui te/innodb/t/alter_inplace_perfschema.test index b832596..d5851e8 100644 --- a/mysql-test/suite/innodb/t/alter_inplace_perfschema.test +++ b/mysql-test/suite/innodb/t/alter_inplace_perfschema.test @@ -10,7 +10,7 @@ update performance_schema.setup_consumers set enabled='yes'; CREATE TABLE t1 (a serial, b varchar(255)) ENGINE=InnoDB; BEGIN; -let $n=247; +let $n=260; --disable_query_log while ($n) { dec $n; The limit could be too tight. we can increase the limit

            Yes, increasing the limit should fix this. But can you please find out what exactly causes the occasional failures? Could it be because the size of the main-memory buffer is not always the same, and we could need more data to fill that buffer, to force the temporary file to be created?

            marko Marko Mäkelä added a comment - Yes, increasing the limit should fix this. But can you please find out what exactly causes the occasional failures? Could it be because the size of the main-memory buffer is not always the same, and we could need more data to fill that buffer, to force the temporary file to be created?

            Afaik, temporary file creation happens for the problematic test case scenario. May be some how, temporary file creation is not reflecting in performance schema query result.

            thiru Thirunarayanan Balathandayuthapani added a comment - Afaik, temporary file creation happens for the problematic test case scenario. May be some how, temporary file creation is not reflecting in performance schema query result.

            diff --git a/mysql-test/suite/innodb/disabled.def b/mysql-test/suite/innodb/disabled.def
            index aea780e..35c941f 100644
            --- a/mysql-test/suite/innodb/disabled.def
            +++ b/mysql-test/suite/innodb/disabled.def
            @@ -11,4 +11,3 @@
             ##############################################################################
             
             create-index-debug : MDEV-13680 InnoDB may crash when btr_page_alloc() fails
            -alter_inplace_perfschema : MDEV-17748 nnodb.alter_inplace_perfschema fails in buildbot with wrong result
            diff --git a/mysql-test/suite/innodb/r/alter_inplace_perfschema.result b/mysql-test/suite/innodb/r/alter_inplace_perfschema.result
            index 68e25664..83daa3d 100644
            --- a/mysql-test/suite/innodb/r/alter_inplace_perfschema.result
            +++ b/mysql-test/suite/innodb/r/alter_inplace_perfschema.result
            @@ -8,6 +8,7 @@ SET DEBUG_SYNC = 'row_log_apply_before SIGNAL go WAIT_FOR gone';
             ALTER TABLE t1 ADD INDEX(b), ALGORITHM=INPLACE;
             connection default;
             SET DEBUG_SYNC = 'now WAIT_FOR go';
            +11
             SELECT DISTINCT object_name FROM performance_schema.events_waits_history_long
             WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%';
             object_name
            diff --git a/mysql-test/suite/innodb/t/alter_inplace_perfschema.test b/mysql-test/suite/innodb/t/alter_inplace_perfschema.test
            index b832596..e663735 100644
            --- a/mysql-test/suite/innodb/t/alter_inplace_perfschema.test
            +++ b/mysql-test/suite/innodb/t/alter_inplace_perfschema.test
            @@ -18,12 +18,19 @@ INSERT INTO t1 SELECT NULL, REPEAT('b',255);
             }
             --enable_query_log
             COMMIT;
            +let $init_count = `select count_star from performance_schema.events_waits_summary_global_by_event_name WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%'`;
             
             SET DEBUG_SYNC = 'row_log_apply_before SIGNAL go WAIT_FOR gone';
             send ALTER TABLE t1 ADD INDEX(b), ALGORITHM=INPLACE;
             
             connection default;
             SET DEBUG_SYNC = 'now WAIT_FOR go';
            +
            +let $final_count = `select count_star from performance_schema.events_waits_summary_global_by_event_name WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%'`;
            +
            +let $diff = `SELECT $final_count - $init_count`;
            +echo $diff;
            +
             --replace_regex /.*[\\\/]tmp/tmp/
             SELECT DISTINCT object_name FROM performance_schema.events_waits_history_long
             WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%';
            

            The above patch can solve the issue.

            thiru Thirunarayanan Balathandayuthapani added a comment - diff --git a/mysql-test/suite/innodb/disabled.def b/mysql-test/suite/innodb/disabled.def index aea780e..35c941f 100644 --- a/mysql-test/suite/innodb/disabled.def +++ b/mysql-test/suite/innodb/disabled.def @@ -11,4 +11,3 @@ ##############################################################################   create-index-debug : MDEV-13680 InnoDB may crash when btr_page_alloc() fails -alter_inplace_perfschema : MDEV-17748 nnodb.alter_inplace_perfschema fails in buildbot with wrong result diff --git a/mysql-test/suite/innodb/r/alter_inplace_perfschema.result b/mysql-test/suite/innodb/r/alter_inplace_perfschema.result index 68e25664..83daa3d 100644 --- a/mysql-test/suite/innodb/r/alter_inplace_perfschema.result +++ b/mysql-test/suite/innodb/r/alter_inplace_perfschema.result @@ -8,6 +8,7 @@ SET DEBUG_SYNC = 'row_log_apply_before SIGNAL go WAIT_FOR gone'; ALTER TABLE t1 ADD INDEX(b), ALGORITHM=INPLACE; connection default; SET DEBUG_SYNC = 'now WAIT_FOR go'; +11 SELECT DISTINCT object_name FROM performance_schema.events_waits_history_long WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%'; object_name diff --git a/mysql-test/suite/innodb/t/alter_inplace_perfschema.test b/mysql-test/suite/innodb/t/alter_inplace_perfschema.test index b832596..e663735 100644 --- a/mysql-test/suite/innodb/t/alter_inplace_perfschema.test +++ b/mysql-test/suite/innodb/t/alter_inplace_perfschema.test @@ -18,12 +18,19 @@ INSERT INTO t1 SELECT NULL, REPEAT('b',255); } --enable_query_log COMMIT; +let $init_count = `select count_star from performance_schema.events_waits_summary_global_by_event_name WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%'`;   SET DEBUG_SYNC = 'row_log_apply_before SIGNAL go WAIT_FOR gone'; send ALTER TABLE t1 ADD INDEX(b), ALGORITHM=INPLACE;   connection default; SET DEBUG_SYNC = 'now WAIT_FOR go'; + +let $final_count = `select count_star from performance_schema.events_waits_summary_global_by_event_name WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%'`; + +let $diff = `SELECT $final_count - $init_count`; +echo $diff; + --replace_regex /.*[\\\/]tmp/tmp/ SELECT DISTINCT object_name FROM performance_schema.events_waits_history_long WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%'; The above patch can solve the issue.

            People

              thiru Thirunarayanan Balathandayuthapani
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.