Bug #58133 Server crashing after installing Sphinx Search on virtual machine
Submitted: 11 Nov 2010 10:50 Modified: 18 Dec 2010 22:08
Reporter: Alexander Jonser Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.1.49 OS:Linux
Assigned to: CPU Architecture:Any

[11 Nov 2010 10:50] Alexander Jonser
Description:
After installing MySQL Server 5.1.49-2 on Debian in a virtual machine (VMWare), the server crashes and restarts. 
The error occurs in every version of MySQL-Server i tried (>5.1.49).

Here's the log entry:

Nov 11 11:34:41 debian-test mysqld: 101111 11:34:41 - mysqld got signal 11 ;
Nov 11 11:34:41 debian-test mysqld: This could be because you hit a bug. It is also possible that this binary
Nov 11 11:34:41 debian-test mysqld: or one of the libraries it was linked against is corrupt, improperly built,
Nov 11 11:34:41 debian-test mysqld: or misconfigured. This error can also be caused by malfunctioning hardware.
Nov 11 11:34:41 debian-test mysqld: We will try our best to scrape up some info that will hopefully help diagnose
Nov 11 11:34:41 debian-test mysqld: the problem, but since we have already crashed, something is definitely wrong
Nov 11 11:34:41 debian-test mysqld: and this may fail.
Nov 11 11:34:41 debian-test mysqld: 
Nov 11 11:34:41 debian-test mysqld: key_buffer_size=16777216
Nov 11 11:34:41 debian-test mysqld: read_buffer_size=131072
Nov 11 11:34:41 debian-test mysqld: max_used_connections=4
Nov 11 11:34:41 debian-test mysqld: max_threads=151
Nov 11 11:34:41 debian-test mysqld: threads_connected=1
Nov 11 11:34:41 debian-test mysqld: It is possible that mysqld could use up to 
Nov 11 11:34:41 debian-test mysqld: key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 345929 K
Nov 11 11:34:41 debian-test mysqld: bytes of memory
Nov 11 11:34:41 debian-test mysqld: Hope that's ok; if not, decrease some variables in the equation.
Nov 11 11:34:41 debian-test mysqld: 
Nov 11 11:34:41 debian-test mysqld: thd: 0xb98a76e0
Nov 11 11:34:41 debian-test mysqld: Attempting backtrace. You can use the following information to find out
Nov 11 11:34:41 debian-test mysqld: where mysqld died. If you see no messages after this, something went
Nov 11 11:34:41 debian-test mysqld: terribly wrong...
Nov 11 11:34:41 debian-test mysqld: stack_bottom = 0xb313536c thread_stack 0x30000
Nov 11 11:34:41 debian-test mysqld: /usr/sbin/mysqld(my_print_stacktrace+0x2d) [0xb75fe22d]
Nov 11 11:34:41 debian-test mysqld: /usr/sbin/mysqld(handle_segfault+0x494) [0xb72c58c4]
Nov 11 11:34:41 debian-test mysqld: [0xb7034400]
Nov 11 11:34:41 debian-test mysqld: /usr/sbin/mysqld(mysql_rm_table_part2(THD*, TABLE_LIST*, bool, bool, bool, bool)+0x692) [0xb73ef8e2]
Nov 11 11:34:41 debian-test mysqld: /usr/sbin/mysqld(+0x392d9e) [0xb73e4d9e]
Nov 11 11:34:41 debian-test mysqld: /usr/sbin/mysqld(mysql_rm_db(THD*, char*, bool, bool)+0x21c) [0xb73e6bfc]
Nov 11 11:34:41 debian-test mysqld: /usr/sbin/mysqld(mysql_execute_command(THD*)+0x4ee5) [0xb72dd405]
Nov 11 11:34:41 debian-test mysqld: /usr/sbin/mysqld(mysql_parse(THD*, char const*, unsigned int, char const**)+0x42a) [0xb72e0b0a]
Nov 11 11:34:41 debian-test mysqld: /usr/sbin/mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned int)+0xe75) [0xb72e1995]
Nov 11 11:34:41 debian-test mysqld: /usr/sbin/mysqld(do_command(THD*)+0xf3) [0xb72e2c63]
Nov 11 11:34:41 debian-test mysqld: /usr/sbin/mysqld(handle_one_connection+0x268) [0xb72d12f8]
Nov 11 11:34:41 debian-test mysqld: /lib/i686/cmov/libpthread.so.0(+0x5955) [0xb7011955]
Nov 11 11:34:41 debian-test mysqld: /lib/i686/cmov/libc.so.6(clone+0x5e) [0xb6dede7e]
Nov 11 11:34:41 debian-test mysqld: Trying to get some variables.
Nov 11 11:34:41 debian-test mysqld: Some pointers may be invalid and cause the dump to abort...
Nov 11 11:34:41 debian-test mysqld: thd->query at 0xb98b7650 = drop database test
Nov 11 11:34:41 debian-test mysqld: thd->thread_id=41
Nov 11 11:34:41 debian-test mysqld: thd->killed=NOT_KILLED
Nov 11 11:34:41 debian-test mysqld: The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
Nov 11 11:34:41 debian-test mysqld: information that should help you find out what is causing the crash.
Nov 11 11:34:41 debian-test mysqld_safe: Number of processes running now: 0
Nov 11 11:34:41 debian-test mysqld_safe: mysqld restarted
Nov 11 11:34:41 debian-test mysqld: 101111 11:34:41 [Note] Plugin 'FEDERATED' is disabled.
Nov 11 11:34:42 debian-test mysqld: 101111 11:34:42  InnoDB: Started; log sequence number 0 12423752
Nov 11 11:34:42 debian-test mysqld: 101111 11:34:42 [Warning] Storage engine 'SPHINX' has conflicting typecode. Assigning value 42.
Nov 11 11:34:42 debian-test mysqld: 101111 11:34:42 [Note] Event Scheduler: Loaded 0 events
Nov 11 11:34:42 debian-test mysqld: 101111 11:34:42 [Note] /usr/sbin/mysqld: ready for connections.
Nov 11 11:34:42 debian-test mysqld: Version: '5.1.49-2'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Debian)

