Bug #33283 | mysql crash unregularly after upgrade table strucat and stored procedure | ||
---|---|---|---|
Submitted: | 17 Dec 2007 8:38 | Modified: | 30 Apr 2012 12:55 |
Reporter: | JinRong Ye | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S1 (Critical) |
Version: | 5.0.27/5.0.45 | OS: | Linux (RedHat AS4U4/RedHat AS4U5) |
Assigned to: | Heikki Tuuri | CPU Architecture: | Any |
Tags: | crash, innodb, stored procedure, unique key |
[17 Dec 2007 8:38]
JinRong Ye
[17 Dec 2007 8:41]
JinRong Ye
server crash error log
Attachment: error.log (application/octet-stream, text), 259.76 KiB.
[17 Dec 2007 8:43]
JinRong Ye
table struct and stored procedure
Attachment: table_struct_and_stored_procedure.txt (text/plain), 9.40 KiB.
[17 Dec 2007 13:55]
Heikki Tuuri
Ye, please monitor with SHOW INNODB STATUS the total memory allocated by InnoDB. Can you see a memory leak, that is, does the memory consumption grow all the time? You are apparently hitting a 2 GB limit on memory space. Please monitor with the Linux 'top' the virtual memory size of the mysqld process. Does it grow constantly, indicating a memory leak? Regards, Heikki
[18 Dec 2007 6:12]
JinRong Ye
hi,Heikki yes,the momery allocated by mysqld grow all the time according to result of SHOW ENGINE INNODB STATUS. and the max value of the memor allocated by mysqld could be: Total memory allocated 2319012948; in additional pool allocated 6185600 or Total memory allocated 2319029454; in additional pool allocated 6324480
[18 Dec 2007 16:33]
Heikki Tuuri
Ye, please post your my.cnf. Do you have many tables (like thousands)? Regards, Heikki
[19 Dec 2007 1:04]
JinRong Ye
"my.cnf" and "show global status" and "show tables"
Attachment: table_struct_and_stored_procedure2.txt (text/plain), 30.28 KiB.
[4 Jan 2008 15:36]
Heikki Tuuri
You have configured 2 GB = 2147483648 bytes of buffer pool. The memory gets exhausted when InnoDB has allocated about 150 MB on top of that. Is the computer 32-bit or 64-bit? How much physical RAM do you have? It looks like that you are simply allocating too much memory for InnoDB's buffer pool, and you run out of memory. You can try setting: innodb_buffer_pool_size=1800M in my.cnf. Maybe the memory suffices then? Regards, Heikki
[7 Jan 2008 8:18]
JinRong Ye
hi,Heikki [@103_tc_10.11.54.126_CNC ~]# uname -a Linux 103_tc_10.11.54.126_CNC 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686 i686 i386 GNU/Linux [@103_tc_10.11.54.126_CNC ~]# cat /proc/meminfo MemTotal: 4149144 kB and i had tried to set innodb_buffer_pool_size=1800M,but it was not help :( thanks much
[14 Jan 2008 18:07]
Heikki Tuuri
Do I interpret right that you are running a 32-bit computer? Then the maximum process address space may be 2 GB or slightly more. If you set the InnoDB buffer pool 1500 MB, do you still get errors? If yes, please post the error message. --Heikki
[15 Jan 2008 3:03]
JinRong Ye
hi,Heikki i do a little change with the stored procedure,such as: the old where clause: aid=raid and dbversion<=pdbversion; the new where clause charguid=pcharguid and pos=ppos and dbversion<=pdbversion; and the field "aid" is the primary key,this problem is solved. is there any bug with primary key if it is used within stored procedure? Regards, JinrongYe
[15 Jan 2008 15:28]
Heikki Tuuri
Hi! This might be a memory leak associated with stored procedures. Can you make a test table and a stored procedure that causes mysqld to run out of memory? If yes, please post them here so that we can test them. Regards, Heikki
[23 Jan 2008 22:45]
JinRong Ye
hi,Heikki i had uploaded the table struct and test table data to ftp.mysql.com/pub/upload/bug_33283_t_iteminfo_080123.tar.gz,check it please,thanks!
[30 Apr 2012 12:55]
MySQL Verification Team
Setting not a bug here. Probably a different query plan and join buffer or sort buffer are used with different versions of the SP. solution: reduce mysqld memory footprint or get 64-bit build with more ram.