Bug #19094 MySQL keeping Crash and Restart, log file show a pointer error
Submitted: 14 Apr 2006 3:21 Modified: 24 Apr 2006 15:22
Reporter: liu liu Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.1.18 OS:Linux (RH 9.0)
Assigned to: CPU Architecture:Any

[14 Apr 2006 3:21] liu liu
Description:
Our MySQL Server Keeping restart every 30 minutes in day and 2-3 hours in night. and we find the cpu useage of mysql is NOT high actually. We use 2 heap tables in our DB and we do a lot of test like "INSERT 1000 ROWS and DELETE THEM", we find that action actually accelerate the CRASH. but in another SERVER(mysql 5.0),this never happened. 

this is the error log file:

***************************************

Number of processes running now: 0
060413 08:40:35  mysqld restarted
060413  8:40:35  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
060413  8:40:35  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 94220.
InnoDB: Doing recovery: scanned up to log sequence number 0 94220
InnoDB: Last MySQL binlog file position 0 79, file name ./msnok-bin.000249
060413  8:40:35  InnoDB: Flushing modified pages from the buffer pool...
060413  8:40:35  InnoDB: Started; log sequence number 0 94220
060413  8:40:35 [Warning] mysql.user table is not updated to new password format; Disabling new password usage until mysql_fix_privilege_tables is run
/usr/local/mysql/libexec/mysqld: ready for connections.
Version: '4.1.18-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
mysqld got signal 11;
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=16777216
read_buffer_size=258048
max_used_connections=5
max_connections=100
threads_connected=1
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 92783 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=0x8ae8568
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...
Bogus stack limit or frame pointer, fp=0x41f39fe4, stack_bottom=0x263b3239, thread_stack=196608, aborting backtrace.
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x45a08b30  is invalid pointer
thd->thread_id=598
The manual page at http://www.mysql.com/doc/en/Crashing.html contains
information that should help you find out what is causing the crash.

*************************************************************

thx for your help!

How to repeat:
we cannot sure you can repeat the bug, but in another MYSQL5.1, Nothing happened.
[14 Apr 2006 8:22] MySQL Verification Team
Please, run a memory test (memtest86) on your server to verify hardware is okay.  Or is it ECC memory?
[14 Apr 2006 8:47] liu liu
thanks for your help,but our server has 2G ECC memory...
[14 Apr 2006 10:23] MySQL Verification Team
Hi,
Please show us the table structures of both tables.
SHOW CREATE TABLE <table>\G

This could be a memory leak, http://bugs.mysql.com/bug.php?id=18160.  I will confirm.
[14 Apr 2006 10:45] liu liu
CREATE TABLE `pstat_cache_heap` (\n  `uid` bigint(20) NOT NULL auto_increment,\n  `memberid` bigint(20) NOT NULL default '0',\n  `visittime` int(11) NOT NULL default '0',\n  `isstat` tinyint(1) NOT NULL default '0',\n  `ip` varchar(15) NOT NULL default '',\n  `system` varchar(32) default NULL,\n  `pageurl` varchar(255) default NULL,\n  `pagefrom` varchar(255) default NULL,\n  `language` varchar(16) default NULL,\n  `screensize` varchar(20) default NULL,\n  `screencolor` varchar(5) default NULL,\n  `browser` varchar(32) default NULL,\n  `country` varchar(32) default NULL,\n  `address` varchar(50) default NULL,\n  PRIMARY KEY  (`uid`),\n  KEY `memberid` (`memberid`,`isstat`,`country`)\n) ENGINE=HEAP DEFAULT CHARSET=utf8

CREATE TABLE `pstat_stat_heap` (\n  `uid` bigint(20) NOT NULL auto_increment,\n  `memberid` bigint(20) NOT NULL default '0',\n  `archiveTBLname` varchar(50) NOT NULL default '',\n  `allcountpv` bigint(20) NOT NULL default '0',\n  `allcountip` bigint(20) NOT NULL default '0',\n  `todaycountpv` bigint(20) NOT NULL default '0',\n  `todaycountip` bigint(20) NOT NULL default '0',\n  `todaytime` int(11) NOT NULL default '0',\n  `thishourpv` int(11) NOT NULL default '0',\n  `thishourip` int(11) NOT NULL default '0',\n  PRIMARY KEY  (`uid`),\n  KEY `memberid` (`memberid`),\n  KEY `archiveTBLname` (`archiveTBLname`)\n) ENGINE=HEAP DEFAULT CHARSET=utf8

THANK YOU
[18 Apr 2006 7:42] MySQL Verification Team
Liu, I ran insert/delete/select for many hours without a crash - and used multiple concurrent connections.  Can you provide some testcase/script to simulate the workload that causes a crash?
[21 Apr 2006 7:12] liu liu
our database administrator had already update the DB to mysql5 and the error never happened.

by the way ,we use the "memory leak patch" you showed to us but the crash goes on.

still thank you a lot.