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

innodb.innodb_bug14676111 fails in buildbot due to InnoDB purge failing to start when there is work to do

Details

    • 10.2.4-1, 10.2.4-2

    Description

      http://buildbot.askmonty.org/buildbot/builders/p8-rhel7-bintar-debug/builds/2018/steps/test/logs/stdio

      innodb.innodb_bug14676111 'innodb_plugin' w1 [ fail ]
              Test ended at 2017-01-05 22:06:59
       
      CURRENT_TEST: innodb.innodb_bug14676111
      --- /home/buildbot/maria-slave/power8-vlp03-bintar-debug/build/mysql-test/suite/innodb/r/innodb_bug14676111.result	2017-01-05 19:54:53.473261302 -0500
      +++ /home/buildbot/maria-slave/power8-vlp03-bintar-debug/build/mysql-test/suite/innodb/r/innodb_bug14676111.reject	2017-01-05 22:06:58.634010067 -0500
      @@ -22,7 +22,7 @@
       test.t1	analyze	status	OK
       select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
       CLUST_INDEX_SIZE
      -8
      +10
       delete from t1 where a=5;
       set global innodb_purge_stop_now=ON;
       set global innodb_purge_run_now=ON;
       
      mysqltest: Result length mismatch
      

      Started happening quite regularly in buildbot on 10.1 tree since January 5, 2017.
      Observed on win32-debug, winx64-debug, p8-rhel7-bintar-debug.

      Attachments

        Issue Links

          Activity

            svoj, please note that I rewrote the test so that it does not rely on purge any more, but on rollback instead.

            I also worked around possible lost signals by making SHOW ENGINE INNODB STATUS trigger purge. To better analyze this problem, these changes should be reverted.

            marko Marko Mäkelä added a comment - svoj , please note that I rewrote the test so that it does not rely on purge any more, but on rollback instead. I also worked around possible lost signals by making SHOW ENGINE INNODB STATUS trigger purge . To better analyze this problem, these changes should be reverted.

            As noted in MDEV-13779, srv_release_threads() can fail to wake up some purge worker threads. MDEV-13779 introduced an extra check to ensure that all purge workers will be woken up at shutdown, but they might occasionally remain sleeping during normal operation.

            The fix of MDEV-12708 in MariaDB 10.2.6 introduced the work-around that SHOW ENGINE INNODB STATUS will wake up purge threads. This seems to work fine in wait_all_purged.inc.

            With MDEV-13603 in MariaDB 10.3.6, innodb_fast_shutdown=0 should always run full purge. Older versions could fail to purge some of the last active transactions.

            marko Marko Mäkelä added a comment - As noted in MDEV-13779 , srv_release_threads() can fail to wake up some purge worker threads. MDEV-13779 introduced an extra check to ensure that all purge workers will be woken up at shutdown, but they might occasionally remain sleeping during normal operation. The fix of MDEV-12708 in MariaDB 10.2.6 introduced the work-around that SHOW ENGINE INNODB STATUS  will wake up purge threads . This seems to work fine in wait_all_purged.inc . With MDEV-13603 in MariaDB 10.3.6, innodb_fast_shutdown=0  should always run full purge. Older versions could fail to purge some of the last active transactions.

            With the current work-around (SHOW ENGINE INNODB STATUS will initiate a purge), this is not a practical problem any more.
            The mysql-test/suite/innodb/include/wait_all_purged.inc appears to be working reliably both in non-debug and debug builds of the server.

            marko Marko Mäkelä added a comment - With the current work-around ( SHOW ENGINE INNODB STATUS will initiate a purge), this is not a practical problem any more. The mysql-test/suite/innodb/include/wait_all_purged.inc appears to be working reliably both in non-debug and debug builds of the server.

            The wait_all_purged.inc was introduced in MDEV-12698 (10.2.7, 10.3.1).
            I do not remember seeing failures related to this lately.
            The actual problem still exists (purge may be idling when there is work to do), but it does not show up in tests, because wait_all_purged.inc will trigger purge by issuing SHOW ENGINE INNODB STATUS. MDEV-16260 should fix the problem and remove the work-around of triggering the purge when executing that statement.

            marko Marko Mäkelä added a comment - The wait_all_purged.inc was introduced in MDEV-12698 (10.2.7, 10.3.1). I do not remember seeing failures related to this lately. The actual problem still exists (purge may be idling when there is work to do), but it does not show up in tests, because wait_all_purged.inc will trigger purge by issuing SHOW ENGINE INNODB STATUS . MDEV-16260 should fix the problem and remove the work-around of triggering the purge when executing that statement.

            I think that the original problem (that purge fails to remove some history of committed transactions) might be fixed by MDEV-30671. There appears to be a correctness problem. When discarding rollback segments, purge only considers currently active transactions, and does not check if all history contained in the rollback segment actually has been purged.

            The CHECK TABLE…EXTENDED implemented in MDEV-24402 will warn about history that should have been purged. The history would be purged when rebuilding the table, for example, by OPTIMIZE TABLE.

            marko Marko Mäkelä added a comment - I think that the original problem (that purge fails to remove some history of committed transactions) might be fixed by MDEV-30671 . There appears to be a correctness problem. When discarding rollback segments, purge only considers currently active transactions, and does not check if all history contained in the rollback segment actually has been purged. The CHECK TABLE…EXTENDED implemented in MDEV-24402 will warn about history that should have been purged. The history would be purged when rebuilding the table, for example, by OPTIMIZE TABLE .

            People

              marko Marko Mäkelä
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              7 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.