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

Bug #625739 reported by Philip Stoev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Released
Undecided
Unassigned

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: <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

Changed in maria:
status: New → Incomplete
Revision history for this message
Philip Stoev (pstoev-askmonty) wrote :
Changed in maria:
status: Incomplete → New
Revision history for this message
Philip Stoev (pstoev-askmonty) wrote :

This bug is still repeatable after the following fix:

revno: 2929
committer: Michael Widenius <email address hidden>
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

Revision history for this message
Philip Stoev (pstoev-askmonty) wrote :

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

Michael Widenius (monty)
Changed in maria:
milestone: none → 5.1
status: New → In Progress
Revision history for this message
Michael Widenius (monty) wrote :

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
Revision history for this message
Philip Stoev (pstoev-askmonty) wrote : 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" <email address hidden>
To: <email address hidden>
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: <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

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

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.