Bug #1716 | InnoDB: Database page corruption on disk or a failed | ||
---|---|---|---|
Submitted: | 30 Oct 2003 13:08 | Modified: | 4 Nov 2003 7:34 |
Reporter: | Vlad S | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S1 (Critical) |
Version: | 4.0.13 | OS: | FreeBSD (FreeBSD 4.7-RELEASE) |
Assigned to: | CPU Architecture: | Any |
[30 Oct 2003 13:08]
Vlad S
[30 Oct 2003 19:45]
Dean Ellis
Due to the table corruption bugs which have been fixed in subsequent versions, you should probably upgrade to 4.0.16 and attempt to resolve (or identify) the issues you were having with it in order to determine whether or not you are experiencing one of the bugs which have in fact been corrected.
[31 Oct 2003 5:57]
Vlad S
I tried to upgrade to 4.0.16. I deleted all old INNODB files and logs and started to recover database from backup, but after some time it failed with the following error: 031026 14:25:00 mysqld started 031026 14:25:00 InnoDB: Started /usr/local/mysql-max-4.0.16-unknown-freebsd4.7-i386/bin/mysqld: ready for connections. Version: '4.0.16-max' socket: '/tmp/mysql2.sock' port: 3307 InnoDB: Database page corruption on disk or a failed InnoDB: file read of page 5. InnoDB: You may have to recover from a backup. 031026 15:33:49 InnoDB: Page dump in ascii and hex (16384 bytes): len 16384; hex 215c .... .... .... InnoDB: End of page dump 031026 15:33:49 InnoDB: Page checksum 3084444227, prior-to-4.0.14-form checksum 4254121785 InnoDB: stored checksum 559691427, prior-to-4.0.14-form stored checksum 4254121785 InnoDB: Page lsn 2 1867019429, low 4 bytes of lsn at page end 1867019429 InnoDB: Database page corruption on disk or a failed InnoDB: file read of page 5. InnoDB: You may have to recover from a backup. InnoDB: It is also possible that your operating InnoDB: system has corrupted its own file cache InnoDB: and rebooting your computer removes the InnoDB: error. InnoDB: If the corrupt page is an index page InnoDB: you can also try to fix the corruption InnoDB: by dumping, dropping, and reimporting InnoDB: the corrupt table. You can use CHECK InnoDB: TABLE to scan your table for corruption. InnoDB: Look also at section 6.1 of InnoDB: http://www.innodb.com/ibman.html about InnoDB: forcing recovery. InnoDB: Ending processing because of a corrupt database page. Number of processes running now: 1 mysqld process hanging, pid 21425 - killed 031026 15:33:50 mysqld restarted 031026 15:33:51 InnoDB: Database was not shut down normally. InnoDB: Starting recovery from log files... InnoDB: Starting log scan based on checkpoint at InnoDB: log sequence number 2 2121101759 InnoDB: Doing recovery: scanned up to log sequence number 2 2126344192 InnoDB: Doing recovery: scanned up to log sequence number 2 2131587072 InnoDB: Doing recovery: scanned up to log sequence number 2 2136829952 InnoDB: Doing recovery: scanned up to log sequence number 2 2142072832 InnoDB: Doing recovery: scanned up to log sequence number 2 2147315712 InnoDB: Doing recovery: scanned up to log sequence number 2 2152558592 InnoDB: Doing recovery: scanned up to log sequence number 2 2157801472 InnoDB: Doing recovery: scanned up to log sequence number 2 2163044352 InnoDB: Doing recovery: scanned up to log sequence number 2 2168287232 InnoDB: Doing recovery: scanned up to log sequence number 2 2173530112 InnoDB: Doing recovery: scanned up to log sequence number 2 2178772992 InnoDB: Doing recovery: scanned up to log sequence number 2 2184015872 InnoDB: Doing recovery: scanned up to log sequence number 2 2189258752 InnoDB: Doing recovery: scanned up to log sequence number 2 2194501632 InnoDB: Doing recovery: scanned up to log sequence number 2 2199744512 InnoDB: Doing recovery: scanned up to log sequence number 2 2204987392 InnoDB: Doing recovery: scanned up to log sequence number 2 2210230272 InnoDB: Doing recovery: scanned up to log sequence number 2 2215473152 InnoDB: Doing recovery: scanned up to log sequence number 2 2220716032 InnoDB: Doing recovery: scanned up to log sequence number 2 2225958912 031026 15:33:57 InnoDB: Starting an apply batch of log records to the database... InnoDB: Progress in percents: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 2 8 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 6 3 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 9 8 99 InnoDB: Apply batch completed InnoDB: Doing recovery: scanned up to log sequence number 2 2231201792 InnoDB: Doing recovery: scanned up to log sequence number 2 2234060819 InnoDB: Database page corruption on disk or a failed InnoDB: file read of page 5. InnoDB: You may have to recover from a backup. 031026 15:34:32 InnoDB: Page dump in ascii and hex (16384 bytes): len 16384; hex .... .... ....InnoDB: End of page dump 031026 15:34:32 InnoDB: Page checksum 3084444227, prior-to-4.0.14-form checksum 4254121785 InnoDB: stored checksum 559691427, prior-to-4.0.14-form stored checksum 4254121785 InnoDB: Page lsn 2 1867019429, low 4 bytes of lsn at page end 1867019429 InnoDB: Database page corruption on disk or a failed InnoDB: file read of page 5. InnoDB: You may have to recover from a backup. InnoDB: It is also possible that your operating InnoDB: system has corrupted its own file cache InnoDB: and rebooting your computer removes the InnoDB: error. InnoDB: If the corrupt page is an index page InnoDB: you can also try to fix the corruption InnoDB: by dumping, dropping, and reimporting InnoDB: the corrupt table. You can use CHECK InnoDB: TABLE to scan your table for corruption. InnoDB: Look also at section 6.1 of InnoDB: http://www.innodb.com/ibman.html about InnoDB: forcing recovery. InnoDB: Ending processing because of a corrupt database page. 031026 15:34:32 mysqld ended There was no connections and no additional operations to the mysqld daemon during recovery. Mysqld worked only with recovery script which was recovering all tables in a consecutive order.
[31 Oct 2003 11:24]
Dean Ellis
What is your recovery script using? The output of mysqldump for your tables, or are you copying older InnODB tablespace files into your data directory?
[31 Oct 2003 12:58]
Vlad S
I deleted old innodb files (tablespace) and created new ones. After I run my recovery script. The recovery script is quite simple - it takes every dumped (by mysqldump) table and insert it to the new database: #!/usr/bin/perl $DIR=$ARGV[0]; while ($nn=<$DIR/*>) { system ("gzip -cd $nn | mysql -S /tmp/mysql2.sock -uroot -p##### storage") } I started it with the next syntax: perl restore_many.pl /data/db_backup/2003-10-25/storage where /data/db_backup/2003-10-25/storage contains 220 mysqldump gzipped tables. I get 4.0.13 back. It's working for a 24 hours with no errors, but unfortunately I expect them in the nearest future:(
[4 Nov 2003 7:34]
Heikki Tuuri
Hi! The printout shows that the page header differs from the page end. This is probably a problem in the OS/drivers/hardware, not a mysqld bug. Please test on another computer. Regards, Heikki