Bug #68761 MySQL crashing during AutoMySQLBackup
Submitted: 25 Mar 2013 8:13 Modified: 18 Aug 2013 19:41
Reporter: Scottie Scottie Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:5.1.66 OS:Linux (CentOS release 6.4 (Final))
Assigned to: CPU Architecture:Any

[25 Mar 2013 8:13] Scottie Scottie
Description:
Hi!
The AutoMySQLBackup works very fine and 100% properly until last week when I upgrade my CentoOS from 6.3 to 6.4 version. Backups are performed automatically cease and terminate with the following error:
****************************************************************************
ERRORS REPORTED: MySQL Backup error Log for localhost - 2013-03-25_08h50m

mysqldump: Couldn't execute 'show table status like 'workers'': Lost connection to MySQL server during query (2013)
mysqlshow: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) when trying to connect

****************************************************************************

During backup (by AutoMySQLBackup in my case) service mysql restarting and I found following output in the the mysql log file /var/log/mysqld.log.

****************************************************************************
130325 08:53:20 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
130325  8:53:20  InnoDB: Initializing buffer pool, size = 8.0M
130325  8:53:20  InnoDB: Completed initialization of buffer pool
130325  8:53:21  InnoDB: Started; log sequence number 0 416442186
130325  8:53:21 [Note] Event Scheduler: Loaded 0 events
130325  8:53:21 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.66'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
130325  8:53:31  InnoDB: MySQL and InnoDB data dictionaries are out of sync.
InnoDB: Unable to find the AUTOINC column id in the InnoDB table dev/workers.
InnoDB: We set the next AUTOINC column value to 0,
InnoDB: in effect disabling the AUTOINC next value generation.
InnoDB: You can either set the next AUTOINC value explicitly using ALTER TABLE
InnoDB: or fix the data dictionary by recreating the table.
130325  8:53:31  InnoDB: MySQL and InnoDB data dictionaries are out of sync.
InnoDB: Unable to find the AUTOINC column id in the InnoDB table dev/workers.
InnoDB: We set the next AUTOINC column value to 0,
InnoDB: in effect disabling the AUTOINC next value generation.
InnoDB: You can either set the next AUTOINC value explicitly using ALTER TABLE
InnoDB: or fix the data dictionary by recreating the table.
130325  8:53:31  InnoDB: Assertion failure in thread 3014220656 in file handler/ha_innodb.cc line 8275
InnoDB: Failing assertion: auto_inc > 0
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
07:53:31 UTC - mysqld got signal 6 ;
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=8384512
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 = 337740 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0xaa29050
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 = ffffffffb3a952ec thread_stack 0x30000
/usr/libexec/mysqld(my_print_stacktrace+0x2e) [0x84c462e]
/usr/libexec/mysqld(handle_fatal_signal+0x484) [0x82eb3e4]
[0xff0400]
[0xff0416]
/lib/libc.so.6(gsignal+0x51) [0x55cb11]
/lib/libc.so.6(abort+0x17a) [0x55e3ea]
/usr/libexec/mysqld(ha_innobase::innobase_peek_autoinc()+0xac) [0x83864ac]
/usr/libexec/mysqld(ha_innobase::info_low(unsigned int, bool)+0x1d2) [0x838cde2]
/usr/libexec/mysqld(ha_innobase::info(unsigned int)+0x2d) [0x838d4fd]
/usr/libexec/mysqld() [0x830bbac]
/usr/libexec/mysqld() [0x830def0]
/usr/libexec/mysqld(get_all_tables(THD*, TABLE_LIST*, Item*)+0x6e0) [0x8318a70]
/usr/libexec/mysqld(get_schema_tables_result(JOIN*, enum_schema_table_state)+0x1e3) [0x8306483]
/usr/libexec/mysqld(JOIN::exec()+0x5fb) [0x826f80b]
/usr/libexec/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*)+0x107) [0x826b7c7]
/usr/libexec/mysqld(handle_select(THD*, st_lex*, select_result*, unsigned long)+0x164) [0x8271954]
/usr/libexec/mysqld() [0x81fb0ac]
/usr/libexec/mysqld(mysql_execute_command(THD*)+0x1074) [0x81fce54]
/usr/libexec/mysqld(mysql_parse(THD*, char*, unsigned int, char const**)+0x2ae) [0x820490e]
/usr/libexec/mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned int)+0x10ca) [0x8206caa]
/usr/libexec/mysqld(do_command(THD*)+0xf5) [0x82078f5]
/usr/libexec/mysqld(handle_one_connection+0x260) [0x81f6fa0]
/lib/libpthread.so.0() [0x704a49]
/lib/libc.so.6(clone+0x5e) [0x614aee]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (ffffffffb03045a8): is an invalid pointer
Connection ID (thread ID): 3
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.
130325 08:53:31 mysqld_safe Number of processes running now: 0
130325 08:53:31 mysqld_safe mysqld restarted
130325  8:53:31  InnoDB: Initializing buffer pool, size = 8.0M
130325  8:53:31  InnoDB: Completed initialization of buffer pool
130325  8:53:31  InnoDB: Started; log sequence number 0 416442186
130325  8:53:31 [Note] Event Scheduler: Loaded 0 events
130325  8:53:31 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.66'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
****************************************************************************

Cold you help me to resove this problem?

P.S. I'm using automysqlbackup-v3.0_rc6 version.

Best Regards,
Scottie

How to repeat:
[root@localhost ~]# automysqlbackup /etc/automysqlbackup/myserver.conf
Parsed config file "/etc/automysqlbackup/automysqlbackup.conf"

# Checking for permissions to write to folders:
base folder /var/backup ... exists ... ok.
backup folder /var/backup/db ... exists ... writable? yes. Proceeding.
[18 Jul 2013 19:41] Sveta Smirnova
Thank you for the report.

Will your server crash if you execute 

show table status like 'workers'

using MySQL command line client?
[19 Aug 2013 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".