Bug #45400 Mysql 5.0.77 crash
Submitted: 9 Jun 2009 13:49 Modified: 18 Jun 2009 11:46
Reporter: Stefan Dreyer Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: General Severity:S2 (Serious)
Version:5.0.77 OS:Windows (Microsoft Windows 2003 )
Assigned to: CPU Architecture:Any
Tags: MySql Crash

[9 Jun 2009 13:49] Stefan Dreyer
Description:
Hello,

i have noticed a crash with an mysql-Server running on windows Server 2k3. After the crash the log shows thw following details:

090608  9:26:38 [Note] C:\Programme\MySQL\MySQL Server 5.0\bin\mysqld-nt: ready for connections.
Version: '5.0.77-community-nt'  socket: ''  port: 3306  MySQL Community Edition (GPL)
090609 15:17:47 - 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=135266304
read_buffer_size=65536
max_used_connections=19
max_connections=800
threads_connected=1
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 388096 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=16B49808
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...
0065FB90    mysqld-nt.exe!row_sel_field_store_in_mysql_format()[row0sel.c:2357]
0065FF7E    mysqld-nt.exe!row_sel_store_mysql_rec()[row0sel.c:2511]
006617DE    mysqld-nt.exe!row_search_for_mysql()[row0sel.c:3983]
00440B4B    mysqld-nt.exe!ha_innobase::index_read()[ha_innodb.cc:3887]
00441026    mysqld-nt.exe!ha_innobase::index_first()[ha_innodb.cc:4142]
0044113A    mysqld-nt.exe!ha_innobase::rnd_next()[ha_innodb.cc:4233]
004D22D5    mysqld-nt.exe!rr_sequential()[records.cc:332]
0054D47B    mysqld-nt.exe!join_init_read_record()[sql_select.cc:11359]
0055324F    mysqld-nt.exe!sub_select()[sql_select.cc:10696]
00566337    mysqld-nt.exe!do_select()[sql_select.cc:10459]
0056742C    mysqld-nt.exe!JOIN::exec()[sql_select.cc:2121]
00567A74    mysqld-nt.exe!mysql_select()[sql_select.cc:2301]
00567EBB    mysqld-nt.exe!handle_select()[sql_select.cc:257]
00539CA0    mysqld-nt.exe!mysql_execute_command()[sql_parse.cc:2829]
00540961    mysqld-nt.exe!mysql_parse()[sql_parse.cc:6322]
0054196E    mysqld-nt.exe!dispatch_command()[sql_parse.cc:1963]
00542C56    mysqld-nt.exe!do_command()[sql_parse.cc:1646]
00542F75    mysqld-nt.exe!handle_one_connection()[sql_parse.cc:1234]
005F419B    mysqld-nt.exe!pthread_start()[my_winthread.c:85]
006DF00F    mysqld-nt.exe!_threadstart()[thread.c:196]
7C824829    kernel32.dll!GetModuleHandleA()
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 16B32F08=select Kunde.kdid,name,vorname,firma,ort from Kunde where 1  and (name like 'Sch%' or firma like 'Sch%') order by Kunde.name,Kunde.vorname
thd->thread_id=7926
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:
perform following SQL-Command:

select Kunde.kdid,name,vorname,firma,ort from Kunde where 1  and (name like 'Sch%' or firma like 'Sch%') order by Kunde.name,Kunde.vorname

Table-Structure:

