MySQL crash when data initialized with autocommit=0 and GTID
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Invalid
|
High
|
Vlad Lesin | ||
5.1 |
Invalid
|
High
|
Vlad Lesin | ||
5.5 |
Fix Released
|
High
|
Laurynas Biveinis | ||
5.6 |
Invalid
|
High
|
Vlad Lesin |
Bug Description
With following configuration the mysqld crashes when trying to log in via mysql client.
How to reproduce:
* my.cnf:
[mysqld]
server-id = 256
user = mysql
basedir = /usr
datadir = /var/lib/mysql
port = 3306
pid-file = /var/lib/
log-error = /var/lib/
explicit_
log_bin = /var/lib/
gtid-mode = ON
log-slave-updates = 1
enforce-
autocommit = 0
* install Percona-
* clean data dir and re-initialize:
[root@vagrant-
bash-4.1$ cd /var/lib/mysql/
bash-4.1$ rm -fr *; mysql_install_db
Useless use of a constant in void context at /usr/bin/
Useless use of a constant in void context at /usr/bin/
WARNING: The host 'vagrant-
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
Installing MySQL system tables...OK
Filling help tables...OK
(...)
bash-4.1$ ls -lh
total 110M
-rw-rw---- 1 mysql mysql 12M May 22 14:48 ibdata1
-rw-rw---- 1 mysql mysql 48M May 22 14:48 ib_logfile0
-rw-rw---- 1 mysql mysql 48M May 22 14:48 ib_logfile1
drwx------ 2 mysql mysql 4.0K May 22 14:48 mysql
-rw-rw---- 1 mysql mysql 62K May 22 14:48 mysql-bin.000001
-rw-rw---- 1 mysql mysql 1.2M May 22 14:48 mysql-bin.000002
-rw-rw---- 1 mysql mysql 64 May 22 14:48 mysql-bin.index
-rw-rw---- 1 mysql mysql 5.2K May 22 14:48 mysql.err
drwx------ 2 mysql mysql 4.0K May 22 14:48 performance_schema
drwx------ 2 mysql mysql 4.0K May 22 14:48 test
* start mysql
[root@vagrant-
Starting MySQL (Percona Server).. SUCCESS!
[root@vagrant-
2014-05-22 14:50:44 16586 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 739fe40f-
2014-05-22 14:50:44 16586 [Note] RSA private key file not found: /var/lib/
2014-05-22 14:50:44 16586 [Note] RSA public key file not found: /var/lib/
2014-05-22 14:50:44 16586 [Note] Server hostname (bind-address): '*'; port: 3306
2014-05-22 14:50:44 16586 [Note] IPv6 is available.
2014-05-22 14:50:44 16586 [Note] - '::' resolves to '::';
2014-05-22 14:50:44 16586 [Note] Server socket created on IP: '::'.
2014-05-22 14:50:44 16586 [Note] Event Scheduler: Loaded 0 events
2014-05-22 14:50:44 16586 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.6.17-
* try login:
[root@vagrant-
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 95
* error log:
14:51:39 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.
Please help us make Percona Server better by reporting any
bugs at http://
key_buffer_
read_buffer_
max_used_
max_threads=153
thread_count=1
connection_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x33482e0
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 = 7f443805ed48 thread_stack 0x40000
/usr/sbin/
/usr/sbin/
/lib64/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/lib64/
/lib64/
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): 1
Status: NOT_KILLED
You may download the Percona Server operations manual by visiting
http://
in the manual which will help you identify the cause of the crash.
140522 14:51:39 mysqld_safe Number of processes running now: 0
140522 14:51:39 mysqld_safe mysqld restarted
(...)
* mysql recovers but then crashes on evey login attempt
Related branches
- Laurynas Biveinis (community): Needs Information
- Laurynas Biveinis (community): Needs Information
-
Diff: 86 lines (+52/-2) (has conflicts)2 files modifiedscripts/mysql_install_db.pl.in (+28/-2)
sql/sql_acl.cc (+24/-0)
- Laurynas Biveinis (community): Needs Information
-
Diff: 47 lines (+28/-2)1 file modifiedPercona-Server/scripts/mysql_install_db.pl.in (+28/-2)
Confirmed with my own build from recent bzr sources suing commands like these:
1000 rm CMakeCache.txt INSTALL_ PREFIX= /home/openxs/ dbs/p5. 6 -DCMAKE_ BUILD_TYPE= RelWithDebInfo -DBUILD_ CONFIG= mysql_release -DFEATURE_ SET=community -DWITH_ EMBEDDED_ SERVER= OFF
1001 cmake . -DCMAKE_
1002 make
1003 make install && make clean
...
1015 cd dbs/p5.6
1016 ls
1017 ls data/
1018 rm -rf data/*
...
1026 scripts/ mysql_install_ db --no-defaults --server-id=256 --explicit_ defaults_ for_timestamp= 1 --log-bin --gtid-mode=ON --log-slave- updates= 1 --enforce- gtid-consistenc y=1 --autocommit=0 defaults_ for_timestamp= 1 --log-bin --gtid-mode=ON --log-slave- updates= 1 --enforce- gtid-consistenc y=1 --autocommit=0 &
1027 ls -lh data/
1028 bin/mysqld_safe --no-defaults --server-id=256 --explicit_
1029 tail data/chief.err
1030 bin/mysql -uroot test
1031 tail -80 data/chief.err
This is what we see in the error log:
[openxs@chief p5.6]$ bin/mysql -uroot test
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 95
[openxs@chief p5.6]$ 140523 12:38:27 mysqld_safe Number of processes running now: 0
140523 12:38:27 mysqld_safe mysqld restarted
[openxs@chief p5.6]$ tail -80 data/chief.err Please help us make Percona Server better by reporting any bugs.percona. com/
bugs at http://
key_buffer_ size=8388608 size=131072 connections= 1 size)*max_ threads = 69168 K bytes of memory
read_buffer_
max_used_
max_threads=153
thread_count=1
connection_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x28b1d50 dbs/p5. 6/bin/mysqld( my_print_ stacktrace+ 0x35)[0x902035] dbs/p5. 6/bin/mysqld( handle_ fatal_signal+ 0x4c4)[ 0x66cd24] libpthread. so.0[0x3ffac0ee b0] dbs/p5. 6/bin/mysqld[ 0x68f629] dbs/p5. 6/bin/mysqld[ 0x68fc98] dbs/p5. 6/bin/mysqld[ 0x69007e] dbs/p5. 6/bin/mysqld[ 0x67d779] dbs/p5. 6/bin/mysqld[ 0x67d944] dbs/p5. 6/bin/mysqld( _Z16acl_ authenticateP3T HDj+0x1c0) [0x690430] dbs/p5. 6/bin/mysqld[ 0x6bcb2a] dbs/p5. 6/bin/mysqld( _Z16login_ connectionP3THD +0x4d)[ 0x6be4bd] dbs/p5. 6/bin/mysqld( _Z22thd_ prepare_ connectionP3THD +0x24)[ 0x6bec14] dbs/p5. 6/bin/mysqld( _Z24do_ handle_ one_connectionP 3THD+0x135) [0x6bef15] dbs/p5. 6/bin/mysqld( handle_ one_connection+ 0x47)[0x6bf017] dbs/p5. 6/bin/mysqld( pfs_spawn_ thread+ 0x12a)[ 0x98fa0a] libpthread. so.0[0x3ffac06c cb] libc.so. 6(clone+ 0x6d)[0x3ffa8e0 c2d]
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 = 7fa5e006be10 thread_stack 0x40000
/home/openxs/
/home/openxs/
/lib64/
/home/openxs/
/home/openxs/
/home/openxs/
/home/openxs/
/home/openxs/
/home/openxs/
/home/openxs/
/home/openxs/
/home/openxs/
/home/openxs/
/home/openxs/
/home/openxs/
/lib64/
/lib64/
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0): Connection ID (thread ID): 1
Status: NOT_KILLED
...