Bug #1787 mysql cores
Submitted: 9 Nov 2003 19:22 Modified: 29 Jan 2004 13:35
Reporter: shilling lee Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S1 (Critical)
Version:mysql-4.0.12 OS:FreeBSD (FreeBSD-4.8 PRE-RELEASE)
Assigned to: CPU Architecture:Any

[9 Nov 2003 19:22] shilling lee
Description:

Version: '4.0.12-log'  socket: '/tmp/mysql.sock'  port: 3306
InnoDB: Fatal error: cannot allocate 278528 bytes of
InnoDB: memory with malloc! Total allocated memory
InnoDB: by InnoDB 35137044 bytes. Operating system errno: 12
InnoDB: Cannot continue operation!
InnoDB: Check if you should increase the swap file or
InnoDB: ulimits of your operating system.
InnoDB: On FreeBSD check you have compiled the OS with
InnoDB: a big enough maximum process size.
InnoDB: We now intentionally generate a seg fault so that
InnoDB: on Linux we get a stack trace.
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=268435456
read_buffer_size=2093056
Fatal signal 11 while backtracing

How to repeat:
mysqld usually cores after some SQL like

/*!40000 ALTER TABLE innodb_table DISABLE KEYS */

where innodb_table is InnoDB table name

Suggested fix:
not yet
[13 Nov 2003 5:18] Heikki Tuuri
Hi!

The error message says it all. Please check what

ulimit -a

says for the user running mysqld. Also check if you need to recompile the FreeBSD kernel to raise the maximum user process size from 512 MB.

Regards,

Heikki
[16 Nov 2003 0:07] shilling lee
1. Below is the default limit of user "mysql", I don't have idea to raise any of them
2. I have put "maxusers        0" in my kernel config, it's unlimit already
3. the mysql cores without use all of the swap memory ( I have 2G swap memory free )

mysql@~$ulimit -a
core file size        (blocks, -c) unlimited
data seg size         (kbytes, -d) 524288
file size             (blocks, -f) unlimited
max locked memory     (kbytes, -l) unlimited
max memory size       (kbytes, -m) unlimited
open files                    (-n) 11095
pipe size          (512 bytes, -p) 1
stack size            (kbytes, -s) 65536
cpu time             (seconds, -t) unlimited
max user processes            (-u) 5547
virtual memory        (kbytes, -v) 589824
[16 Nov 2003 0:08] shilling lee
The system have 1G memory and 2G swap and run only mysql
[29 Jan 2004 13:35] Heikki Tuuri
Hi!

Changing this to 'Not a bug', because your ulimit -a output shows that the maximum process size is 500 MB for the user. You should consult FreeBSD docs about raising them.

Regards,

Heikki