Bug #19835 | Binary copy of corrupted tables crash the server when issuing a query | ||
---|---|---|---|
Submitted: | 16 May 2006 1:57 | Modified: | 11 Jul 2006 9:12 |
Reporter: | Tordjman Yohan | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: MyISAM storage engine | Severity: | S1 (Critical) |
Version: | 5.0.22/4.1BK/5.0BK/5.1BK | OS: | Linux (Linux) |
Assigned to: | Ingo Strüwing | CPU Architecture: | Any |
Tags: | corruption, myisam |
[16 May 2006 1:57]
Tordjman Yohan
[16 May 2006 1:59]
Tordjman Yohan
PS: the version is 5.0.22-nightly-20060515 with the patch http://lists.mysql.com/commits/6375 applyed a mysqlcheck on the database reports nothing.
[16 May 2006 2:21]
MySQL Verification Team
Thank you for the bug report. Could you please provide a dump file for to insert data to the tables? I was unable to repeat with the tables empty. Thanks in advance.
[16 May 2006 8:57]
Tordjman Yohan
I am inable to repeat too with new tables. Only with the current tables.... Can i give you them ?
[16 May 2006 15:00]
Tordjman Yohan
I put you the .tgz that contains the tables. I tryied with 5.0.19 : it's makes "Got error 134 when reading table './xxx/site'" i did too a myisamcheck -o ...
[16 May 2006 18:05]
MySQL Verification Team
Thank you for the feedback. I was able to repeat the crash with a binary copy of the tables provided: [New Thread 1099422640 (LWP 19797)] [New Thread 1099623344 (LWP 19798)] 060516 14:44:42 [Note] /home/miguel/dbs/5.0/libexec/mysqld: ready for connections. Version: '5.0.22-debug' socket: '/tmp/mysql.sock' port: 3306 Source distribution [New Thread 1131862960 (LWP 19844)] mysqld: my_seek.c:30: my_seek: Assertion `pos != (~(my_off_t) 0)' failed. Program received signal SIGABRT, Aborted. [Switching to Thread 1131862960 (LWP 19844)] 0xffffe410 in __kernel_vsyscall () (gdb) The table crashed is site and with a: mysql> repair table site -> ; +----------+--------+----------+-------------------------------------------------------+ | Table | Op | Msg_type | Msg_text | +----------+--------+----------+-------------------------------------------------------+ | dbk.site | repair | info | Wrong block with wrong total length starting at 90308 | | dbk.site | repair | warning | Number of rows changed from 1059 to 1058 | | dbk.site | repair | status | OK | +----------+--------+----------+-------------------------------------------------------+ 3 rows in set (0.05 sec) mysql> select distinct(id),url from site,idm_idc where idu!=363 and id!=0 and b=2 and -> credits>0 and idm=id and ( idc=19 or idc=18 or idc=17 ) order by id; +------+-----------------------------------------------------------+ | id | url | +------+-----------------------------------------------------------+ | 471 | http://ddacost.carrefourpro.com/site/index.html | | 526 | http://tilt85.free.fr/index3.php | | 653 | http://money-invest.com/forum | <cut> The sever doesn't crash anymore. Could you please change the Sypnosis that server crash with a crashed table and also explain how that table got corrupted. Thanks in advance.
[16 May 2006 18:13]
Tordjman Yohan
I did a myisamcheck -o on this tables. I think that i did'nt do a flush-tables. Test with the files in "toto.tgz" mysqlcheck from 5.0.22 says nothing but the myisamcheck from 5.0.19 (the one i did) says that the table is corrupted... Maybe they are corrupted, but so, why mysqlcheck says nothing & why mysqld crashes... ?!? :-) Thanks you for your help
[15 Jun 2006 15:08]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/7708
[28 Jun 2006 12:50]
Ingo Strüwing
Second review done by Sergey Vojtovich. I need to change the changeset comments and MY_FILEPOS_ERROR.
[28 Jun 2006 14:07]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/8420
[29 Jun 2006 12:08]
Ingo Strüwing
Pushed to mysql-5.0-engines.
[6 Jul 2006 13:49]
Ingo Strüwing
Pushed to mysql-5.1-engines.
[8 Jul 2006 19:10]
Ingo Strüwing
A corrupt table with dynamic record format can crash the server when trying to select from it. I fixed the crash that resulted from the particular type of corruption that has been reported for this bug. Pushed to 5.1.12 and 5.0.24 and 4.1.21.
[11 Jul 2006 9:12]
MC Brown
Added to the 4.1, 5.0 and 5.1 changelog: Using <literal>SELECT</literal> on a corrupt table using the dynamic record format can cause a server crash. (Bug #19835)
[13 Jul 2006 3:32]
Paul DuBois
5.0.x fix went to 5.0.25 instead.
[9 Oct 2006 2:35]
Jon Stephens
Updated changelog entries per Support request (JamesD).