Bug #86542 Mysql server error
Submitted: 1 Jun 2017 13:56 Modified: 2 Jul 2017 13:40
Reporter: Amilton Teles Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.6.31-77.0 OS:Ubuntu
Assigned to: CPU Architecture:Any
Tags: bug, linux, MySQL, server, start

[1 Jun 2017 13:56] Amilton Teles
Description:
After executing a query deleting some rows from a table, mysql stopped working on the server. I can not access it anymore.

When executing the command: service mysql start
It returns me this: Job failed to start.

Follows logs:

/********** var/log/mysql/error.log **************/

170601 10:44:12 [Note] Plugin 'FEDERATED' is disabled.
170601 10:44:12 InnoDB: The InnoDB memory heap is disabled
170601 10:44:12 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170601 10:44:12 InnoDB: Compressed tables use zlib 1.2.3.4
170601 10:44:12 InnoDB: Initializing buffer pool, size = 16.0M
170601 10:44:12 InnoDB: Completed initialization of buffer pool
170601 10:44:12 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 97859737067
170601 10:44:12  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 97860968674
InnoDB: 1 transaction(s) which must be rolled back or cleaned up
InnoDB: in total 1 row operations to undo
InnoDB: Trx id counter is 1C0C5A00
170601 10:44:13  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 0 1 2 13:44:13 UTC - 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=16777216
read_buffer_size=131072
max_used_connections=0
max_threads=151
thread_count=0
connection_count=0
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 346700 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x0
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 = 0 thread_stack 0x30000
/usr/sbin/mysqld(my_print_stacktrace+0x29)[0x7fd3bf4de719]
3 /usr/sbin/mysqld(handle_fatal_signal+0x483)[0x7fd3bf3a3ae3]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0)[0x7fd3be0edcb0]
/usr/sbin/mysqld(+0x6bbd45)[0x7fd3bf640d45]
/usr/sbin/mysqld(+0x6bb2a8)[0x7fd3bf6402a8]
/usr/sbin/mysqld(+0x6bb925)[0x7fd3bf640925]
/usr/sbin/mysqld(+0x6a868b)[0x7fd3bf62d68b]
/usr/sbin/mysqld(+0x6a9b51)[0x7fd3bf62eb51]
4 /usr/sbin/mysqld(+0x64925b)[0x7fd3bf5ce25b]
/usr/sbin/mysqld(+0x6779d9)[0x7fd3bf5fc9d9]
/usr/sbin/mysqld(+0x6037b0)[0x7fd3bf5887b0]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a)[0x7fd3be0e5e9a]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7fd3bd8163fd]
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.

/***************************************************************/

How to repeat:
I added these two lines in the my.cnf file and mysql has not started yet

innodb_force_recovery = 1
innodb_buffer_pool_size = 16M

/************** 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]
innodb_force_recovery = 1
innodb_buffer_pool_size = 16M
#
# * 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		= 177.106.152.3
#
# * Fine Tuning
#
key_buffer_size		= 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-options  = 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 log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# 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/

/*******************************************************/

/*************** /var/log/syslog **********/

