Uninstallation of audit_log plugin crashes mysql server

Bug #1441024 reported by monty solomon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Confirmed
Undecided
Unassigned
5.5
New
Undecided
Unassigned
5.6
Confirmed
Undecided
Unassigned

Bug Description

# mysql -uroot -e "UNINSTALL PLUGIN audit_log"
ERROR 2013 (HY000) at line 1: Lost connection to MySQL server during query

mysql Ver 14.14 Distrib 5.6.23-72.1, for Linux (x86_64) using EditLine wrapper
Server version: 5.6.23-72.1-log Percona Server (GPL), Release 72.1, Revision 0503478
CentOS release 6.5 (Final)
Linux 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Tags: audit
Revision history for this message
monty solomon (monty+launchpad) wrote :

2015-04-07 08:19:25 1426 [Note] Shutting down plugin 'audit_log'
08:19:25 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=67108864
read_buffer_size=1048576
max_used_connections=6
max_threads=502
thread_count=3
connection_count=3
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 715481 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x6021a10
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 = 7fc79c03fd40 thread_stack 0x40000
/usr/sbin/mysqld(my_print_stacktrace+0x2c)[0x8cc59c]
/usr/sbin/mysqld(handle_fatal_signal+0x461)[0x654f11]
/lib64/libpthread.so.0(+0xf710)[0x7fc7c2e26710]
/usr/lib64/mysql/plugin/audit_log.so(+0x34b7)[0x7fc79da554b7]
/usr/sbin/mysqld(_Z21finalize_audit_pluginP13st_plugin_int+0x1f)[0x684d6f]
/usr/sbin/mysqld[0x6e45c7]
/usr/sbin/mysqld(_Z22mysql_uninstall_pluginP3THDPK19st_mysql_lex_string+0x35b)[0x6e4ffb]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0xffd)[0x6d585d]
/usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x5c8)[0x6db7e8]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0xff9)[0x6dcf59]
/usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x162)[0x6aa772]
/usr/sbin/mysqld(handle_one_connection+0x40)[0x6aa860]
/usr/sbin/mysqld(pfs_spawn_thread+0x143)[0xadc113]
/lib64/libpthread.so.0(+0x79d1)[0x7fc7c2e1e9d1]
/lib64/libc.so.6(clone+0x6d)[0x7fc7c15388fd]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7fc6c4004c20): is an invalid pointer
Connection ID (thread ID): 892
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.
150407 08:19:25 mysqld_safe Number of processes running now: 0
150407 08:19:25 mysqld_safe mysqld restarted

Revision history for this message
monty solomon (monty+launchpad) wrote :

my.cnf entries for audit log plugin

loose-audit-log = ON
loose-audit_log_file = /opt/mysql/dblogs1/monty-q0/audit/audit.log
loose-audit_log_format = JSON
loose-audit_log_strategy = SEMISYNCHRONOUS
loose-audit_log_handler = SYSLOG
loose-audit_log_syslog_facility = authpriv

Revision history for this message
monty solomon (monty+launchpad) wrote :

   Name: audit_log
 Status: DISABLED
   Type: AUDIT
Library: audit_log.so
License: GPL

Revision history for this message
monty solomon (monty+launchpad) wrote :

# mysql -uroot -e "INSTALL PLUGIN audit_log SONAME 'audit_log.so'"
ERROR 1125 (HY000) at line 1: Function 'audit_log' already exists

# mysql -uroot -e "UNINSTALL PLUGIN audit_log"
ERROR 2013 (HY000) at line 1: Lost connection to MySQL server during query

tags: added: audit
Revision history for this message
Valerii Kravchuk (valerii-kravchuk) wrote :
Download full text (3.5 KiB)

This is easy to confirm:

[root@centos openxs]# mysql -uroot test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.23-72.1-log Percona Server (GPL), Release 72.1, Revision 0503478

Copyright (c) 2009-2015 Percona LLC and/or its affiliates
Copyright (c) 2000, 2015, 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> UNINSTALL PLUGIN audit_log;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql> exit
Bye
[root@centos openxs]# tail -100 /var/log/mysqld.log
...
2015-04-15 23:36:33 4337 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.6.23-72.1-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 Percona Server (GPL), Release 72.1, Revision 0503478
2015-04-15 23:36:41 4337 [Note] Shutting down plugin 'audit_log'
20:36: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: 0x7ff703fe9000
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 = 7ff734a98d00 thread_stack 0x40000
/usr/sbin/mysqld(my_print_stacktrace+0x2c)[0x8cc59c]
/usr/sbin/mysqld(handle_fatal_signal+0x461)[0x654f11]
/lib64/libpthread.so.0(+0xf710)[0x7ff7344ad710]
/usr/lib64/mysql/plugin/audit_log.so(+0x34b7)[0x7ff7143ca4b7]
/usr/sbin/mysqld(_Z21finalize_audit_pluginP13st_plugin_int+0x1f)[0x684d6f]
/usr/sbin/mysqld[0x6e45c7]
/usr/sbin/mysqld(_Z22mysql_uninstall_pluginP3THDPK19st_mysql_lex_string+0x35b)[0x6e4ffb]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0xffd)[0x6d585d]
/usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x5c8)[0x6db7e8]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0xff9)[0x6dcf59]
/usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x162)[0x6aa772]
/usr/sbin/mysqld(handle_one_connection+0x40)[0x6aa860]
/usr/sbin/mysqld(pfs_spawn_thread+0x143)[0xadc113]
/lib64/libpthread.so.0(+0x79d1)[0x7ff7344a59d1]
/lib64/libc.so.6(clone+0x6d)[0x7ff732bbf8fd]

Trying to get some variables.
Some pointer...

Read more...

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Valerii, please check if you can reproduce it with the PS 5.6 built from the trunk. It might be fixed along with the bug 1435606.

Revision history for this message
Valerii Kravchuk (valerii-kravchuk) wrote :

I can not reproduce it on trunk:

mysql> INSTALL PLUGIN audit_log SONAME 'audit_log.so';
Query OK, 0 rows affected (0.07 sec)

mysql> UNINSTALL PLUGIN audit_log;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> show warnings\G
*************************** 1. row ***************************
  Level: Warning
   Code: 1620
Message: Plugin is busy and will be uninstalled on shutdown
1 row in set (0.00 sec)

The exact version is:

[openxs@centos percona-server]$ git log
commit 7a271a25d2ab3f05cfb876b8410970d36f1f4efe
Merge: 7b6db29 45908ed
Author: Laurynas Biveinis <email address hidden>
Date: Wed Apr 1 08:03:08 2015 +0300

    Merge pull request #53 from tplavcic/5.6-ps-bug1433980

    5.6 Add BUILD_CONFIG=mysql_release in debian rules (bug1433980)

commit 7b6db293cf846c9504c466623dd65785eafdeee8
Merge: c6a9ef6 6ea70df
Author: Laurynas Biveinis <email address hidden>
Date: Tue Mar 31 12:54:43 2015 +0300

    Merge pull request #51 from gl-sergei/5.6-ps-bug1437505

    Fix for bug 1437505: Audit_log_plugin is reading random memory (5.6)

commit 6ea70dfc1466e502c5eeae836c4ed1fd20f19ad5
Merge: da62804 06ba506
Author: Sergei Glushchenko <email address hidden>
...

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Marking as a duplicate of bug 1435606 then.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.