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

can't set audit_delay_cmds if already set it my.cnf #7

Closed
creechy opened this issue Jul 26, 2012 · 4 comments
Closed

can't set audit_delay_cmds if already set it my.cnf #7

creechy opened this issue Jul 26, 2012 · 4 comments
Labels

Comments

@creechy
Copy link
Contributor

creechy commented Jul 26, 2012

If I set audit_delay_cmds in my.cnf, and subsequently try to change it dynamically by using "set global audit_delay_cmds = 'insert,insert_select,update';" for example, I get a big fat stack trace/heap dump

I see this both with a precompiled version and if I compile and install myself, using server 5.1.63 X64 on Linux.

Here's the trace...

mysql> set global audit_delay_cmds = 'insert,insert_select,update';
*** glibc detected *** /usr/sbin/mysqld: free(): invalid pointer: 0x000000000bf2afcb ***
======= Backtrace: =========
/lib64/libc.so.6[0x3b1ec7245f]
/lib64/libc.so.6(cfree+0x4b)[0x3b1ec728bb]
/usr/lib64/mysql/plugin/libaudit_plugin.so[0x2aaaab4e6efe]
/usr/sbin/mysqld(_ZN17sys_var_pluginvar6updateEP3THDP7set_var+0xc6)[0x71df86]
/usr/sbin/mysqld(_ZN7set_var6updateEP3THD+0x45)[0x5e4a15]
/usr/sbin/mysqld(_Z17sql_set_variablesP3THDP4ListI12set_var_baseE+0x69)[0x5e46f9]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x8eb)[0x5d843b]
/usr/lib64/mysql/plugin/libaudit_plugin.so[0x2aaaab4e63d5]
/usr/sbin/mysqld(_Z11mysql_parseP3THDPcjPPKc+0x1f3)[0x5dde53]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x53a)[0x5de46a]
/usr/sbin/mysqld(_Z10do_commandP3THD+0xde)[0x5df5ae]
/usr/sbin/mysqld(handle_one_connection+0x661)[0x5d2331]
/lib64/libpthread.so.0[0x3b1f40673d]
/lib64/libc.so.6(clone+0x6d)[0x3b1ecd44bd]
======= Memory map: ========
00400000-005d1000 r-xp 00000000 fd:00 14972165 /usr/sbin/mysqld
005d1000-005d2000 r-xp 001d1000 fd:00 14972165 /usr/sbin/mysqld
005d2000-005d3000 r-xp 001d2000 fd:00 14972165 /usr/sbin/mysqld
005d3000-005d5000 r-xp 001d3000 fd:00 14972165 /usr/sbin/mysqld
005d5000-005d7000 r-xp 001d5000 fd:00 14972165 /usr/sbin/mysqld
005d7000-005d8000 r-xp 001d7000 fd:00 14972165 /usr/sbin/mysqld
005d8000-00616000 r-xp 001d8000 fd:00 14972165 /usr/sbin/mysqld
00616000-00617000 r-xp 00216000 fd:00 14972165 /usr/sbin/mysqld
00617000-006dd000 r-xp 00217000 fd:00 14972165 /usr/sbin/mysqld
006dd000-006de000 r-xp 002dd000 fd:00 14972165 /usr/sbin/mysqld
006de000-00a57000 r-xp 002de000 fd:00 14972165 /usr/sbin/mysqld
00b56000-00c8a000 rw-p 00656000 fd:00 14972165 /usr/sbin/mysqld
00c8a000-00ca3000 rw-p 00c8a000 00:00 0
0bf24000-0c5aa000 rw-p 0bf24000 00:00 0 [heap]
407d1000-407d2000 ---p 407d1000 00:00 0
407d2000-411d2000 rw-p 407d2000 00:00 0
411d2000-411d3000 ---p 411d2000 00:00 0
411d3000-41213000 rw-p 411d3000 00:00 0
4185a000-4185b000 ---p 4185a000 00:00 0
4185b000-4189b000 rw-p 4185b000 00:00 0
4192c000-4192d000 ---p 4192c000 00:00 0
4192d000-4232d000 rw-p 4192d000 00:00 0
4232d000-4232e000 ---p 4232d000 00:00 0
4232e000-42d2e000 rw-p 4232e000 00:00 0
42d2e000-42d2f000 ---p 42d2e000 00:00 0
42d2f000-4372f000 rw-p 42d2f000 00:00 0
4372f000-43730000 ---p 4372f000 00:00 0
43730000-44130000 rw-p 43730000 00:00 0
44130000-44131000 ---p 44130000 00:00 0
44131000-44b31000 rw-p 44131000 00:00 0
44b31000-44b32000 ---p 44b31000 00:00 0
44b32000-45532000 rw-p 44b32000 00:00 0
45532000-45533000 ---p 45532000 00:00 0
45533000-45f33000 rw-p 45533000 00:00 0
45f33000-45f34000 ---p 45f33000 00:00 0
45f34000-46934000 rw-p 45f34000 00:00 0
3b1e800000-3b1e81c000 r-xp 00000000 fd:00 9395256 /lib64/ld-2.5.so
3b1ea1c000-3b1ea1d000 r--p 0001c000 fd:00 9395256 /lib64/ld-2.5.so
3b1ea1d000-3b1ea1e000 rw-p 0001d000 fd:00 9395256 /lib64/ld-2.5.so
3b1ec00000-3b1ed4e000 r-xp 00000000 fd:00 9395257 /lib64/libc-2.5.so
3b1ed4e000-3b1ef4e000 ---p 0014e000 fd:00 9395257 /lib64/libc-2.5.so
3b1ef4e000-3b1ef52000 r--p 0014e000 fd:00 9395257 /lib64/libc-2.5.so
3b1ef52000-3b1ef53000 rw-p 00152000 fd:00 9395257 /lib64/libc-2.5.so
3b1ef53000-3b1ef58000 rw-p 3b1ef53000 00:00 0
3b1f000000-3b1f002000 r-xp 00000000 fd:00 9395258 /lib64/libdl-2.5.so
3b1f002000-3b1f202000 ---p 00002000 fd:00 9395258 /lib64/libdl-2.5.so
3b1f202000-3b1f203000 r--p 00002000 fd:00 9395258 /lib64/libdl-2.5.so
3b1f203000-3b1f204000 rw-p 00003000 fd:00 9395258 /lib64/libdl-2.5.so
3b1f400000-3b1f416000 r-xp 00000000 fd:00 9395259 /lib64/libpthread-2.5.so
3b1f416000-3b1f615000 ---p 00016000 fd:00 9395259 /lib64/libpthread-2.5.so
3b1f615000-3b1f616000 r--p 00015000 fd:00 9395259 /lib64/libpthread-2.5.so
3b1f616000-3b1f617000 rw-p 00016000 fd:00 9395259 /lib64/libpthread-2.5.so
3b1f617000-3b1f61b000 rw-p 3b1f617000 00:00 0
3b1f800000-3b1f882000 r-xp 00000000 fd:00 9395508 /lib64/libm-2.5.so
3b1f882000-3b1fa81000 ---p 00082000 fd:00 9395508 /lib64/libm-2.5.so
3b1fa81000-3b1fa82000 r--p 00081000 fd:00 9395508 /lib64/libm-2.5.so
3b1fa82000-3b1fa83000 rw-p 00082000 fd:00 9395508 /lib64/libm-2.5.so
3b22000000-3b22015000 r-xp 00000000 fd:00 9395543 /lib64/libnsl-2.5.so
3b22015000-3b22214000 ---p 00015000 fd:00 9395543 /lib64/libnsl-2.5.so
3b22214000-3b22215000 r--p 00014000 fd:00 9395543 /lib64/libnsl-2.5.so
3b22215000-3b22216000 rw-p 00015000 fd:00 9395543 /lib64/libnsl-2.5.so
3b22216000-3b22218000 rw-p 3b22216000 00:00 0
3b2fe00000-3b2fe09000 r-xp 00000000 fd:00 9395548 /lib64/libcrypt-2.5.so
3b2fe09000-3b30008000 ---p 00009000 fd:00 9395548 /lib64/libcrypt-2.5.so
3b30008000-3b30009000 r--p 00008000 fd:00 9395548 /lib64/libcrypt-2.5.so
3b30009000-3b3000a000 rw-p 00009000 fd:00 9395548 /lib64/libcrypt-2.5.so
3b3000a000-3b30038000 rw-p 3b3000a000 00:00 0
3eee800000-3eee80d000 r-xp 00000000 fd:00 9395241 /lib64/libgcc_s-4.1.2-20080825.so.1
3eee80d000-3eeea0d000 ---p 0000d000 fd:00 9395241 /lib64/libgcc_s-4.1.2-20080825.so.1
3eeea0d000-3eeea0e000 rw-p 0000d000 fd:00 9395241 /lib64/libgcc_s-4.1.2-20080825.so.1
2aaaaaace000-2aaaaaad8000 r-xp 00000000 fd:00 9395267 /lib64/libnss_files-2.5.so
2aaaaaad8000-2aaaaacd7000 ---p 0000a000 fd:00 9395267 /lib64/libnss_files-2.5.so
2aaaaacd7000-2aaaaacd8000 r--p 00009000 fd:00 9395267 /lib64/libnss_files-2.5.so
2aaaaacd8000-2aaaaacd9000 rw-p 0000a000 fd:00 9395267 /lib64/libnss_files-2.5.so
2aaaaacd9000-2aaaab4da000 rw-p 2aaaaacd9000 00:00 0
2aaaab4da000-2aaaab4e5000 r-xp 00000000 fd:00 15877585 /usr/lib64/mysql/plugin/libaudit_plugin.so
2aaaab4e5000-2aaaab4e6000 r-xp 0000b000 fd:00 15877585 /usr/lib64/mysql/plugin/libaudit_plugin.so
2aaaab4e6000-2aaaab4f5000 r-xp 0000c000 fd:00 15877585 /usr/lib64/mysql/plugin/libaudit_plugin.so
2aaaab4f5000-2aaaab5f4000 ---p 0001b000 fd:00 15877585 /usr/lib64/mysql/plugin/libaudit_plugin.so
2aaaab5f4000-2aaaab60e000 rw-p 0001a000 fd:00 15877585 /usr/lib64/mysql/plugin/libaudit_plugin.so
2aaaab60e000-2aaaac291000 rw-p 2aaaab60e000 00:00 0
2aaaac4b4000-2aaaac6ba000 rw-p 2aaaac4b4000 00:00 0
2aef6780d000-2aef67810000 r-xp 2aef6780d000 00:00 0 [vdso]
2aef67810000-2aef67812000 rw-p 2aef67810000 00:00 0
2aef67822000-2aef67825000 rw-p 2aef67822000 00:00 0
7fffc3dea000-7fffc3dff000 rw-p 7ffffffe9000 00:00 0 [stack]
ffffffffff600000-ffffffffffe00000 ---p 00000000 00:00 0 [vsyscall]
ERROR 2013 (HY000): Lost connection to MySQL server during query

@glicht
Copy link
Contributor

glicht commented Jul 27, 2012

This is a bug. We will fix this for the next release (1.0.2).

@glicht
Copy link
Contributor

glicht commented Jul 27, 2012

Actually, I just noticed that setting audit_delay_cmds in my.cnf is not picked up correctly by our AUDIT plugin. So you have to set this dynamically via "set global" command to get it to work (and of course remove it from my.cnf). We will address this too as part of the fix.

@creechy
Copy link
Contributor Author

creechy commented Jul 28, 2012

Yes, that's the other problem with audit_delay_cmds from my.cnf. It appears the update() function isn't called when a value is defined in my.cnf, only when set dynamically via "set global" and so the array values aren't set up correctly.

@glicht
Copy link
Contributor

glicht commented Aug 1, 2012

With latest merge from the creechy fork this issue is now resolved.

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

No branches or pull requests

2 participants