Bug #43429 Mysql 5.1.30 - 5.1.31 crash on a particular query
Submitted: 5 Mar 2009 17:47 Modified: 5 Mar 2009 17:53
Reporter: Domenico De Monte Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.1.31 OS:Linux (Centos 5.2 64bit)
Assigned to: CPU Architecture:Any
Tags: mysql crash smf

[5 Mar 2009 17:47] Domenico De Monte
Description:
Hi,
mysql server does a strange crash with a particular query by SMF forum.

If i try to search on SMF 3 words mysql crash adn this is output:

/usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x8435be]
/usr/sbin/mysqld(handle_segfault+0x322)[0x5bbb02]
/lib64/libpthread.so.0[0x3517e0de70]
/lib64/libc.so.6(memmove+0x90)[0x3517279710]
/usr/sbin/mysqld(my_vsnprintf+0x377)[0x85dc67]
/usr/sbin/mysqld(_Z17vprint_msg_to_log8loglevelPKcP13__va_list_tag+0x36)[0x64d1a6]
/usr/sbin/mysqld(_ZN25Log_to_file_event_handler9log_errorE8loglevelPKcP13__va_list_tag+0x11)[0x64d2a1]
/usr/sbin/mysqld(_ZN6LOGGER15error_log_printE8loglevelPKcP13__va_list_tag+0x2f)[0x64b8df]
/usr/sbin/mysqld(_Z15error_log_print8loglevelPKcP13__va_list_tag+0x16)[0x64bb66]
/usr/sbin/mysqld(_Z17sql_print_warningPKcz+0x93)[0x64c823]
/usr/sbin/mysqld(_ZN3THD12binlog_queryENS_22enum_binlog_query_typeEPKcmbbNS_12killed_stateE+0x1e5)[0x5a9965]
/usr/sbin/mysqld(_ZN13select_insert8send_eofEv+0xec)[0x63774c]
/usr/sbin/mysqld[0x625651]
/usr/sbin/mysqld(_ZN4JOIN4execEv+0x8ec)[0x63144c]
/usr/sbin/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x16e)[0x632e9e]
/usr/sbin/mysqld(_Z13handle_selectP3THDP6st_lexP13select_resultm+0x169)[0x6337b9]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x47d5)[0x5cd065]
/usr/sbin/mysqld(_Z11mysql_parseP3THDPKcjPS2_+0x1f1)[0x5cdfa1]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0xfd0)[0x5cef90]
/usr/sbin/mysqld(_Z10do_commandP3THD+0xe4)[0x5cf524]
/usr/sbin/mysqld(handle_one_connection+0x6ef)[0x5c2a1f]
/lib64/libpthread.so.0[0x3517e062f7]
/lib64/libc.so.6(clone+0x6d)[0x35172d1e3d]
090305 18:34:08 - 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=1073741824
read_buffer_size=4194304
max_used_connections=207
max_threads=16383
threads_connected=38
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 236081653 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x2aab1599f6f0
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...
stack_bottom = 0x400daf20 thread_stack 0x20000
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0xf6e5d50 = INSERT IGNORE INTO smf_tmp_log_search_topics
                                                        (ID_TOPIC)
                                                SELECT t.ID_TOPIC
                                                FROM (smf_topics AS t, smf_log_search_subjects AS subj1, smf_log_search_subjects AS subj2, smf_log_search_subjects AS subj3, smf_log_search_subjects AS subj4)
                                                WHERE subj1.word LIKE '%shellshock%'
                                                        AND subj1.ID_TOPIC = t.ID_TOPIC
                                                        AND subj2.word LIKE '%2%'
                                                        AND subj2.ID_TOPIC = subj1.ID_TOPIC
                                                        AND subj3.word LIKE '%blood%'
                                                        AND subj3.ID_TOPIC = subj2.ID_TOPIC
                                                        AND subj4.word LIKE '%trails-reloaded%'
                                                        AND subj4.ID_TOPIC = subj3.ID_TOPIC
                                                        AND t.ID_BOARD IN (90, 5, 60, 89, 54, 8, 11, 52, 7, 6, 9, 57, 91, 62, 10, 63, 24, 73, 74, 75, 76, 77, 64, 25, 65, 26, 66, 28, 67, 29, 79, 81, 82, 16, 5
5, 17, 18, 19, 56, 22, 23, 32, 31, 85, 33, 35, 36, 37, 61, 38, 39, 41, 42, 43, 44, 84, 46, 72, 49, 50, 51)
                                                LIMIT 1200
thd->thread_id=8979
thd->killed=NOT_KILLED
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
090305 18:34:09 mysqld_safe Number of processes running now: 0
090305 18:34:09 mysqld_safe mysqld restarted

How to repeat:
Search on any versions of SMF forum words like: shellshock 2 blood
Mysql Server versions: 5.1.31 - 5.1.30 RPM / OS CentOS 5.2 64bit
[5 Mar 2009 17:53] Davi Arnaut
This bug has been marked as a duplicate of Bug#42634