Bug #11684 repair crashes mysql when table has fulltext index
Submitted: 1 Jul 2005 7:55 Modified: 10 Aug 2005 15:04
Reporter: Corin Langosch Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S1 (Critical)
Version:amd64 4.1.11 & 4.1.12 OS:Linux (debian amd64 testing)
Assigned to: Sergey Vojtovich CPU Architecture:Any
Tags: crash, fulltext, myisam_repair_threads

[1 Jul 2005 7:55] Corin Langosch
Description:
sometimes our server crashes. when trying to repair the tables it shows that it crashes again (phpmyadmin reports lost connection to mysql server). the table cannot be repaired

copying the table to an other i686 server, repair works fine. copying the table back to the amd64 server crashes it again. repair again crashes on amd64 too. 

dropping the fulltext index on that table works and it can now be repaired on the amd64 mysql withtout any errors. 

it does not happen with all tables, but it happens with the attached table. it only crashes on amd64, on i686 the repair works fine. the server configs (especially those for the fulltext stuff) are exactly the same except for buffer sizes.

How to repeat:
install amd64 testing and mysql-server-4.1 package (4.11 or 4.12). try to repair the attached table.
[1 Jul 2005 8:03] Corin Langosch
sorry, cant upload file due to filesize limit :-(
[1 Jul 2005 15:27] MySQL Verification Team
How big is your file?
You can upload it to our ftp and let us know the file name:
ftp://ftp.mysql.com/pub/mysql/upload/
[6 Jul 2005 6:59] Corin Langosch
i just uploaded a file called mysql_bug_11684.zip. it's a ZIP because i use windows for working, but the server is debian testing amd64. it should contain 4 files:

.frm
.myi
.myd
and and .tmd (left over by crash i think..)

here is also how mysql crashes (syslog), when i try to repair the table:

--
Jul  6 06:49:09 db mysqld_safe[16136]: started
Jul  6 06:49:10 db mysqld[16139]: 050706  6:49:10  InnoDB: Started; log sequence number 15 2353257954
Jul  6 06:49:10 db mysqld[16139]: /usr/sbin/mysqld: ready for connections.
Jul  6 06:49:10 db mysqld[16139]: Version: '4.1.11-Debian_4'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Source distribution
Jul  6 06:56:43 db mysqld[16139]: mysqld got signal 11;
Jul  6 06:56:43 db mysqld[16139]: This could be because you hit a bug. It is also possible that this binary
Jul  6 06:56:43 db mysqld[16139]: or one of the libraries it was linked against is corrupt, improperly built,
Jul  6 06:56:43 db mysqld[16139]: or misconfigured. This error can also be caused by malfunctioning hardware.
Jul  6 06:56:43 db mysqld[16139]: We will try our best to scrape up some info that will hopefully help diagnose
Jul  6 06:56:43 db mysqld[16139]: the problem, but since we have already crashed, something is definitely wrong
Jul  6 06:56:43 db mysqld[16139]: and this may fail.
Jul  6 06:56:43 db mysqld[16139]:
Jul  6 06:56:43 db mysqld[16139]: key_buffer_size=268435456
Jul  6 06:56:43 db mysqld[16139]: read_buffer_size=2093056
Jul  6 06:56:43 db mysqld[16139]: max_used_connections=34
Jul  6 06:56:43 db mysqld[16139]: max_connections=500
Jul  6 06:56:43 db mysqld[16139]: threads_connected=26
Jul  6 06:56:43 db mysqld[16139]: It is possible that mysqld could use up to
Jul  6 06:56:43 db mysqld[16139]: key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 5380140 K
Jul  6 06:56:43 db mysqld[16139]: bytes of memory
Jul  6 06:56:43 db mysqld[16139]: Hope that's ok; if not, decrease some variables in the equation.
Jul  6 06:56:43 db mysqld[16139]:
Jul  6 06:56:43 db mysqld_safe[16516]: Number of processes running now: 0
Jul  6 06:56:43 db mysqld_safe[16518]: restarted
Jul  6 06:56:44 db mysqld[16521]: 050706  6:56:44  InnoDB: Database was not shut down normally!
Jul  6 06:56:44 db mysqld[16521]: InnoDB: Starting crash recovery.
Jul  6 06:56:44 db mysqld[16521]: InnoDB: Reading tablespace information from the .ibd files...
Jul  6 06:56:44 db mysqld[16521]: InnoDB: Restoring possible half-written data pages from the doublewrite
Jul  6 06:56:44 db mysqld[16521]: InnoDB: buffer...
Jul  6 06:56:44 db mysqld[16521]: 050706  6:56:44  InnoDB: Starting log scan based on checkpoint at
Jul  6 06:56:44 db mysqld[16521]: InnoDB: log sequence number 15 2353438616.
Jul  6 06:56:44 db mysqld[16521]: InnoDB: Doing recovery: scanned up to log sequence number 15 2353441061
Jul  6 06:56:44 db mysqld[16521]: 050706  6:56:44  InnoDB: Starting an apply batch of log records to the database...
Jul  6 06:56:47 db mysqld[16521]: InnoDB: Progress in percents: 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 28 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 63 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 98 99
Jul  6 06:56:47 db mysqld[16521]: InnoDB: Apply batch completed
Jul  6 06:56:47 db mysqld[16521]: 050706  6:56:47  InnoDB: Flushing modified pages from the buffer pool...
Jul  6 06:56:47 db mysqld[16521]: 050706  6:56:47  InnoDB: Started; log sequence number 15 2353441061
Jul  6 06:56:47 db mysqld[16521]: /usr/sbin/mysqld: ready for connections.
Jul  6 06:56:47 db mysqld[16521]: Version: '4.1.11-Debian_4'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Source distribution
--
[25 Jul 2005 14:40] MySQL Verification Team
Can you also upload your my.cnf file?
[25 Jul 2005 15:49] Corin Langosch
i just uploaded my config. when do you expect this bug to be fixed (you already verified it?). thank you! :)
[27 Jul 2005 18:12] Sergey Vojtovich
I was able to repeat this bug. The reason of this bug was established.

Hope it will be fixed this week.
[1 Aug 2005 10: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/internals/27769
[2 Aug 2005 6:33] 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/internals/27793
[3 Aug 2005 6:21] Sergey Vojtovich
Fixed in 4.0.26, 4.1.14, 5.0.11.
[3 Aug 2005 15:35] Jon Stephens
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Documented bugfix in 4.0.26, 4.1.14, and 5.0.11 changelogs. Closed.
[10 Aug 2005 15:04] Jon Stephens
Thank you for your bug report. This issue has been addressed in the
documentation. The updated documentation will appear on our website
shortly, and will be included in the next release of the relevant
product(s).

Additional info:

Revised documentation of fix per developer info. (Thanks, guys!)