Crash on querying I_S.xtradb_rseg when innodb_rollback_segments/innodb_undo_logs lower then default
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
High
|
Laurynas Biveinis | ||
5.1 |
Invalid
|
Undecided
|
Unassigned | ||
5.5 |
Invalid
|
Undecided
|
Unassigned | ||
5.6 |
Fix Released
|
High
|
Laurynas Biveinis |
Bug Description
Since MySQL 5.6 or Percona Server 5.6, it is possible to initialize innodb system table space with lower then default (128) number of rollback segments. Unfortunately this leads to server crash when selecting from information_
If the number of rollback_segments is default 128, no crash happens. Applies only to PS 5.6.x as there seems to be no way to initialize lower then default number in MySQL/PS 5.5.x
How to quickly reproduce using mysqlsandbox:
* edit MySQL configuration (my.sandbox.cnf) and add:
innodb_undo_logs=32
* re-initalize InnoDB tablespaces, from sandbox directory run:
./clear
* start Percona Server - InnoDB table spaces and logs are re-created:
./start
* check related variables and status:
mysql [localhost] {msandbox} ((none)) > select @@innodb_
+------
| @@innodb_
+------
| 32 |
+------
1 row in set (0.00 sec)
mysql [localhost] {msandbox} ((none)) > select @@innodb_undo_logs;
+------
| @@innodb_undo_logs |
+------
| 32 |
+------
1 row in set (0.01 sec)
mysql [localhost] {msandbox} ((none)) > show status like 'Innodb_
| Variable_name | Value |
+------
| Innodb_
+------
1 row in set (0.00 sec)
* select from xtradb_rseg system view
mysql [localhost] {msandbox} ((none)) > select * from information_
ERROR 2013 (HY000): Lost connection to MySQL server during query
Error log:
2013-12-12 10:58:07 24485 [Note] /home/sandbox/
Version: '5.6.14-rel62.0' socket: '/tmp/mysql_
10:12:02 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.
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: 0x3362c10
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 = 7fc3c3a42d58 thread_stack 0x40000
/home/sandbox/
/home/sandbox/
/lib64/
/home/sandbox/
/home/sandbox/
/home/sandbox/
/home/sandbox/
/home/sandbox/
/home/sandbox/
/home/sandbox/
/home/sandbox/
/home/sandbox/
/home/sandbox/
/home/sandbox/
/home/sandbox/
/home/sandbox/
/lib64/
/lib64/
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7fc3b0004ff0): select * from information_
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.
131212 11:12:02 mysqld_safe Number of processes running now: 0
131212 11:12:02 mysqld_safe mysqld restarted
2013-12-12 11:12:02 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_
2013-12-12 11:12:02 24706 [Warning] Buffered warning: Changed limits: max_open_files: 1024 (requested 5000)
2013-12-12 11:12:02 24706 [Warning] Buffered warning: Changed limits: table_cache: 431 (requested 2000)
2013-12-12 11:12:02 24706 [Note] Plugin 'FEDERATED' is disabled.
2013-12-12 11:12:02 24706 [Note] InnoDB: The InnoDB memory heap is disabled
2013-12-12 11:12:02 24706 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2013-12-12 11:12:02 24706 [Note] InnoDB: Compressed tables use zlib 1.2.3
2013-12-12 11:12:02 24706 [Note] InnoDB: Using Linux native AIO
2013-12-12 11:12:02 24706 [Note] InnoDB: Using CPU crc32 instructions
2013-12-12 11:12:02 24706 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2013-12-12 11:12:02 24706 [Note] InnoDB: Completed initialization of buffer pool
2013-12-12 11:12:02 24706 [Note] InnoDB: Highest supported file format is Barracuda.
2013-12-12 11:12:02 24706 [Note] InnoDB: The log sequence numbers 0 and 0 in ibdata files do not match the log sequence number 445136 in the ib_logfiles!
2013-12-12 11:12:02 24706 [Note] InnoDB: Database was not shutdown normally!
2013-12-12 11:12:02 24706 [Note] InnoDB: Starting crash recovery.
2013-12-12 11:12:02 24706 [Note] InnoDB: Reading tablespace information from the .ibd files...
2013-12-12 11:12:02 24706 [Note] InnoDB: Restoring possible half-written data pages
2013-12-12 11:12:02 24706 [Note] InnoDB: from the doublewrite buffer...
2013-12-12 11:12:03 24706 [Note] InnoDB: 32 rollback segment(s) are active.
2013-12-12 11:12:03 24706 [Note] InnoDB: Waiting for purge to start
2013-12-12 11:12:03 24706 [Note] InnoDB: Percona XtraDB (http://
2013-12-12 11:12:03 24706 [Note] RSA private key file not found: /home/przemek/
2013-12-12 11:12:03 24706 [Note] RSA public key file not found: /home/przemek/
2013-12-12 11:12:03 24706 [Note] Server hostname (bind-address): '127.0.0.1'; port: 25614
2013-12-12 11:12:03 24706 [Note] - '127.0.0.1' resolves to '127.0.0.1';
2013-12-12 11:12:03 24706 [Note] Server socket created on IP: '127.0.0.1'.
2013-12-12 11:12:03 24706 [Note] Event Scheduler: Loaded 0 events
2013-12-12 11:12:03 24706 [Note] /home/sandbox/
Version: '5.6.14-rel62.0' socket: '/tmp/mysql_
Related branches
- Alexey Kopytov (community): Approve
- Laurynas Biveinis: Pending requested
-
Diff: 97 lines (+72/-0)4 files modifiedPercona-Server/mysql-test/suite/innodb/r/xtradb_rseg_bug_1260259.result (+47/-0)
Percona-Server/mysql-test/suite/innodb/t/xtradb_rseg_bug_1260259-master.opt (+2/-0)
Percona-Server/mysql-test/suite/innodb/t/xtradb_rseg_bug_1260259.test (+21/-0)
Percona-Server/storage/innobase/handler/xtradb_i_s.cc (+2/-0)
This is easy to confirm:
openxs@ ao756:~ /dbs/p5. 6$ bin/mysql --no-defaults -uroot test
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.14-debug MySQL Community Server (GPL)
Copyright (c) 2009-2013 Percona LLC and/or its affiliates
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show variables like 'innodb_undo%'; ------- ------- -----+- ------- ------- ------- ------+ ------- ------- -----+- ------- ------- ------- ------+ undo_directory | /home/openxs/ dbs/p5. 6/undo | undo_tablespace s | 1 | ------- ------- -----+- ------- ------- ------- ------+
+------
| Variable_name | Value |
+------
| innodb_
| innodb_undo_logs | 32 |
| innodb_
+------
3 rows in set (0,00 sec)
mysql> select * from information_ schema. XTRADB_ RSEG;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql> 131212 12:26:36 mysqld_safe Number of processes running now: 0
131212 12:26:36 mysqld_safe mysqld restarted
mysql> exit ao756:~ /dbs/p5. 6$ tail -100 data/ao756.err 2013-12-12 12:25:41 31028 [Note] InnoDB: 32 rollback segment(s) are active. www.percona. com) 5.6.14-60.3 started; log sequence number 432817 6317-11e3- 8907-b888e3aea4 71. dbs/p5. 6/bin/mysqld: ready for connections. bugs.percona. com/
Bye
openxs@
2013-12-12 12:25:41 31028 [Note] InnoDB: Waiting for purge to start
2013-12-12 12:25:41 31028 [Note] InnoDB: Percona XtraDB (http://
2013-12-12 12:25:41 31028 [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: c06f915e-
2013-12-12 12:25:41 31028 [Note] Server hostname (bind-address): '*'; port: 3306
2013-12-12 12:25:41 31028 [Note] IPv6 is available.
2013-12-12 12:25:41 31028 [Note] - '::' resolves to '::';
2013-12-12 12:25:41 31028 [Note] Server socket created on IP: '::'.
2013-12-12 12:25:41 31028 [Note] Event Scheduler: Loaded 0 events
2013-12-12 12:25:41 31028 [Note] /home/openxs/
Version: '5.6.14-debug' socket: '/tmp/mysql.sock' port: 3306 MySQL Community Server (GPL)
10:26:36 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.
Please help us make Percona Server better by reporting any
bugs at http://
key_buffer_ size=8388608 size=131072 connections= 1 size)*max_ threads = 69189 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 s...