Bug #90524 MySQL 5.7.22 crashes with MySQL Enterprise Audit plugin-in 5.7.21
Submitted: 20 Apr 2018 7:19 Modified: 14 May 2018 6:42
Reporter: Oli Sennhauser Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Security: Audit Severity:S2 (Serious)
Version:5.7.22 OS:Linux (ubunut 14.04)
Assigned to: CPU Architecture:x86
Tags: mysql server 5.7.22 audit plug-in

[20 Apr 2018 7:19] Oli Sennhauser
Description:
MySQL 5.7.22 crashes with MySQL Enterprise Audit plugin-in 5.7.21

How to repeat:
Copy over MySQL Enterprise Audit plug-in from 5.7.21 Enterprise Server to 5.7.22 Community Server and Start server (the same process worked from 5.7.21 Enterprise to 5.7.21 Community Server)

2018-04-19T22:18:49.505655Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-04-19T22:18:49.505744Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2018-04-19T22:18:49.505766Z 0 [Note] /home/mysql/product/mysql-5.7/bin/mysqld (mysqld 5.7.22) starting as process 11878 ...
2018-04-19T22:18:49.511755Z 0 [Note] InnoDB: PUNCH HOLE support available
2018-04-19T22:18:49.511776Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-04-19T22:18:49.511780Z 0 [Note] InnoDB: Uses event mutexes
2018-04-19T22:18:49.511783Z 0 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
2018-04-19T22:18:49.511786Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2018-04-19T22:18:49.511789Z 0 [Note] InnoDB: Using Linux native AIO
2018-04-19T22:18:49.512210Z 0 [Note] InnoDB: Number of pools: 1
2018-04-19T22:18:49.512279Z 0 [Note] InnoDB: Using CPU crc32 instructions
2018-04-19T22:18:49.513360Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2018-04-19T22:18:49.518703Z 0 [Note] InnoDB: Completed initialization of buffer pool
2018-04-19T22:18:49.520640Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2018-04-19T22:18:49.532024Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2018-04-19T22:18:49.559000Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2018-04-19T22:18:49.559044Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2018-04-19T22:18:49.809881Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2018-04-19T22:18:49.810477Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2018-04-19T22:18:49.810485Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2018-04-19T22:18:49.810896Z 0 [Note] InnoDB: Waiting for purge to start
2018-04-19T22:18:49.861061Z 0 [Note] InnoDB: 5.7.22 started; log sequence number 9650807664
2018-04-19T22:18:49.861320Z 0 [Note] InnoDB: Loading buffer pool(s) from /home/mysql/database/mysql-57/data/ib_buffer_pool
2018-04-19T22:18:49.861816Z 0 [Note] Plugin 'FEDERATED' is disabled.
2018-04-19T22:18:49.865246Z 0 [Note] InnoDB: Buffer pool(s) load completed at 180420  0:18:49
22:18:49 UTC - mysqld got signal 6 ;
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.
Attempting to collect some information that could help diagnose the problem.
As this is a crash and something is definitely wrong, the information
collection process might fail.

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

Thread pointer: 0x0
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 = 0 thread_stack 0x40000
/home/mysql/product/mysql-5.7/bin/mysqld(my_print_stacktrace+0x35)[0xf4b6d5]
/home/mysql/product/mysql-5.7/bin/mysqld(handle_fatal_signal+0x4a4)[0x7d0d74]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10330)[0x7fbfc7db1330]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x37)[0x7fbfc679cc37]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x148)[0x7fbfc67a0028]
/lib/x86_64-linux-gnu/libc.so.6(+0x732a4)[0x7fbfc67d92a4]
/lib/x86_64-linux-gnu/libc.so.6(+0x7f82e)[0x7fbfc67e582e]
/home/mysql/product/mysql-5.7/bin/mysqld(delete_dynamic+0x22)[0xf34672]
/home/mysql/product/mysql-5.7/bin/mysqld(my_hash_free+0x60)[0xf36680]
/home/mysql/product/mysql-5.7/bin/mysqld(_ZN3THDD1Ev+0x4af)[0xcd8a0f]
/home/mysql/product/mysql-5.7.22-linux-glibc2.12-x86_64/lib/plugin/audit_log.so(_ZN12Table_access7Dll_fixD0Ev+0x27)[0x7fbfb25cc3a7]
/home/mysql/product/mysql-5.7.22-linux-glibc2.12-x86_64/lib/plugin/audit_log.so(_ZN12Table_accessD1Ev+0x71)[0x7fbfb25cbe71]
/home/mysql/product/mysql-5.7.22-linux-glibc2.12-x86_64/lib/plugin/audit_log.so(_Z23flush_audit_log_filtersPvbR14Filter_buildermRbPVx+0x20d)[0x7fbfb25b8fed]
/home/mysql/product/mysql-5.7.22-linux-glibc2.12-x86_64/lib/plugin/audit_log.so(_Z21audit_log_filter_initPv+0x99)[0x7fbfb25a6809]
/home/mysql/product/mysql-5.7.22-linux-glibc2.12-x86_64/lib/plugin/audit_log.so(+0x8f35a)[0x7fbfb25a735a]
/home/mysql/product/mysql-5.7/bin/mysqld(_Z23initialize_audit_pluginP13st_plugin_int+0x70)[0x7d18a0]
/home/mysql/product/mysql-5.7/bin/mysqld[0xd3ae36]
/home/mysql/product/mysql-5.7/bin/mysqld[0xd3b09f]
/home/mysql/product/mysql-5.7/bin/mysqld(_Z36plugin_register_dynamic_and_init_allPiPPci+0x94)[0xd3b384]
/home/mysql/product/mysql-5.7/bin/mysqld[0x7c729f]
/home/mysql/product/mysql-5.7/bin/mysqld(_Z11mysqld_mainiPPc+0x92f)[0x7ca85f]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7fbfc6787f45]
/home/mysql/product/mysql-5.7/bin/mysqld[0x7c0ed9]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.

Suggested fix:
Do NOT break APIs within minor release series or do at least a compatibility check.
[26 Apr 2018 17:11] Georgi Kodinov
FYI we're not breaking public APIs. According to https://github.com/mysql/mysql-server/tree/5.7/include/mysql the last modification in plugin_audit.h was 3 years ago.
[14 May 2018 6:42] MySQL Verification Team
Thank you for the report.