CREATE TABLE IF NOT EXISTS `Kunde` (
  `kdid` int(10) NOT NULL auto_increment,
  `anrede` varchar(30) NOT NULL default '',
  `titel` varchar(30) NOT NULL default '',
  `name` varchar(200) default NULL,
  `vorname` varchar(80) default NULL,
  `firma` varchar(100) default NULL,
  `abteilung` varchar(80) default NULL,
  `strasse` varchar(100) default NULL,
  `zusatz` varchar(100) NOT NULL default '',
  `plz` varchar(10) default NULL,
  `ort` varchar(80) default NULL,
  `land` varchar(30) NOT NULL default '',
  `postfach` varchar(20) default NULL,
  `postfach_plz` varchar(10) NOT NULL default '',
  `liefername` varchar(100) default NULL,
  `lieferstrasse` varchar(100) default NULL,
  `lieferplz` varchar(10) default NULL,
  `lieferort` varchar(80) default NULL,
  `lieferland` varchar(30) NOT NULL default '',
  `tel` varchar(100) default NULL,
  `tel_dienst` varchar(100) default NULL,
  `tel_mobil` varchar(100) default NULL,
  `fax` varchar(30) default NULL,
  `email` varchar(100) default NULL,
  `internet` varchar(100) default NULL,
  `ktinhaber` varchar(100) default NULL,
  `bank` varchar(100) default NULL,
  `blz` varchar(20) default NULL,
  `kontonr` varchar(20) default NULL,
  `status` int(11) default NULL,
  `Bemerkung` text,
  `sessionid` varchar(50) default NULL,
  `zaid` int(11) default NULL,
  `user` varchar(20) default NULL,
  `updated` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `created` timestamp NOT NULL default '0000-00-00 00:00:00',
  `islocked` int(11) default '0',
  `lockdatum` timestamp NOT NULL default '0000-00-00 00:00:00',
  `custid` int(11) default NULL,
  `kdtyp` varchar(100) default NULL,
  `rootkdid` int(11) default NULL,
  `geburtstag` date default NULL,
  `bundesland` varchar(40) default NULL,
  `bankort` varchar(100) default NULL,
  `tel_zentrale` varchar(100) default NULL,
  `tel_durchwahl` varchar(100) default NULL,
  `branche` varchar(50) default NULL,
  `fax2` varchar(30) default NULL,
  `aim` varchar(100) default NULL,
  `angelegt` date default NULL,
  `briefanrede` varchar(100) default NULL,
  `land_kennz` char(3) default NULL,
  `smsversand` int(11) default '0',
  `newsletter` int(11) default '0',
  `passwort` varchar(40) default NULL,
  `bestaetigt` int(11) default '0',
  PRIMARY KEY  (`kdid`),
  KEY `status` (`status`),
  KEY `name` (`name`),
  KEY `vorname` (`vorname`),
  KEY `firma` (`firma`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=11463 ;
[9 Jun 2009 14:54] MySQL Verification Team
Thank you for the bug report. I couldn't repeat with latest source server please upgrade to the latest release 5.0.82 if the crash still happens, please provide a dump file with minimal data insert command so I can run the offended query and also your my.ini file. Thanks in advance.
[9 Jun 2009 19:49] Stefan Dreyer
I updated to 5.0.82 with same effect. But i try to use the select statement with order by name (insted of name,vorname) and it was working.
Now i set the sort_buffer_size and read_buffer_size to 2M, it was 64k before setup by the config wizard. Here is the my.ini:

# MySQL Server Instance Configuration File
# ----------------------------------------------------------------------
# Generated by the MySQL Server Instance Configuration Wizard
[client]

port=3306

[mysql]

default-character-set=latin1

[mysqld]

default-character-set=latin1
default-storage-engine=INNODB
max_connections=800
query_cache_size=84M
table_cache=1520
tmp_table_size=30M
thread_cache_size=38
myisam_max_sort_file_size=50G
myisam_sort_buffer_size=30M
key_buffer_size=129M

read_buffer_size=2M
sort_buffer_size=2M
                 ^^^^ 64K before

read_rnd_buffer_size=256K

innodb_additional_mem_pool_size=6M
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=16M
innodb_buffer_pool_size=512M
innodb_file_per_table
innodb_log_file_size=50M
innodb_thread_concurrency=10
lower_case_table_names=2
[15 Jun 2009 10:39] MySQL Verification Team
looks like a duplicate of bug #44810