← Back to team overview

maria-developers team mailing list archive

Mysql crashes with signal 11 after a select (or even explain) on a view with a subselect.

 

>Description:
	we see some problems with views that include other views (I think that is the problem...) and selects on views with subselects.
The log says after a crash:
Aug  3 17:29:22 db7 mysqld: 120803 17:29:22 [ERROR] mysqld got signal 11 ;
Aug  3 17:29:22 db7 mysqld: This could be because you hit a bug. It is also possible that this binary
Aug  3 17:29:22 db7 mysqld: or one of the libraries it was linked against is corrupt, improperly built,
Aug  3 17:29:22 db7 mysqld: or misconfigured. This error can also be caused by malfunctioning hardware.
Aug  3 17:29:22 db7 mysqld: We will try our best to scrape up some info that will hopefully help diagnose
Aug  3 17:29:22 db7 mysqld: the problem, but since we have already crashed, something is definitely wrong
Aug  3 17:29:22 db7 mysqld: and this may fail.
Aug  3 17:29:22 db7 mysqld: 
Aug  3 17:29:22 db7 mysqld: key_buffer_size=0
Aug  3 17:29:22 db7 mysqld: read_buffer_size=2097152
Aug  3 17:29:22 db7 mysqld: max_used_connections=100
Aug  3 17:29:22 db7 mysqld: max_threads=302
Aug  3 17:29:22 db7 mysqld: threads_connected=35
Aug  3 17:29:22 db7 mysqld: It is possible that mysqld could use up to 
Aug  3 17:29:22 db7 mysqld: key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 5570184 K
Aug  3 17:29:22 db7 mysqld: bytes of memory
Aug  3 17:29:22 db7 mysqld: Hope that's ok; if not, decrease some variables in the equation.
Aug  3 17:29:22 db7 mysqld: 
Aug  3 17:29:22 db7 mysqld: Thread pointer: 0x7f3521cba000
Aug  3 17:29:22 db7 mysqld: Attempting backtrace. You can use the following information to find out
Aug  3 17:29:22 db7 mysqld: where mysqld died. If you see no messages after this, something went
Aug  3 17:29:22 db7 mysqld: terribly wrong...
Aug  3 17:29:22 db7 mysqld: stack_bottom = 0x7f1f899b4e98 thread_stack 0x3c000
Aug  3 17:29:22 db7 mysqld: /usr/sbin/mysqld(my_print_stacktrace+0x2e) [0x7f341e1f39de]
Aug  3 17:29:22 db7 mysqld: /usr/sbin/mysqld(handle_segfault+0x3e5) [0x7f341de306f5]
Aug  3 17:29:22 db7 mysqld: /lib/libpthread.so.0(+0xef60) [0x7f341c1def60]
Aug  3 17:29:22 db7 mysqld: /usr/sbin/mysqld(Field_dependency_recorder::visit_field(Field*)+0x1) [0x7f341dfb48c1]
Aug  3 17:29:22 db7 mysqld: /usr/sbin/mysqld(Item_field::enumerate_field_refs_processor(unsigned char*)+0x16) [0x7f341dd779d6]
Aug  3 17:29:22 db7 mysqld: /usr/sbin/mysqld(Item_subselect::enumerate_field_refs_processor(unsigned char*)+0x4c) [0x7f341ddeb6dc]
Aug  3 17:29:22 db7 mysqld: /usr/sbin/mysqld(Dep_analysis_context::setup_equality_modules_deps(List<Dep_module>*)+0x13e) [0x7f341dfb406e]
Aug  3 17:29:22 db7 mysqld: /usr/sbin/mysqld(+0x4e140d) [0x7f341dfb440d]
Aug  3 17:29:22 db7 mysqld: /usr/sbin/mysqld(+0x4e15a0) [0x7f341dfb45a0]
Aug  3 17:29:22 db7 mysqld: /usr/sbin/mysqld(+0x3d2eae) [0x7f341dea5eae]
Aug  3 17:29:22 db7 mysqld: /usr/sbin/mysqld(JOIN::optimize()+0x465) [0x7f341dea7a55]
Aug  3 17:29:22 db7 mysqld: /usr/sbin/mysqld(mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*)+0xda) [0x7f341deb04da]
Aug  3 17:29:22 db7 mysqld: /usr/sbin/mysqld(handle_select(THD*, st_lex*, select_result*, unsigned long)+0x15d) [0x7f341deb0f5d]
Aug  3 17:29:22 db7 mysqld: /usr/sbin/mysqld(+0x368baa) [0x7f341de3bbaa]
Aug  3 17:29:22 db7 mysqld: /usr/sbin/mysqld(mysql_execute_command(THD*)+0x40e) [0x7f341de3e05e]
Aug  3 17:29:22 db7 mysqld: /usr/sbin/mysqld(mysql_parse(THD*, char*, unsigned int, char const**)+0x2c1) [0x7f341de43711]
Aug  3 17:29:22 db7 mysqld: /usr/sbin/mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned int)+0xceb) [0x7f341de4485b]
Aug  3 17:29:22 db7 mysqld: /usr/sbin/mysqld(do_command(THD*)+0xf4) [0x7f341de45364]
Aug  3 17:29:22 db7 mysqld: /usr/sbin/mysqld(handle_one_connection+0x13e) [0x7f341de3762e]
Aug  3 17:29:22 db7 mysqld: /lib/libpthread.so.0(+0x68ba) [0x7f341c1d68ba]
Aug  3 17:29:22 db7 mysqld: /lib/libc.so.6(clone+0x6d) [0x7f341b7a002d]
Aug  3 17:29:22 db7 mysqld: 

