Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audit Plugin not loading on MySQL 5.1.63 32bit #4

Closed
marcusv opened this issue Jun 27, 2012 · 16 comments
Closed

Audit Plugin not loading on MySQL 5.1.63 32bit #4

marcusv opened this issue Jun 27, 2012 · 16 comments

Comments

@marcusv
Copy link

marcusv commented Jun 27, 2012

Attempted to install the .so from https://github.com/downloads/mcafee/mysql-audit/audit-plugin-mysql-5.1-1.0.1-320-linux-i386.zip via plugin-load but it will not load.

mysql Ver 14.14 Distrib 5.1.63, for pc-linux-gnu (i686) using readline 5.1

Error Log below:

120627 09:13:11 mysqld_safe mysqld from pid file /var/lib/mysql/idp.imagedesignserver.ca.pid ended
120627 09:13:12 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
120627 9:13:12 [Note] Plugin 'FEDERATED' is disabled.
120627 9:13:12 [Note] Plugin 'InnoDB' is disabled.
120627 9:13:12 [Note] Audit Plugin: Set interface version to: 12841728 (50163)
120627 9:13:12 [Note] Audit Plugin: starting up. Version: 1.0.1, Revision: 320. AUDIT plugin interface version: 50163. MySQL Server version: 5.1.63-cll.
120627 9:13:12 [Note] Audit Plugin: setup_offsets offsets_string (null)
120627 9:13:12 [Note] Audit Plugin: Audit validate checksum enabled. Mysqld /usr/sbin/mysqld
120627 9:13:12 [Note] Audit Plugin: Couldn't find proper THD offsets for: 5.1.63-cll
120627 9:13:12 [ERROR] Plugin 'AUDIT' init function returned error.
120627 9:13:12 [Note] Audit Plugin: removing hot patching function: 0x8202800
120627 9:13:12 [Note] Audit Plugin: targetPage: 0x8202000 targetFunction: 0x8202800
120627 9:13:12 [Note] Audit Plugin: removing hot patching function: 0x81fde80
120627 9:13:12 [Note] Audit Plugin: targetPage: 0x81fd000 targetFunction: 0x81fde80
120627 9:13:12 [Note] Audit Plugin: removing hot patching function: 0x82495f0
120627 9:13:12 [Note] Audit Plugin: targetPage: 0x8249000 targetFunction: 0x82495f0
120627 9:13:12 [Note] Audit Plugin: removing hot patching function: 0x8321790
120627 9:13:12 [Note] Audit Plugin: targetPage: 0x8321000 targetFunction: 0x8321790
120627 9:13:12 [Note] Audit Plugin: removing hot patching function: 0x82032b0
120627 9:13:12 [Note] Audit Plugin: targetPage: 0x8203000 targetFunction: 0x82032b0
120627 9:13:12 [Note] Audit Plugin: removing hot patching function: 0x8206060
120627 9:13:12 [Note] Audit Plugin: targetPage: 0x8206000 targetFunction: 0x8206060
120627 9:13:12 [Note] Event Scheduler: Loaded 0 events
120627 9:13:12 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.63-cll' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)

@glicht
Copy link
Contributor

glicht commented Jun 27, 2012

Can you specify the distribution of mysql you are using and what linux distribution.

Thanks,

Guy

Sent from my mobile device

