trellix-enterprise / mysql-audit

AUDIT Plugin for MySQL. See wiki and readme for description. If you find the plugin useful, please star us on GitHub. We love stars and it's a great way to show your feedback.
Other
239 stars 57 forks source link

Percona-XtraDB-Cluster-56 crashed (CREATE statement) #167

Open 529 opened 7 years ago

529 commented 7 years ago

I'm trying to run the plugin on Percona-XtraDB-Cluster-56 (3node) but unfortunatelly it crashes each time when I operate below.

I reported the following issue before, but the same problem has occurred in the "create" statement. https://github.com/mcafee/mysql-audit/issues/165

status

mysql> status;
--------------
mysql  Ver 14.14 Distrib 5.6.34-79.1, for Linux (x86_64) using  6.2

Connection id:      34
Current database:
Current user:       app_user@localhost
SSL:            Not in use
Current pager:      stdout
Using outfile:      ''
Using delimiter:    ;
Server version:     5.6.34-79.1-56-log Percona XtraDB Cluster (GPL), Release rel79.1, Revision 7c38350, WSREP version 26.19, wsrep_26.19
Protocol version:   10
Connection:     Localhost via UNIX socket
Server characterset:    utf8
Db     characterset:    utf8
Client characterset:    utf8
Conn.  characterset:    utf8
UNIX socket:        /var/lib/mysql/mysql.sock
Uptime:         48 sec

Threads: 18  Questions: 66  Slow queries: 0  Opens: 75  Flush tables: 1  Open tables: 68  Queries per second avg: 1.375
--------------

my.cnf

(node1)(node2)(node3)

[mysqld]
loose-audit_offsets=7792, 7848, 4480, 5120, 88, 2720, 96, 0, 32, 104, 152, 7968, 4872, 2800, 2808, 2812, 568, 0, 0, 7160, 7184, 7168
plugin-load-add=libaudit_plugin.so
audit_json_file = ON
audit_json_log_file=/var/log/mysqld-audit.json

plugin version

(node1)(node2)(node3)

mysql> show global status like 'AUDIT_version';
+---------------+-----------+
| Variable_name | Value     |
+---------------+-----------+
| Audit_version     | 1.1.2-691 |
+---------------+-----------+
1 row in set (0.00 sec)

operation

(node1)
mysql> create table t (id int, name varchar(255));

Then node2 and node3 crash.

error.log

(node2)(node3)

11:58:39 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 XtraDB Cluster better by reporting any
bugs at https://bugs.launchpad.net/percona-xtradb-cluster

key_buffer_size=8388608
read_buffer_size=131072
max_used_connections=2
max_threads=504
thread_count=17
connection_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 112233 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7f98f0000990
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 = 7f9a941449a0 thread_stack 0x40000
/usr/sbin/mysqld(my_print_stacktrace+0x3b)[0x91113b]
/usr/sbin/mysqld(handle_fatal_signal+0x471)[0x67dc31]
/usr/lib64/libpthread.so.0(+0xf100)[0x7f9b42312100]
/usr/lib64/mysql/plugin/libaudit_plugin.so(+0x12957)[0x7f9a95b7d957]
/usr/lib64/mysql/plugin/libaudit_plugin.so(+0x10f28)[0x7f9a95b7bf28]
/usr/lib64/mysql/plugin/libaudit_plugin.so(+0x120e9)[0x7f9a95b7d0e9]
/usr/lib64/mysql/plugin/libaudit_plugin.so(+0x121b1)[0x7f9a95b7d1b1]
/usr/lib64/mysql/plugin/libaudit_plugin.so(+0xeaf8)[0x7f9a95b79af8]
/usr/lib64/mysql/plugin/libaudit_plugin.so(+0xf9ad)[0x7f9a95b7a9ad]
/usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x638)[0x70c458]
/usr/sbin/mysqld(_ZN15Query_log_event14do_apply_eventEPK14Relay_log_infoPKcj+0x532)[0x89c032]
/usr/sbin/mysqld(_ZN9Log_event11apply_eventEP14Relay_log_info+0x6a)[0x89a43a]
/usr/sbin/mysqld(_Z14wsrep_apply_cbPvPKvmjPK14wsrep_trx_meta+0x5d0)[0x5b2390]
/usr/lib64/libgalera_smm.so(_ZNK6galera9TrxHandle5applyEPvPF15wsrep_cb_statusS1_PKvmjPK14wsrep_trx_metaERS6_+0xd5)[0x7f9b1dc027b5]
/usr/lib64/libgalera_smm.so(+0x1f5ae0)[0x7f9b1dc3fae0]
/usr/lib64/libgalera_smm.so(_ZN6galera13ReplicatorSMM9apply_trxEPvPNS_9TrxHandleE+0xd4)[0x7f9b1dc42534]
/usr/lib64/libgalera_smm.so(_ZN6galera13ReplicatorSMM11process_trxEPvPNS_9TrxHandleE+0x10e)[0x7f9b1dc4579e]
/usr/lib64/libgalera_smm.so(_ZN6galera15GcsActionSource8dispatchEPvRK10gcs_actionRb+0x1b8)[0x7f9b1dc21d48]
/usr/lib64/libgalera_smm.so(_ZN6galera15GcsActionSource7processEPvRb+0x57)[0x7f9b1dc234e7]
/usr/lib64/libgalera_smm.so(_ZN6galera13ReplicatorSMM10async_recvEPv+0x7b)[0x7f9b1dc45ddb]
/usr/lib64/libgalera_smm.so(galera_recv+0x1d)[0x7f9b1dc557bd]
/usr/sbin/mysqld[0x5b2ef4]
/usr/sbin/mysqld(start_wsrep_THD+0x293)[0x597203]
/usr/lib64/libpthread.so.0(+0x7dc5)[0x7f9b4230adc5]
/usr/lib64/libc.so.6(clone+0x6d)[0x7f9b40558ced]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f98f000fa49): create table t (id int, name varchar(255))
Connection ID (thread ID): 8
Status: NOT_KILLED

You may download the Percona XtraDB Cluster operations manual by visiting
http://www.percona.com/software/percona-xtradb-cluster/. You may find information
in the manual which will help you identify the cause of the crash.
Writing a core file
170510 20:58:42 mysqld_safe Number of processes running now: 0
170510 20:58:42 mysqld_safe WSREP: not restarting wsrep node automatically
170510 20:58:42 mysqld_safe mysqld from pid file /var/run/mysql/mysqld.pid ended

Any help would be appreciated.

529 commented 7 years ago

I need to reconfirm...

529 commented 7 years ago

sorry.. It reproduced. Any help would be appreciated.

aharonrobbins commented 7 years ago

Thanks for the report. We don't officially support Percona. We will try to investigate, but I'm not sure when we'll have a fix.

Does this happen on a two-node cluster?

aharonrobbins commented 7 years ago

I misspoke in my previous comment. We do support Percona, but we don't automatically extract offsets for Percona releases.

In any case, knowing if this happens on a two-node cluster would be helpful. We will try to investigate.

Thanks.

529 commented 7 years ago

thanks for your reply.

We do support Percona, but we don't automatically extract offsets for Percona releases. I understand. thanks!

this also happes on a two-node cluster.

error.log

10:22:57 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 XtraDB Cluster better by reporting any
bugs at https://bugs.launchpad.net/percona-xtradb-cluster

