| Bug #1295 | mysqld crash on MyiSAM compressed table | ||
|---|---|---|---|
| Submitted: | 16 Sep 2003 4:34 | Modified: | 8 Dec 2003 4:01 | 
| Reporter: | Martin Mokrejs | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: MyISAM storage engine | Severity: | S1 (Critical) | 
| Version: | 4.0.15 | OS: | Linux (Linux 2.4.19) | 
| Assigned to: | Michael Widenius | CPU Architecture: | Any | 
   [16 Sep 2003 4:34]
   Martin Mokrejs        
  
 
   [16 Sep 2003 4:53]
   Martin Mokrejs        
  Ahh, sorry, please ignore the notes about crash not happening from remote machine(I forgot the -h option).
   [16 Sep 2003 4:55]
   Martin Mokrejs        
  bioadmin@bontebok$ /usr/local/mysql-standard-4.0.13-dec-osf5.1-alphaev67/bin/mysql -hjerboas Bhalodurans Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Didn't find any fields in table 'blast' Didn't find any fields in table 'blast_data' Didn't find any fields in table 'blastindex' Didn't find any fields in table 'blimps' Didn't find any fields in table 'blimps_data' Didn't find any fields in table 'cogs' Didn't find any fields in table 'cogs_data' Didn't find any fields in table 'contig_data' Didn't find any fields in table 'ecnum' Didn't find any fields in table 'funcat' Didn't find any fields in table 'funcat_data' Didn't find any fields in table 'intragenome' Didn't find any fields in table 'intragenome_data' Didn't find any fields in table 'known3d1' Didn't find any fields in table 'known3d_data' Didn't find any fields in table 'pfam' Didn't find any fields in table 'pfam_data' Didn't find any fields in table 'pirkw' Didn't find any fields in table 'pros_data' Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 to server version: 4.0.15-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> check table rep; This cause little bit different stack trace from REMOTE machine: 0x80cb18f handle_segfault + 423 0x4002a75a _end + 937595154 0x401912f2 _end + 939064490 0x401902ca _end + 939060354 0x81843f2 my_no_flags_free + 22 0x816d496 mi_close + 326 0x81263c2 close__9ha_myisam + 34 0x80ee59d closefrm__FP8st_table + 45 0x80ebfd8 free_cache_entry__FP8st_table + 36 0x8189625 hash_delete + 813 0x80ec1d0 close_thread_table__FP3THDPP8st_table + 72 0x80ec110 close_thread_tables__FP3THDb + 124 0x812cc79 mysql_admin_table__FP3THDP13st_table_listP15st_ha_check_optPCc13thr_lock_typebUiPFP3THDP13st_table_listP15st_ha_check_opt_iPM7h + 2073 0x812f9ab mysql_check_table__FP3THDP13st_table_listP15st_ha_check_opt + 63 0x80d7bb9 mysql_execute_command__Fv + 5373 0x80da3e5 mysql_parse__FP3THDPcUi + 565 0x80d5c39 dispatch_command__F19enum_server_commandP3THDPcUi + 1453 0x80db90d do_command__FP3THD + 153 0x80d4ebe handle_one_connection + 634 0x40024d53 _end + 937572107 0x401ea477 _end + 939429423
   [16 Sep 2003 5:12]
   Martin Mokrejs        
  This bug can be fixed with patch from Sinisa. Also myisamchk has to be fixed(no patch available). 
From: Sinisa Milivojevic <sinisa@mysql.com>
To: mmokrejs@natur.cuni.cz
Date: Thu, 28 Aug 2003 21:49:29 +0300
Subject: Re: MyISAM crash on packed table (was setrlimit crash)
This is a bug fix that fixes the error.
===== sql/sql_table.cc 1.166 vs edited =====
*** /tmp/sql_table.cc-1.166-3189        Sat Aug 23 12:26:06 2003
--- edited/sql/sql_table.cc     Thu Aug 28 21:46:50 2003
***************
*** 1418,1424 ****
    DBUG_ENTER("mysql_check_table");
    DBUG_RETURN(mysql_admin_table(thd, tables, check_opt,
                                "check", lock_type,
!                               0, HA_OPEN_FOR_REPAIR, 0,
                                &handler::check));
  }
  
--- 1418,1424 ----
    DBUG_ENTER("mysql_check_table");
    DBUG_RETURN(mysql_admin_table(thd, tables, check_opt,
                                "check", lock_type,
!                               1, HA_OPEN_FOR_REPAIR, 0,
                                &handler::check));
  }
With 4.0.15 patched one receives:
mysql> check table rep;
+-----------------+-------+----------+--------------------------------------+
| Table           | Op    | Msg_type | Msg_text                             |
+-----------------+-------+----------+--------------------------------------+
| Bhalodurans.rep | check | error    | Table 'Bhalodurans.rep' is read only |
+-----------------+-------+----------+--------------------------------------+
Actually is not very descriptive. Is the table crashed or not?
 
   [16 Sep 2003 5:15]
   Martin Mokrejs        
  Crashed tables are not reported as crashed with thsi patch, probably that's why Sinisa did not apply the patch. But, as I know, he left for 4 weeks ... :( mysql -hjerboas Bhalodurans Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Didn't find any fields in table 'blast' Didn't find any fields in table 'blast_data' Didn't find any fields in table 'blastindex' Didn't find any fields in table 'blimps' Didn't find any fields in table 'blimps_data' Didn't find any fields in table 'cogs' Didn't find any fields in table 'cogs_data' Didn't find any fields in table 'contig_data' Didn't find any fields in table 'ecnum' Didn't find any fields in table 'funcat' Didn't find any fields in table 'funcat_data' Didn't find any fields in table 'intragenome' Didn't find any fields in table 'intragenome_data' Didn't find any fields in table 'known3d_data' Didn't find any fields in table 'pfam' Didn't find any fields in table 'pfam_data' Didn't find any fields in table 'pirkw' Didn't find any fields in table 'pros_data' Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 96 to server version: 4.0.15-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> check table known3d_data; +--------------------------+-------+----------+-----------------------------------------------+ | Table | Op | Msg_type | Msg_text | +--------------------------+-------+----------+-----------------------------------------------+ | Bhalodurans.known3d_data | check | error | Table 'Bhalodurans.known3d_data' is read only | +--------------------------+-------+----------+-----------------------------------------------+ 1 row in set (0.00 sec) mysql> repair table known3d_data; +--------------------------+--------+----------+-----------------------------------+ | Table | Op | Msg_type | Msg_text | +--------------------------+--------+----------+-----------------------------------+ | Bhalodurans.known3d_data | repair | error | Table 'known3d_data' is read only | +--------------------------+--------+----------+-----------------------------------+ 1 row in set (0.00 sec) mysql>
   [18 Sep 2003 5:10]
   Indrek Siitan        
  We are aware of this issue and working on it.
   [24 Sep 2003 4:23]
   Michael Widenius        
  I have now fixed one bug with compressed tables: In 4.0.14 we introduced a bug in overflow checking that causes MySQL to believe that some compressed tables with blobs where corrupted. (See #1304 for details) The fix will be in 4.0.16. Can you please test if the fix also fixes this issue. Regards, Monty
   [7 Oct 2003 9:50]
   Martin Mokrejs        
  Fixed in bk-1.1603.
   [10 Oct 2003 18:09]
   MySQL Verification Team        
  Closing according with your own last comment: Fixed in bk-1.1603.