-----Original Message-----
From: marcusv [email protected]
Date: Wed, 27 Jun 2012 08:39:14
To: Guy [email protected]
Subject: [mysql-audit] Audit Plugin not loading on MySQL 5.1.63 32bit (#4)

Attempted to install the .so from https://github.com/downloads/mcafee/mysql-audit/audit-plugin-mysql-5.1-1.0.1-320-linux-i386.zip via plugin-load but it will not load.

mysql Ver 14.14 Distrib 5.1.63, for pc-linux-gnu (i686) using readline 5.1

Error Log below:

120627 09:13:11 mysqld_safe mysqld from pid file /var/lib/mysql/idp.imagedesignserver.ca.pid ended
120627 09:13:12 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
120627 9:13:12 [Note] Plugin 'FEDERATED' is disabled.
120627 9:13:12 [Note] Plugin 'InnoDB' is disabled.
120627 9:13:12 [Note] Audit Plugin: Set interface version to: 12841728 (50163)
120627 9:13:12 [Note] Audit Plugin: starting up. Version: 1.0.1, Revision: 320. AUDIT plugin interface version: 50163. MySQL Server version: 5.1.63-cll.
120627 9:13:12 [Note] Audit Plugin: setup_offsets offsets_string (null)
120627 9:13:12 [Note] Audit Plugin: Audit validate checksum enabled. Mysqld /usr/sbin/mysqld
120627 9:13:12 [Note] Audit Plugin: Couldn't find proper THD offsets for: 5.1.63-cll
120627 9:13:12 [ERROR] Plugin 'AUDIT' init function returned error.
120627 9:13:12 [Note] Audit Plugin: removing hot patching function: 0x8202800
120627 9:13:12 [Note] Audit Plugin: targetPage: 0x8202000 targetFunction: 0x8202800
120627 9:13:12 [Note] Audit Plugin: removing hot patching function: 0x81fde80
120627 9:13:12 [Note] Audit Plugin: targetPage: 0x81fd000 targetFunction: 0x81fde80
120627 9:13:12 [Note] Audit Plugin: removing hot patching function: 0x82495f0
120627 9:13:12 [Note] Audit Plugin: targetPage: 0x8249000 targetFunction: 0x82495f0
120627 9:13:12 [Note] Audit Plugin: removing hot patching function: 0x8321790
120627 9:13:12 [Note] Audit Plugin: targetPage: 0x8321000 targetFunction: 0x8321790
120627 9:13:12 [Note] Audit Plugin: removing hot patching function: 0x82032b0
120627 9:13:12 [Note] Audit Plugin: targetPage: 0x8203000 targetFunction: 0x82032b0
120627 9:13:12 [Note] Audit Plugin: removing hot patching function: 0x8206060
120627 9:13:12 [Note] Audit Plugin: targetPage: 0x8206000 targetFunction: 0x8206060
120627 9:13:12 [Note] Event Scheduler: Loaded 0 events
120627 9:13:12 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.63-cll' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)


Reply to this email directly or view it on GitHub:
#4

@darrkz
Copy link

darrkz commented Jul 6, 2012

I have the same problem,the version of mysql is 5.1.62-0ubuntu0.10.04.1-log.

@glicht
Copy link
Contributor

glicht commented Jul 6, 2012

Hi darkz1984,

Are you on a 32bit architecture?

It is probably an offset issue.

Did you try setting:

audit_validate_checksum=OFF

As stated in the wiki: https://github.com/mcafee/mysql-audit/wiki/Installation

------Original Message------
From: darkz1984
To: Guy Lichtman
Subject: Re: [mysql-audit] Audit Plugin not loading on MySQL 5.1.63 32bit (#4)
Sent: Jul 6, 2012 8:35 AM

I have the same problem,the version of mysql is 5.1.62-0ubuntu0.10.04.1-log.


Reply to this email directly or view it on GitHub:
#4 (comment)


Sent from my mobile deviceSent from my mobile device

@darrkz
Copy link

darrkz commented Jul 6, 2012

I use the 32BIT systen,and directly down the zip file ,not the source code.Could you direct fix the bug in the *.so file??
At 2012-07-06 16:32:01,"Guy Lichtman" [email protected] wrote:

Hi darkz1984,

Are you on a 32bit architecture?

It is probably an offset issue.

Did you try setting:

audit_validate_checksum=OFF

As stated in the wiki: https://github.com/mcafee/mysql-audit/wiki/Installation

------Original Message------
From: darkz1984
To: Guy Lichtman
Subject: Re: [mysql-audit] Audit Plugin not loading on MySQL 5.1.63 32bit (#4)
Sent: Jul 6, 2012 8:35 AM

I have the same problem,the version of mysql is 5.1.62-0ubuntu0.10.04.1-log.


Reply to this email directly or view it on GitHub:
#4 (comment)


Sent from my mobile deviceSent from my mobile device


Reply to this email directly or view it on GitHub:
#4 (comment)

@glicht
Copy link
Contributor

glicht commented Jul 9, 2012

Hi darkz1984,

I am checking this out and will get back to you.

@darrkz
Copy link

darrkz commented Jul 10, 2012

OK,thank you very much
At 2012-07-09 23:36:01,"Guy Lichtman" [email protected] wrote:

Hi darkz1984,

I am checking this out and will get back to you.


Reply to this email directly or view it on GitHub:
#4 (comment)

@glicht
Copy link
Contributor

glicht commented Jul 11, 2012

Hi darkz1984,

The issue is that the 1.0.1 build doesn't have the 5.1.62 offsets compiled in.

Please do the following.

You should add to the mysqld configuration file (usually /etc/my.cnf or /etc/mysql/my.cnf) the following under the [mysqld] section:

audit_offsets=4104, 4144, 2248, 2428, 44, 1176

Then try installing the plugin.

@darrkz
Copy link

darrkz commented Jul 12, 2012

Ok,thank you very much...
At 2012-07-11 18:20:22,"Guy Lichtman" [email protected] wrote:

Hi darkz1984,

The issue is that the 1.0.1 build doesn't have the 5.1.62 offsets compiled in.

Please do the following.

You should add to the mysqld configuration file (usually /etc/my.cnf or /etc/mysql/my.cnf) the following under the [mysqld] section:

audit_offsets=4104, 4144, 2248, 2428, 44, 1176

Then try installing the plugin.


Reply to this email directly or view it on GitHub:
#4 (comment)

@darrkz
Copy link

darrkz commented Jul 12, 2012

I add audit_offsets=4104, 4144, 2248, 2428, 44, 1176 and loadmodule "/usr/lib/mysql/plugin/libaudit_plugin.so into my.cnf,but it still say errors in the logs as blow:

120712 11:33:45 [Note] /usr/sbin/mysqld: Shutdown complete

120712 11:34:10 [Note] Plugin 'FEDERATED' is disabled.
120712 11:34:10 InnoDB: Initializing buffer pool, size = 1.0G
120712 11:34:10 InnoDB: Completed initialization of buffer pool
120712 11:34:10 InnoDB: Started; log sequence number 9 334101798
120712 11:34:10 [ERROR] /usr/sbin/mysqld: unknown variable 'audit_offsets=4104,4144,2248,2428,44,1176'
120712 11:34:10 [ERROR] Aborting

120712 11:34:10 InnoDB: Starting shutdown...
...

@glicht
Copy link
Contributor

glicht commented Jul 12, 2012

Hi darkz1984,

You should add to my.cnf the following:

 plugin-load=AUDIT=libaudit_plugin.so

Otherwise if you have only the entry:

audit_offsets=4104, 4144, 2248, 2428, 44, 1176

When mysql starts up it doesn't recognize the audit_offsets settings.

@darrkz
Copy link

darrkz commented Jul 12, 2012

plugin-load=AUDIT=libaudit_plugin.so
audit_offsets=4104, 4144, 2248, 2428, 44, 1176
or
audit_offsets=4104, 4144, 2248, 2428, 44, 1176
plugin-load=AUDIT=libaudit_plugin.so
??
At 2012-07-12 21:11:54,"Guy Lichtman" [email protected] wrote:

Hi darkz1984,

You should add to my.cnf the following:

plugin-load=AUDIT=libaudit_plugin.so

Otherwise if you have only the entry:

audit_offsets=4104, 4144, 2248, 2428, 44, 1176

When mysql starts up it doesn't recognize the audit_offsets settings.


Reply to this email directly or view it on GitHub:
#4 (comment)

@glicht
Copy link
Contributor

glicht commented Jul 15, 2012

Hi darkz1984,

I don't think the order matters. I usually add the plugin-load option first.

Let us know if things are working for you now and I"ll close the issue.

@darrkz
Copy link

darrkz commented Jul 16, 2012

Yeah,I try it,use
audit_offsets = 4104,4144,2248,2428,44,1176
plugin-load=AUDIT=libaudit_plugin.so
and
plugin-load=AUDIT=libaudit_plugin.so
audit_offsets = 4104,4144,2248,2428,44,1176
each of them is ok。
and I found that I got the last because I use
audit_offsets = 4104,4144,2248,2428,44,1176
loadmodule "/usr/lib/mysql/plugin/libaudit_plugin.so"
。。。

so now it ok and the log says:
120716 16:37:46 [Note] /usr/sbin/mysqld: Normal shutdown

120716 16:37:46 [Note] Slave I/O thread killed while reading event
120716 16:37:46 [Note] Slave I/O thread exiting, read up to log 'mysql-242.000027', position 107
120716 16:37:46 [Note] Event Scheduler: Purging the queue. 0 events
120716 16:37:46 [Note] Error reading relay log event: slave SQL thread was killed
120716 16:37:46 [Note] Audit Plugin: removing hot patching function: 0xb727c200
120716 16:37:46 [Note] Audit Plugin: targetPage: 0xb727c000 targetFunction: 0xb727c200
120716 16:37:46 [Note] Audit Plugin: removing hot patching function: 0xb7277050
120716 16:37:46 [Note] Audit Plugin: targetPage: 0xb7277000 targetFunction: 0xb7277050
120716 16:37:46 [Note] Audit Plugin: removing hot patching function: 0xb72c6c80
120716 16:37:46 [Note] Audit Plugin: targetPage: 0xb72c6000 targetFunction: 0xb72c6c80
120716 16:37:46 [Note] Audit Plugin: removing hot patching function: 0xb73cb9c0
120716 16:37:46 [Note] Audit Plugin: targetPage: 0xb73cb000 targetFunction: 0xb73cb9c0
120716 16:37:46 [Note] Audit Plugin: removing hot patching function: 0xb727b8a0
120716 16:37:46 [Note] Audit Plugin: targetPage: 0xb727b000 targetFunction: 0xb727b8a0
120716 16:37:46 [Note] Audit Plugin: removing hot patching function: 0xb727f8e0
120716 16:37:46 [Note] Audit Plugin: targetPage: 0xb727f000 targetFunction: 0xb727f8e0
120716 16:37:46 InnoDB: Starting shutdown...
120716 16:37:47 InnoDB: Shutdown completed; log sequence number 9 334158742
120716 16:37:47 [Note] /usr/sbin/mysqld: Shutdown complete

120716 16:37:47 [Note] Plugin 'FEDERATED' is disabled.
120716 16:37:47 [Note] Audit Plugin: Set interface version to: 12841472 (50162)
120716 16:37:47 InnoDB: Initializing buffer pool, size = 1.0G
120716 16:37:47 InnoDB: Completed initialization of buffer pool
120716 16:37:48 InnoDB: Started; log sequence number 9 334158742
120716 16:37:48 [Note] Audit Plugin: starting up. Version: 1.0.1, Revision: 320. AUDIT plugin interface version: 50162. MySQL Server version: 5.1.62-0ubuntu0.10.04.1-log.
120716 16:37:48 [Note] Audit Plugin: setup_offsets offsets_string 4104,4144,2248,2428,44,1176
120716 16:37:48 [Note] Audit Plugin: setup_offsets Audit_formatter::thd_offsets values: 4104 4144 2248 2428 44 1176
120716 16:37:48 [Note] Audit Plugin: hot patching function: 0xb725e200
120716 16:37:48 [Note] Audit Plugin: trampolineFunction: 0xaa25011c trampolinePage: 0xaa250000
120716 16:37:48 [Note] Audit Plugin: hot patch log slow complete. Trampoline size: 6.
120716 16:37:48 [Note] Audit Plugin: hot patching function: 0xb72618e0
120716 16:37:48 [Note] Audit Plugin: trampolineFunction: 0xaa2500e0 trampolinePage: 0xaa250000
120716 16:37:48 [Note] Audit Plugin: hot patch mysql execute. Trampoline size: 5.
120716 16:37:48 [Note] Audit Plugin: hot patching function: 0xb7259050
120716 16:37:48 [Note] Audit Plugin: trampolineFunction: 0xaa250158 trampolinePage: 0xaa250000
120716 16:37:48 [Note] Audit Plugin: hot patch check_user. Trampoline size: 5.
120716 16:37:48 [Note] Audit Plugin: hot patching function: 0xb73ad9c0
120716 16:37:48 [Note] Audit Plugin: trampolineFunction: 0xaa2502e8 trampolinePage: 0xaa250000
120716 16:37:48 [Note] Audit Plugin: hot patch send_result_to_client. Trampoline size: 9.
120716 16:37:48 [Note] Audit Plugin: hot patching function: 0xb725d8a0
120716 16:37:48 [Note] Audit Plugin: trampolineFunction: 0xaa2503c4 trampolinePage: 0xaa250000
120716 16:37:48 [Note] Audit Plugin: hot patch check_table_access. Trampoline size: 5.
120716 16:37:48 [Note] Audit Plugin: hot patching function: 0xb72a8c80
120716 16:37:48 [Note] Audit Plugin: trampolineFunction: 0xaa250324 trampolinePage: 0xaa250000
120716 16:37:48 [Note] Audit Plugin: hot patch open_tables address %. Trampoline size: 3073019008d.
120716 16:37:48 [Warning] 'user' entry 'root@ubuntu' ignored in --skip-name-resolve mode.
120716 16:37:48 [Note] Slave SQL thread initialized, starting replication in log 'mysql-242.000027' at position 107, relay log './169-relay.000357' position: 252
120716 16:37:48 [Note] Event Scheduler: Loaded 0 events
120716 16:37:48 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.62-0ubuntu0.10.04.1-log' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
120716 16:37:48 [Note] Slave I/O thread: connected to master '[email protected]:3306',replication started in log 'mysql-242.000027' at position 107

at last,I want to know how to determine the offset if I use other version of mysql,such as mysql5.5 or mysql5.6??
At 2012-07-12 21:11:54,"Guy Lichtman" [email protected] wrote:

Hi darkz1984,

You should add to my.cnf the following:

plugin-load=AUDIT=libaudit_plugin.so

Otherwise if you have only the entry:

audit_offsets=4104, 4144, 2248, 2428, 44, 1176

When mysql starts up it doesn't recognize the audit_offsets settings.


Reply to this email directly or view it on GitHub:
#4 (comment)

@glicht
Copy link
Contributor

glicht commented Jul 16, 2012

Hi darkz1984,

Good to see that things are working for you.

To extract offsets you can follow the instructions at the following note:

#2 (comment)

It documents the process. A full wiki page on this will be added soon.

@glicht glicht closed this as completed Jul 16, 2012
@darrkz
Copy link

darrkz commented Jul 17, 2012

I have read that issue,but I use the deb file from apt-get install mysql。。。。So,there no other way to fetch the offset but only complite from the source code?? Or I think should give a list of offset of each mysql version??
At 2012-07-16 23:22:01,"Guy Lichtman" [email protected] wrote:

Hi darkz1984,

Good to see that things are working for you.

To extract offsets you can follow the instructions at the following note:

#2 (comment)

It documents the process. A full wiki page on this will be added soon.


Reply to this email directly or view it on GitHub:
#4 (comment)

@glicht
Copy link
Contributor

glicht commented Jul 17, 2012

Hi darkz1984,

You are correct regarding the deb distribution that it doesn't contain symbols. We have many offsets already defined in the code and we will be adding more in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants