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

LP:625739 - Table is marked as crashed and should be repaired after Aria recovery

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      When recovering from a DML scenario, the server reported the following:

      1. 2010-08-28T12:13:14 100828 12:13:14 [ERROR] mysqld: Table './smf2/smf_log_online' is marked as crashed and should be repaired
      2. 2010-08-28T12:13:14 100828 12:13:14 [Warning] Checking table: './smf2/smf_log_online'

      Such automatic repair is only permissible when recovering from an ALTER TABLE, which is not the case in this scenario.

      RQG command line:

      perl runall-new.pl -basedir=/home/philips/bzr/maria-5.2/ --grammar=conf/smf/smf2.yy --mysqld=init_file=/home/philips/bzr/randgen-smf/conf/smf/smf2.sql --queries=10M --duration=360 --engine=Maria --mysqld=skip-innodb --mysqld=default-storage-engine=Maria --duration=600 --mysqld=log-output=file --duration=3600 --reporter=Recovery --mysqld=maria-checkpoint-interval=0 --reporter=Deadlock --mysqld=-log-bin

      bzr version-info:

      revision-id: <email address hidden>
      date: 2010-08-25 01:47:52 +0300
      build-date: 2010-08-28 12:18:24 +0300
      revno: 2848
      branch-nick: maria-5.2

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            philipstoev Philip Stoev added a comment -

            tablespace before recovery, etc.
            LPexportBug625739_var-bug625739.zip

            Show
            philipstoev Philip Stoev added a comment - tablespace before recovery, etc. LPexportBug625739_var-bug625739.zip
            Hide
            philipstoev Philip Stoev added a comment -

            Re: Table is marked as crashed and should be repaired after Aria recovery

            Show
            philipstoev Philip Stoev added a comment - Re: Table is marked as crashed and should be repaired after Aria recovery
            Hide
            philipstoev Philip Stoev added a comment -

            Re: Table is marked as crashed and should be repaired after Aria recovery
            This bug is still repeatable after the following fix:

            revno: 2929
            committer: Michael Widenius <monty@askmonty.org>
            branch nick: maria-5.1
            timestamp: Fri 2010-09-10 23:27:26 +0300
            message:
            Fix for LP#634943 "marked as crashed", "zerofilling" and "wrong data in bitmap" when recovering Aria tables
            This was an interaction of several bugs:

            • Tables marked as opened was not properly unmarked on recovery if there was not changes since checkpoint
            • zerofill of tables put wrong data in bitmap if directory for page was full
            • Tables was thought as 'moved' during recovery if they had a create_lsn bigger than the lsn in the control file.

            The .sql and the .yy file are available at hasky.askmonty.org:/home/philips/bug625739

            Show
            philipstoev Philip Stoev added a comment - Re: Table is marked as crashed and should be repaired after Aria recovery This bug is still repeatable after the following fix: revno: 2929 committer: Michael Widenius <monty@askmonty.org> branch nick: maria-5.1 timestamp: Fri 2010-09-10 23:27:26 +0300 message: Fix for LP#634943 "marked as crashed", "zerofilling" and "wrong data in bitmap" when recovering Aria tables This was an interaction of several bugs: Tables marked as opened was not properly unmarked on recovery if there was not changes since checkpoint zerofill of tables put wrong data in bitmap if directory for page was full Tables was thought as 'moved' during recovery if they had a create_lsn bigger than the lsn in the control file. The .sql and the .yy file are available at hasky.askmonty.org:/home/philips/bug625739
            Hide
            philipstoev Philip Stoev added a comment -

            Re: Table is marked as crashed and should be repaired after Aria recovery
            A better RQG command line:

            perl runall.pl \
            --queries=1M \
            --engine=Maria \
            -mysqld=-safe-mode \
            -mysqld=-sync-sys=0 \
            -mysqld=-log-output=file \
            -mysqld=-maria_log_purge_type=at_flush \
            --reporters=ErrorLog,Backtrace,Recovery,Shutdown \
            --duration=120 \
            --threads=10 \
            --rows=1000 \
            --mask-level=2 \
            -mysqld=-loose-maria-group-commit=hard \
            -mysqld=-loose-maria_group_commit_interval=10 \
            -mysqld=-maria-checkpoint-interval=120 \
            -mysqld=-maria-block-size=16K \
            --mask=59606 \
            --queries=100000000 \
            --mask=59606 \
            --seed=time \
            --basedir=. \
            -mysqld=-init-file=/home/buildbot/randgen/conf/smf/smf2.sql \
            --grammar=conf/smf/smf2.yy

            Show
            philipstoev Philip Stoev added a comment - Re: Table is marked as crashed and should be repaired after Aria recovery A better RQG command line: perl runall.pl \ --queries=1M \ --engine=Maria \ - mysqld= -safe-mode \ - mysqld= -sync-sys=0 \ - mysqld= -log-output=file \ - mysqld= -maria_log_purge_type=at_flush \ --reporters=ErrorLog,Backtrace,Recovery,Shutdown \ --duration=120 \ --threads=10 \ --rows=1000 \ --mask-level=2 \ - mysqld= -loose-maria-group-commit=hard \ - mysqld= -loose-maria_group_commit_interval=10 \ - mysqld= -maria-checkpoint-interval=120 \ - mysqld= -maria-block-size=16K \ --mask=59606 \ --queries=100000000 \ --mask=59606 \ --seed=time \ --basedir=. \ - mysqld= -init-file=/home/buildbot/randgen/conf/smf/smf2.sql \ --grammar=conf/smf/smf2.yy
            Hide
            monty Michael Widenius added a comment -

            Re: Table is marked as crashed and should be repaired after Aria recovery
            The reason for the auto-recovery is that you created the test tables as Myisam tables.
            Fix: Add -mysqld=-default-storage-engine=maria as an option to RQG.

            I tried running the test this way and verified that the problem didn't exits with Aria.
            I did however notice two other problems while doing this.

            • RQG didn't create the smf2 database before running maria_read_log, which causes maria_read_log to abort because it couldn't create the table files.
            • Fixed by adding creation of missing databases to maria_read_log
            • When reopening tables (can happen if table is reopened during checkpoint) file sizes was wrongly set from disk instead of from memory, which caused recovery to fail.

            This is now fixed in 5.1 tree.

            Show
            monty Michael Widenius added a comment - Re: Table is marked as crashed and should be repaired after Aria recovery The reason for the auto-recovery is that you created the test tables as Myisam tables. Fix: Add - mysqld= -default-storage-engine=maria as an option to RQG. I tried running the test this way and verified that the problem didn't exits with Aria. I did however notice two other problems while doing this. RQG didn't create the smf2 database before running maria_read_log, which causes maria_read_log to abort because it couldn't create the table files. Fixed by adding creation of missing databases to maria_read_log When reopening tables (can happen if table is reopened during checkpoint) file sizes was wrongly set from disk instead of from memory, which caused recovery to fail. This is now fixed in 5.1 tree.
            Hide
            philipstoev Philip Stoev added a comment -

            Re: [Bug 625739] Re: Table is marked as crashed and should be repairedafter Aria recovery
            Yes, you are right, sorry about that. I have fixed the framework to always
            add -mysqld=-default-storage-engine=Maria, which was the case before, but
            was turned off for some reason.

            ----- Original Message -----
            From: "Michael Widenius" <monty@askmonty.org>
            To: <pstoev@askmonty.org>
            Sent: Monday, September 13, 2010 10:40 AM
            Subject: [Bug 625739] Re: Table is marked as crashed and should be
            repairedafter Aria recovery

            The reason for the auto-recovery is that you created the test tables as
            Myisam tables.
            Fix: Add -mysqld=-default-storage-engine=maria as an option to RQG.

            I tried running the test this way and verified that the problem didn't exits
            with Aria.
            I did however notice two other problems while doing this.

            • RQG didn't create the smf2 database before running maria_read_log, which
              causes maria_read_log to abort because it couldn't create the table files.
            • Fixed by adding creation of missing databases to maria_read_log
            • When reopening tables (can happen if table is reopened during checkpoint)
              file sizes was wrongly set from disk instead of from memory, which caused
              recovery to fail.

            This is now fixed in 5.1 tree.

              • Changed in: maria
                Status: In Progress => Fix Released


            Table is marked as crashed and should be repaired after Aria recovery
            https://bugs.launchpad.net/bugs/625739
            You received this bug notification because you are a direct subscriber
            of the bug.

            Status in Maria: Fix Released

            Bug description:
            When recovering from a DML scenario, the server reported the following:

            1. 2010-08-28T12:13:14 100828 12:13:14 [ERROR] mysqld: Table
              './smf2/smf_log_online' is marked as crashed and should be repaired
            2. 2010-08-28T12:13:14 100828 12:13:14 [Warning] Checking table:
              './smf2/smf_log_online'

            Such automatic repair is only permissible when recovering from an ALTER
            TABLE, which is not the case in this scenario.

            RQG command line:

            perl
            runall-new.pl --basedir=/home/philips/bzr/maria-5.2/ --grammar=conf/smf/smf2.yy
            -mysqld=-init_file=/home/philips/bzr/randgen-smf/conf/smf/smf2.sql --queries=10M
            -duration=360 --engine=Maria --mysqld=skip-innodb --mysqld=-default-storage-engine=Maria
            -duration=600 --mysqld=-log-output=file --duration=3600 --reporter=Recovery
            -mysqld=maria-checkpoint-interval=0 --reporter=Deadlock --mysqld=-log-bin

            bzr version-info:

            revision-id: monty@askmonty.org-20100824224752-2ghohhq1u7rrwsje
            date: 2010-08-25 01:47:52 +0300
            build-date: 2010-08-28 12:18:24 +0300
            revno: 2848
            branch-nick: maria-5.2

            To unsubscribe from this bug, go to:
            https://bugs.launchpad.net/maria/+bug/625739/+subscribe

            Show
            philipstoev Philip Stoev added a comment - Re: [Bug 625739] Re: Table is marked as crashed and should be repairedafter Aria recovery Yes, you are right, sorry about that. I have fixed the framework to always add - mysqld= -default-storage-engine=Maria, which was the case before, but was turned off for some reason. ----- Original Message ----- From: "Michael Widenius" <monty@askmonty.org> To: <pstoev@askmonty.org> Sent: Monday, September 13, 2010 10:40 AM Subject: [Bug 625739] Re: Table is marked as crashed and should be repairedafter Aria recovery The reason for the auto-recovery is that you created the test tables as Myisam tables. Fix: Add - mysqld= -default-storage-engine=maria as an option to RQG. I tried running the test this way and verified that the problem didn't exits with Aria. I did however notice two other problems while doing this. RQG didn't create the smf2 database before running maria_read_log, which causes maria_read_log to abort because it couldn't create the table files. Fixed by adding creation of missing databases to maria_read_log When reopening tables (can happen if table is reopened during checkpoint) file sizes was wrongly set from disk instead of from memory, which caused recovery to fail. This is now fixed in 5.1 tree. Changed in: maria Status: In Progress => Fix Released – Table is marked as crashed and should be repaired after Aria recovery https://bugs.launchpad.net/bugs/625739 You received this bug notification because you are a direct subscriber of the bug. Status in Maria: Fix Released Bug description: When recovering from a DML scenario, the server reported the following: 2010-08-28T12:13:14 100828 12:13:14 [ERROR] mysqld: Table './smf2/smf_log_online' is marked as crashed and should be repaired 2010-08-28T12:13:14 100828 12:13:14 [Warning] Checking table: './smf2/smf_log_online' Such automatic repair is only permissible when recovering from an ALTER TABLE, which is not the case in this scenario. RQG command line: perl runall-new.pl --basedir=/home/philips/bzr/maria-5.2/ --grammar=conf/smf/smf2.yy - mysqld= -init_file=/home/philips/bzr/randgen-smf/conf/smf/smf2.sql --queries=10M - duration=360 --engine=Maria --mysqld= skip-innodb --mysqld= -default-storage-engine=Maria - duration=600 --mysqld= -log-output=file --duration=3600 --reporter=Recovery - mysqld= maria-checkpoint-interval=0 --reporter=Deadlock --mysqld= -log-bin bzr version-info: revision-id: monty@askmonty.org-20100824224752-2ghohhq1u7rrwsje date: 2010-08-25 01:47:52 +0300 build-date: 2010-08-28 12:18:24 +0300 revno: 2848 branch-nick: maria-5.2 To unsubscribe from this bug, go to: https://bugs.launchpad.net/maria/+bug/625739/+subscribe
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 625739

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 625739

              People

              • Assignee:
                Unassigned
                Reporter:
                philipstoev Philip Stoev
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: