*** glibc detected *** /usr/libexec/mysqld: free(): invalid next size (fast): 0x0a368fe0 *** ======= Backtrace: ========= /lib/libc.so.6[0x4bd124] /lib/libc.so.6(__libc_free+0x77)[0x4bd65f] /usr/libexec/mysqld(my_close+0x6b)[0x83fd923] /usr/libexec/mysqld(mi_create+0x1489)[0x83db89f] /usr/libexec/mysqld[0x8169435] /usr/libexec/mysqld(_Z16create_tmp_tableP3THDP15TMP_TABLE_PARAMR4ListI4ItemEP8st_orderbbmmPc+0xf67)[0x8178a05] /usr/libexec/mysqld(_Z20mysql_handle_derivedP6st_lex+0x199)[0x81f0299] /usr/libexec/mysqld(_Z20open_and_lock_tablesP3THDP13st_table_list+0x5e)[0x81630fc] /usr/libexec/mysqld(_Z21mysql_execute_commandP3THD+0x178f)[0x814874f] /usr/libexec/mysqld(_Z11mysql_parseP3THDPcj+0xc4)[0x814b8b4] /usr/libexec/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x3c7)[0x814bcc7] /usr/libexec/mysqld(_Z10do_commandP3THD+0x7f)[0x814cc73] /usr/libexec/mysqld(handle_one_connection+0x835)[0x814d591] /lib/libpthread.so.0[0x5b7b80] /lib/libc.so.6(__clone+0x5e)[0x5249ce] ======= Memory map: ======== mysqld got signal 6; 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=8388600 read_buffer_size=131072 max_used_connections=2 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 = 225791 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. thd=0xa37f668 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=0xb130564c, backtrace may not be correct. Stack range sanity check OK, backtrace follows: 0x81356bf 0xe24420 (nil) 0x4b722a 0x4bd124 0x4bd65f 0x83fd923 0x83db89f 0x8169435 0x8178a05 0x81f0299 0x81630fc 0x814874f 0x814b8b4 0x814bcc7 0x814cc73 0x814d591 0x5b7b80 0x5249ce 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 0xa32adc0 = SELECT * FROM Bodies NATURAL JOIN (SELECT * FROM (SELECT * FROM Cars NATURAL JOIN Models NATURAL JOIN Factories) AS cmf NATURAL JOIN Fuels) AS cf NATURAL JOIN Conditions WHERE car_id=18 thd->thread_id=5762