[MDEV-2192] LP:625739 - Table is marked as crashed and should be repaired after Aria recovery Created: 2010-08-28  Updated: 2015-02-02  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Philip Stoev (Inactive) Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug625739.xml     Zip Archive LPexportBug625739_var-bug625739.zip    

 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



 Comments   
Comment by Philip Stoev (Inactive) [ 2010-09-01 ]

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

Comment by Philip Stoev (Inactive) [ 2010-09-01 ]

tablespace before recovery, etc.
LPexportBug625739_var-bug625739.zip

Comment by Philip Stoev (Inactive) [ 2010-09-11 ]

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

Comment by Philip Stoev (Inactive) [ 2010-09-11 ]

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

Comment by Michael Widenius [ 2010-09-13 ]

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.

Comment by Philip Stoev (Inactive) [ 2010-09-13 ]

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

Comment by Rasmus Johansson (Inactive) [ 2010-09-13 ]

Launchpad bug id: 625739

Generated at Thu Feb 08 06:40:12 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.