Comment 0 for bug 1417130

Revision history for this message
Thomas Roog (thomas.roog) wrote : Percona XtraDB Cluster 5.6 crashes on ALTER TABLE when sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES'

Percona XtraDB 5.6 crashes on ALTER table with VARCHAR field when sql_mode !=''. It's repeatable. Please help.

Stack:
Ubuntu 14.04.1 LTS
percona-nagios-plugins 1.1.4-1
percona-toolkit 2.2.12
percona-xtrabackup 2.2.8-5059-1.trusty
percona-xtradb-cluster-client-5.6 5.6.21-25.8-938.trusty
percona-xtradb-cluster-common-5.6 5.6.21-25.8-938.trusty
percona-xtradb-cluster-galera-3.x 3.8.3390.trusty
percona-xtradb-cluster-server-5.6 5.6.21-25.8-938.trusty

Test case:
/*[19:27:58][ 0 ms]*/ Set character_set_connection=utf8
/*[19:27:58][ 16 ms]*/ Set character_set_results=utf8
/*[19:27:58][ 0 ms]*/ Set character_set_client=utf8
/*[19:27:58][ 0 ms]*/ set sql_mode=''
/*[19:29:13][ 0 ms]*/ set autocommit=1
/*[19:29:15][ 0 ms]*/ use `mydatabase`
/*[19:29:17][ 703 ms]*/ ALTER TABLE `mydatabase`.`accountactivitypaymentdetails` CHANGE COLUMN `pan` `pan` VARCHAR(45) NULL
/*[19:29:19][ 516 ms]*/ ALTER TABLE `mydatabase`.`accountactivitypaymentdetails` CHANGE COLUMN `paymentType` `paymentType` VARCHAR(45) NULL
/*[19:29:23][ 282 ms]*/ ALTER TABLE `mydatabase`.`accountsystem` ADD COLUMN `hostname` VARCHAR(255) NULL AFTER `pspType`
/*[19:29:30][ 0 ms]*/ UPDATE `mydatabase`.`accountsystem` SET `hostname`='mobile-uat.chompportal.com' WHERE `tag`='CHOMP-portal'
[..]

Bad (I run it from Sqlyog and galera node 1 terminated immediately):
/*[19:30:19][ 0 ms]*/ SET autocommit=0
/*[19:30:19][ 0 ms]*/ SELECT @@session.autocommit
/*[19:30:20][ 0 ms]*/ SET character_set_results = NULL
/*[19:30:21][ 15 ms]*/ SET sql_mode='NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES'
/*[19:30:29][ 843 ms]*/ ALTER TABLE `mydatabase`.`accountactivitypaymentdetails` CHANGE COLUMN `pan` `pan` VARCHAR(60) NULL
Error Code : 2013
Lost connection to MySQL server during query
(875 ms taken)

Error:
2015-01-29 09:09:45 5461 [ERROR] Transaction not registered for MySQL 2PC, but transaction is active
2015-01-29 09:09:45 7f20a485b700 InnoDB: Assertion failure in thread 139778175907584 in file row0mysql.cc line 4041
InnoDB: Failing assertion: table->n_rec_locks == 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.6/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
09:09:45 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.
Please help us make Percona XtraDB Cluster better by reporting any
bugs at https://bugs.launchpad.net/percona-xtradb-cluster

key_buffer_size=33554432
read_buffer_size=131072
max_used_connections=93
max_threads=202
thread_count=48
connection_count=46
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 113388 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x1ca6410
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 = 7f20a485ae20 thread_stack 0x40000
/usr/sbin/mysqld(my_print_stacktrace+0x2c)[0x923b1c]
/usr/sbin/mysqld(handle_fatal_signal+0x352)[0x67cac2]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10340)[0x7f251d61c340]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x39)[0x7f251ca5cbb9]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x148)[0x7f251ca5ffc8]
/usr/sbin/mysqld[0x9ec969]
/usr/sbin/mysqld[0x949c77]
/usr/sbin/mysqld(_Z15ha_delete_tableP3THDP10handlertonPKcS4_S4_b+0x157)[0x5b26e7]
/usr/sbin/mysqld(_Z14quick_rm_tableP3THDP10handlertonPKcS4_j+0x1a2)[0x75c7b2]
/usr/sbin/mysqld(_Z17mysql_alter_tableP3THDPcS1_P24st_ha_create_informationP10TABLE_LISTP10Alter_infojP8st_orderb+0x2ccc)[0x766c1c]
/usr/sbin/mysqld(_ZN19Sql_cmd_alter_table7executeEP3THD+0x582)[0x854db2]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x2681)[0x70b8d1]
/usr/sbin/mysqld[0x711728]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x196d)[0x71355d]
/usr/sbin/mysqld(_Z10do_commandP3THD+0x1f2)[0x714ed2]
/usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x2ed)[0x6d7a3d]
/usr/sbin/mysqld(handle_one_connection+0x39)[0x6d7ad9]
/usr/sbin/mysqld(pfs_spawn_thread+0x140)[0xb41570]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x8182)[0x7f251d614182]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f251cb20fbd]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f207002f3c0): is an invalid pointer
Connection ID (thread ID): 693168
Status: NOT_KILLED