Bug #67361 MySQL (5.5.24-0ubuntu0.12.04.1) crashes when connecting with TCP
Submitted: 24 Oct 2012 15:46 Modified: 24 Oct 2012 17:01
Reporter: Zach Moshe Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.5.24 OS:Linux (Ubuntu 12.04)
Assigned to: CPU Architecture:Any

[24 Oct 2012 15:46] Zach Moshe
Description:
Running Ubuntu 12.04, MySQL 5.5.24 (was installed with apt-get install mysql-server) on a virtual machine (VirtualBox). Host is Windows7.
Guest machine has 8GB RAM and 4 processors.

When I try to connect through UNIX socket ('mysql' or 'mysql -h localhost' from commandline) - works fine.

When I try to use TCP ('mysql -h 127.0.0.1') - the server crashes. Both connections are from the same machine, same terminal.

I run mysqld from console to see the error messages and got this whenever I try to connect with TCP : 

-------------------------------------------------
121024 16:59:09 [Note] mysqld: ready for connections.
Version: '5.5.24-0ubuntu0.12.04.1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu)
14:59:37 UTC - mysqld got signal 8 ;
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=16777216
read_buffer_size=131072
max_used_connections=1
max_threads=151
thread_count=1
connection_count=1
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 346679 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7fd27a8ccb10
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 = 7fd277befe60 thread_stack 0x30000
mysqld(my_print_stacktrace+0x29)[0x7fd278195459]
mysqld(handle_fatal_signal+0x483)[0x7fd27805b1d3]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0)[0x7fd276b83cb0]
/usr/share/appfirst/libwrap.so.1.0.1(af_timer_now+0x12f)[0x7fd2777fdc53]
/usr/share/appfirst/libwrap.so.1.0.1(intercept_write+0x259)[0x7fd277801594]
/usr/share/appfirst/libwrap.so.1.0.1(write+0x28)[0x7fd2778016e3]
mysqld(net_real_write+0xaa)[0x7fd277eccfea]
mysqld(net_flush+0x1b)[0x7fd277ecd4cb]
mysqld(_Z11net_send_okP3THDjjyyPKc+0x178)[0x7fd277ed3098]
mysqld(_ZN8Protocol13end_statementEv+0x4c)[0x7fd277ed343c]
mysqld(_Z22thd_prepare_connectionP3THD+0x6a)[0x7fd277feb39a]
mysqld(_Z24do_handle_one_connectionP3THD+0xf8)[0x7fd277feb708]
mysqld(handle_one_connection+0x50)[0x7fd277feb830]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a)[0x7fd276b7be9a]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7fd2762accbd]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0): is an invalid pointer
Connection ID (thread ID): 2
Status: 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.
-------------------------------------------------

My /etc/mysql/my.cnf : 
-------------------------------------------------
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
# 
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[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
lc-messages-dir = /usr/share/mysql
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        = 16M
#
# * 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

[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/
-------------------------------------------------

How to repeat:
1. start mysql
2. run this from console - mysql -h 127.0.0.1  (or use any other software that uses TCP).
[24 Oct 2012 16:23] MySQL Verification Team
Thank you for the bug report. I can't repeat with last version. Please try it:

http://dev.mysql.com/downloads/mysql/

Thanks.
[24 Oct 2012 17:01] Zach Moshe
I've tried the latest one too (5.5.28). 
Removed all installations of mysql-server and mysql-client and installed the deb package from the site. Still get the same.

I guess it's one of the dependencies. I'll try to install a new debian machine (debian this time and not ubuntu) and do a fresh install to see if it changes anything.