Jun  1 10:43:13 cpro20767 postfix/proxymap[3600]: warning: connect to mysql server 127.0.0.1: Can't connect to MySQL server on '127.0.0.1' (111)
Jun  1 10:43:13 cpro20767 postfix/trivial-rewrite[3602]: warning: proxy:mysql:/etc/postfix/mysql-virtual_transports.cf lookup error for "*"
Jun  1 10:43:13 cpro20767 postfix/trivial-rewrite[3602]: warning: proxy:mysql:/etc/postfix/mysql-virtual_transports.cf lookup error for "*"
Jun  1 10:43:13 cpro20767 postfix/proxymap[3600]: warning: connect to mysql server 127.0.0.1: Can't connect to MySQL server on '127.0.0.1' (111)
Jun  1 10:43:13 cpro20767 postfix/cleanup[3599]: warning: proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf lookup error for "root@verfone"
Jun  1 10:43:13 cpro20767 postfix/cleanup[3599]: warning: proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf lookup error for "root@verfone"
Jun  1 10:43:14 cpro20767 amavis[1011]: (01011-01) (!)connect_to_sql: unable to connect to DSN 'DBI:mysql:database=dbispconfig;host=127.0.0.1;port=3306': Can't connect to MySQL server on '127.0.0.1' (111)
Jun  1 10:43:14 cpro20767 amavis[1010]: (01010-01) (!)connect_to_sql: unable to connect to DSN 'DBI:mysql:database=dbispconfig;host=127.0.0.1;port=3306': Can't connect to MySQL server on '127.0.0.1' (111)
Jun  1 10:43:14 cpro20767 postfix/smtp[3601]: warning: connect to mysql server 127.0.0.1: Can't connect to MySQL server on '127.0.0.1' (111)
Jun  1 10:43:14 cpro20767 postfix/smtp[3601]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
Jun  1 10:43:14 cpro20767 postfix/smtp[3597]: warning: connect to mysql server 127.0.0.1: Can't connect to MySQL server on '127.0.0.1' (111)
Jun  1 10:43:14 cpro20767 postfix/smtp[3597]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
Jun  1 10:43:16 cpro20767 amavis[3615]: (03615-01) (!)connect_to_sql: unable to connect to DSN 'DBI:mysql:database=dbispconfig;host=127.0.0.1;port=3306': Can't connect to MySQL server on '127.0.0.1' (111)
Jun  1 10:43:16 cpro20767 amavis[3614]: (03614-01) (!)connect_to_sql: unable to connect to DSN 'DBI:mysql:database=dbispconfig;host=127.0.0.1;port=3306': Can't connect to MySQL server on '127.0.0.1' (111)
Jun  1 10:43:16 cpro20767 postfix/smtp[3597]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
Jun  1 10:43:16 cpro20767 postfix/smtp[3601]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
Jun  1 10:43:16 cpro20767 postfix/cleanup[3599]: warning: proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf lookup error for "root@verfone"
Jun  1 10:43:16 cpro20767 postfix/error[3618]: warning: connect to mysql server 127.0.0.1: Can't connect to MySQL server on '127.0.0.1' (111)
Jun  1 10:43:16 cpro20767 postfix/error[3618]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
Jun  1 10:43:16 cpro20767 postfix/cleanup[3599]: warning: proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf lookup error for "root@verfone"
Jun  1 10:43:16 cpro20767 postfix/error[3618]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
Jun  1 10:43:16 cpro20767 postfix/cleanup[3599]: warning: proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf lookup error for "root@verfone"
Jun  1 10:43:16 cpro20767 postfix/error[3619]: warning: connect to mysql server 127.0.0.1: Can't connect to MySQL server on '127.0.0.1' (111)
Jun  1 10:43:16 cpro20767 postfix/error[3619]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
Jun  1 10:43:16 cpro20767 postfix/error[3618]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
Jun  1 10:43:16 cpro20767 postfix/cleanup[3599]: warning: proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf lookup error for "root@verfone"
Jun  1 10:43:16 cpro20767 postfix/error[3618]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
Jun  1 10:43:16 cpro20767 postfix/cleanup[3599]: warning: proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf lookup error for "root@verfone"
Jun  1 10:43:16 cpro20767 postfix/error[3618]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
Jun  1 10:43:16 cpro20767 postfix/error[3619]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
Jun  1 10:43:16 cpro20767 postfix/cleanup[3599]: warning: proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf lookup error for "root@verfone"
Jun  1 10:43:16 cpro20767 postfix/error[3621]: warning: connect to mysql server 127.0.0.1: Can't connect to MySQL server on '127.0.0.1' (111)
Jun  1 10:43:16 cpro20767 postfix/error[3621]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
Jun  1 10:43:16 cpro20767 postfix/error[3618]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
Jun  1 10:43:16 cpro20767 postfix/cleanup[3599]: warning: proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf lookup error for "root@verfone"
Jun  1 10:43:16 cpro20767 postfix/error[3619]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
Jun  1 10:43:16 cpro20767 postfix/cleanup[3599]: warning: proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf lookup error for "root@verfone"
Jun  1 10:43:16 cpro20767 postfix/error[3621]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
Jun  1 10:43:16 cpro20767 postfix/cleanup[3599]: warning: proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf lookup error for "root@verfone"
Jun  1 10:43:16 cpro20767 postfix/error[3618]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
Jun  1 10:43:16 cpro20767 postfix/cleanup[3599]: warning: proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf lookup error for "root@verfone"
Jun  1 10:43:16 cpro20767 postfix/cleanup[3599]: warning: proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf lookup error for "root@verfone"
Jun  1 10:43:16 cpro20767 postfix/cleanup[3599]: warning: proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf lookup error for "root@verfone"
Jun  1 10:43:16 cpro20767 postfix/error[3619]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
Jun  1 10:44:10 cpro20767 kernel: [  730.684435] type=1400 audit(1496324650.295:19): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=3717 comm="apparmor_parser"
Jun  1 10:44:11 cpro20767 kernel: [  731.627636] init: mysql main process (3729) terminated with status 1
Jun  1 10:44:11 cpro20767 kernel: [  731.627705] init: mysql main process ended, respawning
Jun  1 10:44:11 cpro20767 kernel: [  731.819624] init: mysql post-start process (3730) terminated with status 1
Jun  1 10:44:11 cpro20767 kernel: [  731.854050] type=1400 audit(1496324651.463:20): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=3763 comm="apparmor_parser"
Jun  1 10:44:12 cpro20767 kernel: [  732.691669] init: mysql main process (3775) terminated with status 1
Jun  1 10:44:12 cpro20767 kernel: [  732.691782] init: mysql main process ended, respawning
Jun  1 10:44:12 cpro20767 kernel: [  732.958426] init: mysql post-start process (3776) terminated with status 1
Jun  1 10:44:12 cpro20767 kernel: [  732.989913] type=1400 audit(1496324652.599:21): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=3809 comm="apparmor_parser"
Jun  1 10:44:13 cpro20767 kernel: [  733.526061] init: mysql main process (3821) terminated with status 1
Jun  1 10:44:13 cpro20767 kernel: [  733.526127] init: mysql respawning too fast, stopped