This happens on all servers over here. At least all I tested it on...
even if these queries are too complex, the mysqld should never die with signal 11 but give some kind of sql error!

>How-To-Repeat:
I have some queries over here that crash the server. Is there something like a drop-in binary for mysqld I could use to gather more information for you? or shall I run mysqld with strace or so?
the database is far to big and complex to copy it (besides legal reasons, I can't send it to anybody), but I have replication slaves I can use for testing.
	
>Fix:
	just don't run the query... no idea.

>Submitter-Id:	<submitter ID>
>Originator:	root
>Organization:
 kirchy
>MySQL support: none
>Synopsis:	Mysql crashes with signal 11 after a select (or even explain) on a view with a subselect.
>Severity:	serious
>Priority:	medium
>Category:	mysql
>Class:		sw-bug
>Release:	mysql-5.2.7-MariaDB-mariadb101~squeeze ((MariaDB - http://mariadb.com/))
>Server: /usr/bin/mysqladmin  Ver 9.0 Distrib 5.2.7-MariaDB, for debian-linux-gnu on x86_64
Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc,
2009 Monty Program Ab
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version		5.2.7-MariaDB-mariadb101~squeeze-log
Protocol version	10
Connection		Localhost via UNIX socket
UNIX socket		/var/run/mysqld/mysqld.sock
Uptime:			57 min 5 sec

Threads: 23  Questions: 491608  Slow queries: 175  Opens: 3750  Flush tables: 1  Open tables: 460  Queries per second avg: 143.535
>C compiler:    gcc-4.4.real (Debian 4.4.4-8) 4.4.5 20100728 (prerelease)
>C++ compiler:  g++-4.4.real (Debian 4.4.4-8) 4.4.5 20100728 (prerelease)
>Environment:
	
System: Linux db7 2.6.39-bpo.2-amd64 #1 SMP Tue Jul 26 10:35:23 UTC 2011 x86_64 GNU/Linux
Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc
GCC: Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-8' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.4.5 (Debian 4.4.5-8) 
Compilation info (call): CC='gcc -static-libgcc'  CFLAGS='-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wno-uninitialized'  CXX='g++ -static-libgcc'  CXXFLAGS='-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wno-uninitialized'  LDFLAGS=''  ASFLAGS=''
Compilation info (used): CC='gcc -static-libgcc'  CFLAGS=' -O2 -fno-omit-frame-pointer -g -pipe -Wall -Wno-uninitialized   -DUNIV_LINUX'  CXX='g++ -static-libgcc'  CXXFLAGS=' -O2 -fno-omit-frame-pointer -g -pipe -Wall -Wno-uninitialized   -fno-implicit-templates -fno-exceptions -fno-rtti'  LDFLAGS=' -rdynamic '  ASFLAGS=''
LIBC: 
lrwxrwxrwx 1 root root 14  3. Mär 2011  /lib/libc.so.6 -> libc-2.11.2.so
-rwxr-xr-x 1 root root 1432968 23. Jan 2011  /lib/libc-2.11.2.so
-rw-r--r-- 1 root root 4433334 23. Jan 2011  /usr/lib/libc.a
-rw-r--r-- 1 root root 247 23. Jan 2011  /usr/lib/libc.so
Configure command: ../configure  '--build=x86_64-linux-gnu' '--host=x86_64-linux-gnu' '--prefix=/usr' '--exec-prefix=/usr' '--libexecdir=/usr/sbin' '--datadir=/usr/share' '--localstatedir=/var/lib/mysql' '--includedir=/usr/include' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-server-suffix=-mariadb101~squeeze' '--with-comment=(MariaDB - http://mariadb.com/)' '--with-system-type=debian-linux-gnu' '--enable-shared' '--enable-static' '--enable-thread-safe-client' '--enable-assembler' '--enable-local-infile' '--with-pstack' '--with-fast-mutexes' '--with-unix-socket-path=/var/run/mysqld/mysqld.sock' '--with-mysqld-user=mysql' '--with-big-tables' '--without-docs' '--with-extra-charsets=all' '--with-libwrap' '--with-ssl=/usr' '--with-libevent' '--without-readline' '--with-zlib-dir=' '--with-embedded-server' '--with-embedded-privilege-control' '--with-plugins=max-no-ndb' '--without-plugin-innodb_plugin' 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu' 'CC
 =gcc -static-libgcc' 'CFLAGS=-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wno-uninitialized' 'LDFLAGS=' 'CPPFLAGS=' 'CXX=g++ -static-libgcc' 'CXXFLAGS=-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wno-uninitialized'


Follow ups