Bug #28114 MySQL keeps crashing
Submitted: 26 Apr 2007 7:34 Modified: 26 Apr 2007 10:31
Reporter: Tomas Okmanas Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Errors Severity:S2 (Serious)
Version:mysql Ver 14.12 Distrib 5.0.38, for pc- OS:Linux
Assigned to: CPU Architecture:Any
Tags: MySQL keeps crashing

[26 Apr 2007 7:34] Tomas Okmanas
Description:
I keep getting the mysql server version mysql  Ver 14.12 Distrib 5.0.38, for pc-linux-gnu (x86_64) using readline 5.1 crashing. Everything was working fine on debian earlier, but after moving to gentoo, a week was without errors, yesterday I've increased the limits: 
In /etc/security/limits.conf, add the lines:
   *     soft    nofile  4096
   *     hard    nofile  4096

In /etc/pam.d/login, add:
session required /lib/security/pam_limits.so

Then increase the system-wide file descriptor limit by adding the following lines to the /etc/rc.d/rc.local startup script:
echo 16256 > /proc/sys/fs/file-max
echo 24576 > /proc/sys/fs/inode-max

and my mysql crashes, and after starting again it up, the tables are corrupt and needs repairing.

I get this error:
070426  9:01:44 [ERROR] Got error 134 when reading table './torrentmain/snatched'
070426  9:01:44 - 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=67108864
read_buffer_size=2093056
max_used_connections=977
max_connections=7000
threads_connected=37
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 28709481 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=0x2aaac6d91a80
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...
Cannot determine thread, fp=0x4a452180, backtrace may not be correct.
Bogus stack limit or frame pointer, fp=0x4a452180, stack_bottom=0x4a450000, thread_stack=262144, aborting backtrace.
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x34786c0 = INSERT INTO snatched (torrent, torrentid, userid, port, startdat, last_action, agent, torrent_name, torrent_category) VALUES (11804, 11804, 79867, 45846, '2007-04-26 05:58:39', '2007-04-26 05:58:39', 'uTorrent/1610', 'KNIGHT RIDER 2', 1)
thd->thread_id=107037
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.
my.cnf attached

Thank you.

How to repeat:
FIX:
[26 Apr 2007 7:35] Tomas Okmanas
config

Attachment: my.cnf.txt (text/plain), 5.69 KiB.

[26 Apr 2007 7:52] Sveta Smirnova
Thank you for the report.

Error message shows you can use more than 27G memory. How much physical RAM do you have on the gentoo machine?
[26 Apr 2007 8:46] Tomas Okmanas
I have 3 GB of RAM. What's more the tables on the database keeps crashing very often (every ~30 minutes)
[26 Apr 2007 10:09] Sveta Smirnova
Thank you for the feedback.

But 3G is extremly lower than 27G reported in the error log. So I can not consider this as bug. Please decrease your buffers to reasonable values and you still meet error fill free to reopen the report.
[26 Apr 2007 10:31] Tomas Okmanas
I have decreased the numbers and recompiled the mysql with -latin1 extension, while the DB's are latin1. 2hours passed without any crash, hopefully it will continue further.
Will keep in touch here.