Bug #17790 Memory leak ?
Submitted: 28 Feb 2006 16:23 Modified: 1 Mar 2006 11:58
Reporter: [ name withheld ] Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.18 OS:Linux (Linux 2.6)
Assigned to: CPU Architecture:Any

[28 Feb 2006 16:23] [ name withheld ]
Description:
The server runs normaly for 10 minutes, and begin to allocate around 100Mo by second until out of memory, and then server is killed by the kernel.

I have 2Go of memory,
I'm using the mysql-debug-5.0.18-linux-i686 version

Settings:

key_buffer_size=209715200
read_buffer_size=126976
max_used_connections=200
max_connections=300
threads_connected=199

Error log:

060228 16:15:08 [ERROR] Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space
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=209715200
read_buffer_size=126976
max_used_connections=200
max_connections=300
threads_connected=199
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 256997 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=0xa8200018
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=0xbfc9c798, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x80bbc28
0x839ab58
0x8163644
0x84394d3
0x816af98
0x816a3de
0x81683ba
0x8169281
0x81646e0
0x8438bf6
0x813a037
0x80d3945
0x80d9ddc
0x80cf6cc
0x80cef96
0x80ce02a
0x839830c
0x83c212a
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read http://dev.mysql.com/doc/mysql/en/Using_stack_trace.html and follow instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do
resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0xa937e018  is invalid pointer
thd->thread_id=165
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.

Number of processes running now: 0

Resolved stack dump:
0x80bbc28 handle_segfault + 464
0x839ab58 pthread_sighandler + 184
0x8163644 __7SEL_ARGP5FieldUcPcT3UcUcUc + 52
0x84394d3 clone_and__7SEL_ARGP7SEL_ARG + 179
0x816af98 key_and__FP7SEL_ARGT0Ui + 912
0x816a3de tree_and__FP13st_qsel_paramP8SEL_TREET1 + 578
0x81683ba get_func_mm_tree__FP13st_qsel_paramP9Item_funcP5FieldP4Item11Item_resultb + 622
0x8169281 get_mm_tree__FP13st_qsel_paramP4Item + 3365
0x81646e0 test_quick_select__10SQL_SELECTP3THDGt6Bitmap1Ui64UxUxb + 2032
0x8438bf6 check_quick__10SQL_SELECTP3THDbUx + 82
0x813a037 mysql_delete__FP3THDP13st_table_listP4ItemP11st_sql_listUxUxb + 999
0x80d3945 mysql_execute_command__FP3THD + 10785
0x80d9ddc mysql_parse__FP3THDPcUi + 460
0x80cf6cc dispatch_command__F19enum_server_commandP3THDPcUi + 1832
0x80cef96 do_command__FP3THD + 538
0x80ce02a handle_one_connection + 850
0x839830c pthread_start_thread + 220
0x83c212a thread_start + 4

How to repeat:
Start the server and do queries
[28 Feb 2006 16:39] [ name withheld ]
Server is a Bi-Xeon with hyper threading enabled
[28 Feb 2006 17:14] [ name withheld ]
After reading others bugs, it seems to be a the same problem as #17792
Server don't crash any more when it don't do type of queries described in this bug.

Sorry for this duplicated repport, I haven't founded any bug related to mine.
[1 Mar 2006 11:58] Valeriy Kravchuk
Looks like a duplicate of bug #15872, as well as bug #17792 you refered to.