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

maria.repair test fails with valgrind

Details

    Description

      Post MDEV-22530 fix, maria.repair test fails.

      To reproduce: ./mtr maria.repair --valgrind

      CURRENT_TEST: maria.repair
      --- /home/sujatha/bug_repo/MDEV-22530-10.3/mysql-test/suite/maria/repair.result	2021-05-18 15:46:14.541610374 +0530
      +++ /home/sujatha/bug_repo/MDEV-22530-10.3/mysql-test/suite/maria/repair.reject	2021-05-19 17:32:11.008555697 +0530
      @@ -30,11 +30,6 @@
       SET max_session_mem_used=50000;
       REPAIR LOCAL TABLE t1 USE_FRM;
       Table	Op	Msg_type	Msg_text
      -t1	repair	error	Failed to open partially repaired table
      -Warnings:
      -Error	1290	The MariaDB server is running with the --max-thread-mem-used=50000 option so it cannot execute this statement
       REPAIR LOCAL TABLE t1;
       Table	Op	Msg_type	Msg_text
      -test.t1	repair	Error	The MariaDB server is running with the --max-thread-mem-used=50000 option so it cannot execute this statement
      -test.t1	repair	error	Corrupt
       DROP TABLE t1;
      
      

      Attachments

        Activity

          Post MDEV-22530 fix, admin commands will react to KILL signal.
          'maria.repair' script makes use of 'max_session_mem_used' to set a limit on
          memory, a single user session is allowed to allocate. During REPAIR command
          execution memory is allocated for query, and it fails as memory requirement
          exceeds the 'max_session_mem_used' limit. On this error thd->killed is set
          to KILL_QUERY. Upon reaching 'mysql_admin_table' code 'thd->is_killed()' is
          checked as a first step prior to the execution, if it is set the command
          execution is skipped. Hence the above warnings will not be printed.

          sujatha.sivakumar Sujatha Sivakumar (Inactive) added a comment - Post MDEV-22530 fix, admin commands will react to KILL signal. 'maria.repair' script makes use of 'max_session_mem_used' to set a limit on memory, a single user session is allowed to allocate. During REPAIR command execution memory is allocated for query, and it fails as memory requirement exceeds the 'max_session_mem_used' limit. On this error thd->killed is set to KILL_QUERY. Upon reaching 'mysql_admin_table' code 'thd->is_killed()' is checked as a first step prior to the execution, if it is set the command execution is skipped. Hence the above warnings will not be printed.

          I've pushed a followup commit that makes OPTIMIZE/REPAIR kill handling consistent. Command execution can be skipped or not, depending on where the kill signal was discovered, but now it will always be reported as an error for the table, but not as an error for the whole statement.

          Note that MDEV-22530 has one more issue — it's all or nothing and doesn't handle the case when kill signal arrives after optimize of t1 was successfully finished, but before optimize of t2 has started.

          serg Sergei Golubchik added a comment - I've pushed a followup commit that makes OPTIMIZE/REPAIR kill handling consistent. Command execution can be skipped or not, depending on where the kill signal was discovered, but now it will always be reported as an error for the table, but not as an error for the whole statement. Note that MDEV-22530 has one more issue — it's all or nothing and doesn't handle the case when kill signal arrives after optimize of t1 was successfully finished, but before optimize of t2 has started.

          Note that c699505 is completely wrong, don't push it

          serg Sergei Golubchik added a comment - Note that c699505 is completely wrong, don't push it

          cherry-pick commit: 1fff2398ef3dda1a7e8404f18e4e165823bd4e0a
          (MDEV-22530 post push fixes from 10.6.)

          Merge conflicts were there from 10.2 to 10.3.
          'maria.repair' test needs additional changes to make it stable on valgrind builds.

          Please find following patch
          10.3 patch: https://github.com/MariaDB/server/commit/299bd87bfe6aff7893fe918245d1d1d713d127ea
          10.4 patch: https://github.com/MariaDB/server/commit/04a0d6ddcb3ca203cd15bae9b1a3268f6794620f
          10.5 patch: https://github.com/MariaDB/server/commit/a9d5b8bb190b346cd21d880975b2a0d26b7a0110

          In 10.6 only 'maria.repair' test changes are required.

          https://github.com/MariaDB/server/commit/ee8c99860c54280613b7c6266d47b8501b3ed52c

          sujatha.sivakumar Sujatha Sivakumar (Inactive) added a comment - cherry-pick commit: 1fff2398ef3dda1a7e8404f18e4e165823bd4e0a ( MDEV-22530 post push fixes from 10.6.) Merge conflicts were there from 10.2 to 10.3. 'maria.repair' test needs additional changes to make it stable on valgrind builds. Please find following patch 10.3 patch: https://github.com/MariaDB/server/commit/299bd87bfe6aff7893fe918245d1d1d713d127ea 10.4 patch: https://github.com/MariaDB/server/commit/04a0d6ddcb3ca203cd15bae9b1a3268f6794620f 10.5 patch: https://github.com/MariaDB/server/commit/a9d5b8bb190b346cd21d880975b2a0d26b7a0110 In 10.6 only 'maria.repair' test changes are required. https://github.com/MariaDB/server/commit/ee8c99860c54280613b7c6266d47b8501b3ed52c

          People

            sujatha.sivakumar Sujatha Sivakumar (Inactive)
            sujatha.sivakumar Sujatha Sivakumar (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.