key_buffer_size=8388608
read_buffer_size=131072
max_used_connections=2
max_threads=504
thread_count=17
connection_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 112233 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7f0664000990
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 = 7f06b96679a0 thread_stack 0x40000
/usr/sbin/mysqld(my_print_stacktrace+0x3b)[0x91113b]
/usr/sbin/mysqld(handle_fatal_signal+0x471)[0x67dc31]
/usr/lib64/libpthread.so.0(+0xf100)[0x7f08e1347100]
/usr/lib64/mysql/plugin/libaudit_plugin.so(+0x12957)[0x7f0834b7b957]
/usr/lib64/mysql/plugin/libaudit_plugin.so(+0x10f28)[0x7f0834b79f28]
/usr/lib64/mysql/plugin/libaudit_plugin.so(+0x120e9)[0x7f0834b7b0e9]
/usr/lib64/mysql/plugin/libaudit_plugin.so(+0x121b1)[0x7f0834b7b1b1]
/usr/lib64/mysql/plugin/libaudit_plugin.so(+0xeaf8)[0x7f0834b77af8]
/usr/lib64/mysql/plugin/libaudit_plugin.so(+0xf9ad)[0x7f0834b789ad]
/usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x638)[0x70c458]
/usr/sbin/mysqld(_ZN15Query_log_event14do_apply_eventEPK14Relay_log_infoPKcj+0x532)[0x89c032]
/usr/sbin/mysqld(_ZN9Log_event11apply_eventEP14Relay_log_info+0x6a)[0x89a43a]
/usr/sbin/mysqld(_Z14wsrep_apply_cbPvPKvmjPK14wsrep_trx_meta+0x5d0)[0x5b2390]
/usr/lib64/libgalera_smm.so(_ZNK6galera9TrxHandle5applyEPvPF15wsrep_cb_statusS1_PKvmjPK14wsrep_trx_metaERS6_+0xd5)[0x7f08bcc377b5]
/usr/lib64/libgalera_smm.so(+0x1f5ae0)[0x7f08bcc74ae0]
/usr/lib64/libgalera_smm.so(_ZN6galera13ReplicatorSMM9apply_trxEPvPNS_9TrxHandleE+0xd4)[0x7f08bcc77534]
/usr/lib64/libgalera_smm.so(_ZN6galera13ReplicatorSMM11process_trxEPvPNS_9TrxHandleE+0x10e)[0x7f08bcc7a79e]
/usr/lib64/libgalera_smm.so(_ZN6galera15GcsActionSource8dispatchEPvRK10gcs_actionRb+0x1b8)[0x7f08bcc56d48]
/usr/lib64/libgalera_smm.so(_ZN6galera15GcsActionSource7processEPvRb+0x57)[0x7f08bcc584e7]
/usr/lib64/libgalera_smm.so(_ZN6galera13ReplicatorSMM10async_recvEPv+0x7b)[0x7f08bcc7addb]
/usr/lib64/libgalera_smm.so(galera_recv+0x1d)[0x7f08bcc8a7bd]
/usr/sbin/mysqld[0x5b2ef4]
/usr/sbin/mysqld(start_wsrep_THD+0x293)[0x597203]
/usr/lib64/libpthread.so.0(+0x7dc5)[0x7f08e133fdc5]
/usr/lib64/libc.so.6(clone+0x6d)[0x7f08df58dced]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f0664010849): create table t2 (id int NOT NULL PRIMARY KEY, name varchar(255))
Connection ID (thread ID): 16
Status: NOT_KILLED

You may download the Percona XtraDB Cluster operations manual by visiting
http://www.percona.com/software/percona-xtradb-cluster/. You may find information
in the manual which will help you identify the cause of the crash.
Writing a core file
170512 19:23:00 mysqld_safe Number of processes running now: 0
170512 19:23:00 mysqld_safe WSREP: not restarting wsrep node automatically
170512 19:23:00 mysqld_safe mysqld from pid file /var/run/mysql/mysqld.pid ended
aharonrobbins commented 7 years ago

Thanks. We will try to investigate this.

pratibhadeepti commented 6 years ago

Hi I need to build an ansible playbook for MySQL 5.7 Innodb cluster, I feel you are the right person who can help me out, please sir help me out. I'm very new to ansible.