Our my.cnf:

[client]
port		= 3306
socket		= /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket		= /var/run/mysqld/mysqld.sock
nice		= 0

[mysqld]
#
# * Basic Settings
#
user		= mysql
pid-file	= /var/run/mysqld/mysqld.pid
socket		= /var/run/mysqld/mysqld.sock
port		= 3306
basedir		= /usr
datadir		= /var/lib/mysql
tmpdir		= /tmp
language	= /usr/share/mysql/english
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address		= 127.0.0.1
#
# * Fine Tuning
#
key_buffer		= 16M
max_allowed_packet	= 16M
thread_stack		= 192K
thread_cache_size       = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover         = BACKUP
#max_connections        = 100
#table_cache            = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit	= 1M
query_cache_size        = 0
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file        = /var/log/mysql/mysql.log
#general_log             = 1
#
# Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.
#
# Here you can see queries with especially long duration
#log_slow_queries	= /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id		= 1
#log_bin			= /var/log/mysql/mysql-bin.log
expire_logs_days	= 10
max_binlog_size         = 100M
#binlog_do_db		= include_database_name
#binlog_ignore_db	= include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem

#plugin-load=innodb=ha_innodb_plugin.so

[mysqldump]
quick
quote-names
max_allowed_packet	= 16M

[mysql]
#no-auto-rehash	# faster start of mysql but no tab completition

[isamchk]
key_buffer		= 16M

#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#

!includedir /etc/mysql/conf.d/

The following statement causes the crash:
CREATE TABLE `vacancy_search` (
  `id` int(10) unsigned NOT NULL,
  `weight` int(11) NOT NULL,
  `query` varchar(3072) NOT NULL,
  `group_id` int(11) DEFAULT NULL,
  KEY `query` (`query`(333))
) ENGINE=SPHINX DEFAULT CHARSET=utf8 CONNECTION='sphinx://localhost:9312/vacancies';

After that, the only possibility to drop the table is to uninstall the SPHINX-Search-Plugin.

How to repeat:
First i installed a new debian system and used the "sid" package for upgrading the system.

Then i installed the mysql-server (in the sid package it's the version 5.1.49).

After that i installed the Sphinx Search Plugin (Version 0.9.9) like it is described here:
http://xyzvn.com/linuxunix/sphinx-as-mysql-storage-engine-sphinxse.html

After that i created any search-index.

At last i wanted to create the table for the search-index.
[18 Nov 2010 22:08] Sveta Smirnova
Thank you for the report.

You wrote crash happened when you tried to create table of SPHINX storage engine, but backtrace shows it was while mysqld executed query "drop database test". How can it be?

You also use version of MySQL which is not released by us and third-party storage engine. To be sure this is MySQL bug, but not bug of package or SPHINX please try current version 5.1.52 available at http://dev.mysql.com/downloads, record all steps you did when installed Sphinx search engine, record version of Sphinx, try to repeat the problem and send us this information if crash still occurs.
[19 Dec 2010 0: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".