Bug #51231 MySQL deamon crashes while executing mysqldump
Submitted: 17 Feb 2010 7:49 Modified: 23 Aug 2010 17:57
Reporter: Thomad Reitz Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.1.43-community OS:Microsoft Windows (XP SP2)
Assigned to: CPU Architecture:Any

[17 Feb 2010 7:49] Thomad Reitz
Description:
Using MySQL as data store for reports of Sonar (sonar.codehaus.org). Used datafile ibdata1 is about 3GB.

When executing:
mysqldump -u sonar -p sonar >sonarBackup.sql
Enter password: *****
mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ * FROM `users`': Lost connection to MySQL server during query (2013)

Error occurs as the demon is crashed with a memory write error.

Here is the output of the err log:
100217  8:21:48 [Note] C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld: ready for connections.
Version: '5.1.43-community'  socket: ''  port: 3306  MySQL Community Server (GPL)
100217  8:25:31 - mysqld got exception 0xc0000005 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=26214400
read_buffer_size=65536
max_used_connections=4
max_threads=100
threads_connected=1
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 58230 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x6c81020
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
004074BF    mysqld.exe!memset()[memset.asm:127]
005BD8FF    mysqld.exe!row_sel_field_store_in_mysql_format()[row0sel.c:2528]
005BDB1E    mysqld.exe!row_sel_store_mysql_rec()[row0sel.c:2675]
005BF337    mysqld.exe!row_search_for_mysql()[row0sel.c:4235]
005EB4AB    mysqld.exe!os_fast_mutex_lock()[os0sync.c:695]
005B1167    mysqld.exe!srv_conc_enter_innodb()[srv0srv.c:1028]
005ABE04    mysqld.exe!ha_innobase::index_first()[ha_innodb.cc:4923]
005ABEE4    mysqld.exe!ha_innobase::rnd_next()[ha_innodb.cc:5017]
004E4DD6    mysqld.exe!rr_sequential()[records.cc:385]
005140AF    mysqld.exe!join_init_read_record()[sql_select.cc:11952]
00518BD5    mysqld.exe!sub_select()[sql_select.cc:11233]
00528DF3    mysqld.exe!do_select()[sql_select.cc:10989]
00529EDB    mysqld.exe!JOIN::exec()[sql_select.cc:2256]
0052A112    mysqld.exe!mysql_select()[sql_select.cc:2447]
0052A44B    mysqld.exe!handle_select()[sql_select.cc:269]
00455E0C    mysqld.exe!execute_sqlcom_select()[sql_parse.cc:5042]
00457B30    mysqld.exe!mysql_execute_command()[sql_parse.cc:2248]
0045C048    mysqld.exe!mysql_parse()[sql_parse.cc:5965]
0045CA63    mysqld.exe!dispatch_command()[sql_parse.cc:1235]
0045D4A7    mysqld.exe!do_command()[sql_parse.cc:878]
0047DC90    mysqld.exe!handle_one_connection()[sql_connect.cc:1127]
0067D97B    mysqld.exe!pthread_start()[my_winthread.c:85]
0065CE83    mysqld.exe!_callthreadstart()[thread.c:293]
755F7370    
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 06D326D0=                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
thd->thread_id=14
thd->killed=NOT_KILLED
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.

How to repeat:
The same log output is generated with each repeat. Only the affected memory address changes.
[11 Mar 2010 6:43] Sveta Smirnova
Thank you for the report.

I assume this crashes every time when mysqldump trying to select from table users? Please correct me if I am wrong.

Please also provide output of SHOW CREATE TABLE users, SHOW TABLE STATUS LIKE 'users' and CHECK TABLE users. Would be good if you could upload binary files of table users to our FTP server as described in "Files" section.
[11 Apr 2010 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[26 Apr 2010 12:06] Thomad Reitz
Unfortunately I am unable to provide you with the data file. Here is the requested output:

mysql> show create table users;
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| users | CREATE TABLE `users` (
  `id` int(11) NOT NULL auto_increment,
  `login` varchar(40) collate utf8_bin default NULL,
  `name` varchar(200) collate utf8_bin default NULL,
  `email` varchar(100) collate utf8_bin default NULL,
  `crypted_password` varchar(40) collate utf8_bin default NULL,
  `salt` varchar(40) collate utf8_bin default NULL,
  `created_at` datetime default NULL,
  `updated_at` datetime default NULL,
  `remember_token` varchar(500) collate utf8_bin default NULL,
  `remember_token_expires_at` datetime default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin |
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> show table status like 'users';
+-------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-----------+----------+----------------+-------------------------+
| Name  | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time         | Update_time | Check_time | Collation | Checksum | Create_options | Comment                 |
+-------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-----------+----------+----------------+-------------------------+
| users | InnoDB |      10 | Compact    |    2 |           8192 |       16384 |               0 |            0 |         0 |              3 | 2010-02-17 14:08:27 | NULL        | NULL       | utf8_bin  |     NULL |                | InnoDB free: 2627584 kB |
+-------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-----------+----------+----------------+-------------------------+
1 row in set (0.00 sec)

mysql> check table users;
+-------------+-------+----------+----------+
| Table       | Op    | Msg_type | Msg_text |
+-------------+-------+----------+----------+
| sonar.users | check | status   | OK       |
+-------------+-------+----------+----------+
1 row in set (0.02 sec)
[23 Jul 2010 17:57] Valeriy Kravchuk
Please, check if this is still repeatable with a newer version, 5.1.49.
[23 Aug 2010 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".