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

can not do initialization with mysql 5.7.18-debug. #168

Closed RingsC closed 7 years ago

RingsC commented 7 years ago

I build up the mysql(5.7.18) debug version from source code. and built up the mcafee audit plugin with source code. After these compiled, and configured the settings. and i try to run the mysql,but failed.

I check out the log of mysql, getting these logs as following..

2017-06-09T06:36:44.717486Z 0 [Warning] option 'audit-json-file-bufsize': signed value 0 adjusted to 1 2017-06-09T06:36:44.717496Z 0 [Warning] option 'plugin-audit-json-file-bufsize': signed value 0 adjusted to 1 2017-06-09T06:36:44.722958Z 0 [Note] Audit Plugin: starting up. Version: 1.0.0 , Revision: 99999 (64bit). AUDIT plugin interface version: 1025 (0x401). MySQL Server version: 5.7.18-debug. 2017-06-09T06:36:44.722982Z 0 [Note] Audit Plugin: setup_offsets audit_offsets: 8224, 8272, 3952, 5200, 528, 360, 0, 32, 64, 160, 608, 8388, 4712, 3648, 3656, 3660, 6472, 2072, 8, 7456, 7496, 7480 validate_checksum: 0 offsets_by_version: 1 2017-06-09T06:36:44.723377Z 0 [Note] InnoDB: Loading buffer pool(s) from /home/homli/work/mysql-server/bin/data/ib_buffer_pool 2017-06-09T06:36:44.731129Z 0 [Note] InnoDB: Buffer pool(s) load completed at 170609 14:36:44 2017-06-09T06:36:46.315889Z 0 [Note] Audit Plugin: mysqld: /home/homli/work/mysql-server/bin/bin/mysqld (d1d2710073612df5d58a65c83f19d90a) 2017-06-09T06:36:46.315930Z 0 [Note] Audit Plugin: setup_offsets Audit_formatter::thd_offsets values: 8224 8272 3952 5200 528 360 0 32 64 160 608 8388 4712 3648 3656 3660 6472 2072 8 7456 7496 7480 safe_mutex: Trying to lock uninitialized mutex at /home/homli/work/mysql-server/sql/sql_class.cc, line 947 06:36:46 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.

it seems, it can not to set the Audit_'formatter::thd_offsets' properly. so anyone can tell me how to fix that?

BTW: it seems that we can not get correct a "THD". in validate_offsets of audit_plugin.cc.

Thanks in advance. Hao.

aharonrobbins commented 7 years ago

Hi.

Please see the Offset Extraction section in the [[Troubleshooting]] part of the Wiki. You'll need to run the offset-extract.sh script and then add the offsets to the mysqld entry in /etc/my.cnf.

Thanks.

RingsC commented 7 years ago

I just add it. It seems that it is not that. I just disable the option:"validate_offsets_extended_enable". and it works, and i will find out why. Thanks.