Comment 7 for bug 1426345

Revision history for this message
Jericho Rivera (jericho-rivera) wrote : Re: mysql 5.6. crashes when dropping and creating view from procedure.

Crash is easy to reproduce when query_response_time_stats = ON

Server version: 5.6.23-72.1 Percona Server (GPL), Release 72.1, Revision 0503478

| QUERY_RESPONSE_TIME_AUDIT | ACTIVE | AUDIT | query_response_time.so | GPL |
| QUERY_RESPONSE_TIME | ACTIVE | INFORMATION SCHEMA | query_response_time.so | GPL |
| QUERY_RESPONSE_TIME_READ | ACTIVE | INFORMATION SCHEMA | query_response_time.so | GPL |
| QUERY_RESPONSE_TIME_WRITE | ACTIVE | INFORMATION SCHEMA | query_response_time.so | GPL |
+-----------------------------+----------+--------------------+------------------------+---------+

Test run with query_response_time_stats = OFF
mysql> select @@global.query_response_time_stats;
+------------------------------------+
| @@global.query_response_time_stats |
+------------------------------------+
| 0 |
+------------------------------------+
1 row in set (0.00 sec)

mysql> use sample;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> call recreate_views_for_stats();
+------------------------+
| PROCEDURE_VERSION_INFO |
+------------------------+
| v 1.11 |
+------------------------+
1 row in set (0.01 sec)

+---------------+---------------+-------------+
| views_dropped | views_created | views_total |
+---------------+---------------+-------------+
| 2 | 3 | 3 |
+---------------+---------------+-------------+
1 row in set (0.01 sec)

Query OK, 0 rows affected (0.01 sec)

mysql> call recreate_views_for_stats();
+------------------------+
| PROCEDURE_VERSION_INFO |
+------------------------+
| v 1.11 |
+------------------------+
1 row in set (0.00 sec)

+---------------+---------------+-------------+
| views_dropped | views_created | views_total |
+---------------+---------------+-------------+
| 3 | 3 | 3 |
+---------------+---------------+-------------+
1 row in set (0.01 sec)

Query OK, 0 rows affected (0.01 sec)

Then turned ON

mysql> set @@global.query_response_time_stats=ON;
Query OK, 0 rows affected (0.00 sec)

mysql> call recreate_views_for_stats();
+------------------------+
| PROCEDURE_VERSION_INFO |
+------------------------+
| v 1.11 |
+------------------------+
1 row in set (0.00 sec)

ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql> 150312 19:25:38 mysqld_safe Number of processes running now: 0
150312 19:25:38 mysqld_safe mysqld restarted

mysql> exit
Bye

12:00:41 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://bugs.percona.com/

key_buffer_size=8388608
read_buffer_size=131072
max_used_connections=1
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_size)*max_threads = 69184 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x29ef2a0
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 = 7f343b01f050 thread_stack 0x40000
/usr/local/mysql/bin/mysqld(my_print_stacktrace+0x2c)[0x8f0d5c]
/usr/local/mysql/bin/mysqld(handle_fatal_signal+0x461)[0x67a7d1]
/lib64/libpthread.so.0[0x7f3466cd5ca0]
/usr/local/mysql/bin/mysqld[0xb8f618]
/usr/local/mysql/bin/mysqld(my_hash_first_from_hash_value+0xdd)[0x8d39bd]
/usr/local/mysql/bin/mysqld(my_hash_search+0x11)[0x8d3b01]
/usr/local/mysql/lib/mysql/plugin/query_response_time.so[0x7f343adddb22]
/usr/local/mysql/bin/mysqld[0x6aa205]
/usr/local/mysql/bin/mysqld(_Z18mysql_audit_notifyP3THDjjz+0xa8)[0x6aa3d8]
/usr/local/mysql/bin/mysqld[0x828524]
/usr/local/mysql/bin/mysqld(_ZN13sp_instr_stmt7executeEP3THDPj+0x30c)[0x829fdc]
/usr/local/mysql/bin/mysqld(_ZN7sp_head7executeEP3THDb+0x44a)[0x68089a]
/usr/local/mysql/bin/mysqld(_ZN7sp_head17execute_procedureEP3THDP4ListI4ItemE+0x636)[0x683ae6]
/usr/local/mysql/bin/mysqld(_Z21mysql_execute_commandP3THD+0x13fd)[0x6fb50d]
/usr/local/mysql/bin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x5c8)[0x701098]
/usr/local/mysql/bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0xff9)[0x702809]
/usr/local/mysql/bin/mysqld(_Z24do_handle_one_connectionP3THD+0x162)[0x6d0172]
/usr/local/mysql/bin/mysqld(handle_one_connection+0x40)[0x6d0260]
/usr/local/mysql/bin/mysqld(pfs_spawn_thread+0x143)[0x927e53]
/lib64/libpthread.so.0[0x7f3466ccd83d]
/lib64/libc.so.6(clone+0x6d)[0x7f34654ccfcd]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (2b5cd10): drop view if exists sample_stats.t1
Connection ID (thread ID): 2
Status: NOT_KILLED

You may download the Percona Server operations manual by visiting
http://www.percona.com/software/percona-server/. You may find information
in the manual which will help you identify the cause of the crash.
150312 08:00:41 mysqld_safe Number of processes running now: 0
150312 08:00:41 mysqld_safe mysqld restarted

Resolve Stack:
0x8f15dc my_print_stacktrace + 44
0x67acb1 handle_fatal_signal + 1121
0x7f1a6b1aaca0 _end + 1776430904
0xb902f8 my_strnncoll_utf8 + 248
0x8d41ad my_hash_first_from_hash_value + 221
0x8d42f1 my_hash_search + 17
0x7f1a4d46fb22 _end + 1276018106
0x6aa5a5 _ZL21general_class_handlerP3THDjP13__va_list_tag + 517
0x6aa778 mysql_audit_notify(THD*, unsigned int, unsigned int, ...) + 168
0x828a34 _ZL19mysql_audit_generalP3THDjiPKc.constprop.140 + 708
0x82a4ec sp_instr_stmt::execute(THD*, unsigned int*) + 780
0x680d7a sp_head::execute(THD*, bool) + 1098
0x683fc6 sp_head::execute_procedure(THD*, List<Item>*) + 1590
0x6fb91d mysql_execute_command(THD*) + 5117
0x7014a8 mysql_parse(THD*, char*, unsigned int, Parser_state*) + 1480
0x702c19 dispatch_command(enum_server_command, THD*, char*, unsigned int) + 4089
0x6d0502 do_handle_one_connection(THD*) + 354
0x6d05f0 handle_one_connection + 64
0x9286d3 pfs_spawn_thread + 323
0x7f1a6b1a283d _end + 1776397013
0x7f1a699a1fcd _end + 1751229029