Bug #60670 MySQL crashed while parsing a SQL query (yacc)
Submitted: 28 Mar 2011 8:00 Modified: 22 Jun 2011 16:33
Reporter: Arnaud Adant Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Parser Severity:S1 (Critical)
Version:5.1.49 OS:Any
Assigned to: CPU Architecture:Any
Tags: crash, parser, yacc

[28 Mar 2011 8:00] Arnaud Adant
Description:
110309 14:07:27 - 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=805306368
read_buffer_size=4194304
max_used_connections=121
max_threads=3000
threads_connected=23
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 25393322 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x2ab5643f7000
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 = 0x4777ff10 thread_stack 0x40000
/usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x852b7e]
/usr/sbin/mysqld(handle_segfault+0x322)[0x5c2a22]
/lib64/libpthread.so.0[0x36d1c0eb10]
/usr/sbin/mysqld(_Z10MYSQLparsePv+0x1cb)[0x5e8a1b]
/usr/sbin/mysqld(_Z9parse_sqlP3THDP12Parser_stateP19Object_creation_ctx+0x9c)[0x5ca4dc]
/usr/sbin/mysqld(_Z11mysql_parseP3THDPKcjPS2_+0x211)[0x5d5f61]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x585)[0x5d6595]
/usr/sbin/mysqld(_Z10do_commandP3THD+0xe4)[0x5d76c4]
/usr/sbin/mysqld(handle_one_connection+0x6f0)[0x5c9c20]
/lib64/libpthread.so.0[0x36d1c0673d]
/lib64/libc.so.6(clone+0x6d)[0x36d14d3d1d]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x2ab5841034c0 is an invalid pointer
thd->thread_id=31068221
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.
mysqld: my_new.cc:51: int __cxa_pure_virtual(): Assertion `! "Aborted: pure virtual method called."' failed.
Fatal signal 6 while backtracing
mysqld: my_new.cc:51: int __cxa_pure_virtual(): Assertion `! "Aborted: pure virtual method called."' failed.
110309 14:07:29 mysqld_safe Number of processes running now: 0
110309 14:07:29 mysqld_safe mysqld restarted

How to repeat:
Impossible to repeat for now.
[28 Mar 2011 8:16] MySQL Verification Team
filtered:

/lib64/libc.so.6(clone+0x6d)[0x36d14d3d1d]/usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x852b7e]
/usr/sbin/mysqld(handle_segfault+0x322)[0x5c2a22]
/lib64/libpthread.so.0[0x36d1c0eb10]
/usr/sbin/mysqld(MYSQLparse(void*)+0x1cb)[0x5e8a1b]
/usr/sbin/mysqld(parse_sql(THD*, Parser_state*, Object_creation_ctx*)+0x9c)[0x5ca4dc]
/usr/sbin/mysqld(mysql_parse(THD*, char const*, unsigned int, char const**)+0x211)[0x5d5f61]
/usr/sbin/mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned int)+0x585)[0x5d6595]
/usr/sbin/mysqld(do_command(THD*)+0xe4)[0x5d76c4]
/usr/sbin/mysqld(handle_one_connection+0x6f0)[0x5c9c20]
/lib64/libpthread.so.0[0x36d1c0673d]
[22 May 2011 16:33] Valeriy Kravchuk
Do you have any idea on how to repeat or, at least, what exact query leads to this crash?
[26 May 2011 5:16] MySQL Verification Team
Hi!  I got a similar crash yesterday, but in this case mysqld was really out of memory, and writing warnings in the log before:

./mysql-5.1.57-solaris10-x86_64/bin/mysqld:my_print_stacktrace+0x20
./mysql-5.1.57-solaris10-x86_64/bin/mysqld:handle_segfault+0x1dc
/lib/amd64/libc.so.1:0xdc2e6
/lib/amd64/libc.so.1:0xd0bc2
./mysql-5.1.57-solaris10-x86_64/bin/mysqld:int MYSQLlex(void*,void*)+0x1d8b [ Signal 11 (SEGV)]
./mysql-5.1.57-solaris10-x86_64/bin/mysqld:int MYSQLparse(void*)+0x169
./mysql-5.1.57-solaris10-x86_64/bin/mysqld:bool parse_sql(THD*,Parser_state*,Object_creation_ctx*)+0x6e
./mysql-5.1.57-solaris10-x86_64/bin/mysqld:void mysql_parse(THD*,char*,unsigned,const char**)+0x11d
./mysql-5.1.57-solaris10-x86_64/bin/mysqld:bool dispatch_command(enum_server_command,THD*,char*,unsigned)+0xa69
./mysql-5.1.57-solaris10-x86_64/bin/mysqld:bool do_command(THD*)+0xe2
./mysql-5.1.57-solaris10-x86_64/bin/mysqld:handle_one_connection+0xe1
[22 Jun 2011 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".