/****************************************************/
[1 Jun 2017 17:23] MySQL Verification Team
Hi!

In order to verify the bug, we need a fully repeatable test case. Please, let us have such a test case.

Your situation looks like running out of disk, hardware failure, accidentally removed files or the errors of that kind that are not bugs.

Needless to say 16M for bufer pool is too small.
[1 Jun 2017 17:24] MySQL Verification Team
You have not even stated the version that you used ....
[1 Jun 2017 18:57] Amilton Teles
Version of Mysql 5.6.31-77.0

Buffer pool was declared today, but this line did not exist in the file my.cnf and even without the declaration of the buffer pool the error already happened
[2 Jun 2017 11:49] Amilton Teles
I do not know how to fix it, I've tried several forums and I did not find anyone with the same problem as mine.
[2 Jun 2017 13:40] MySQL Verification Team
Hi!

This is a forum for bugs. In order that any report can be treated as a bug, it must have a fully repeatable test case. That implies a set of commands that would enable us to repeat the problem that you observed.

I do not see a test case anywhere in your report. I can only see the consequences of some action, hence this is not a bug report.

In your last comments you have asked for the help. This is not a forum for free support. This is a forum for bugs, which implies  that a report contains entire repeatable test case.

If you are looking for free support or free help, it is available on "mysql" groups on Facebook, Twitter and , possibly, some other social network.
[3 Jul 2017 1: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".