[MDEV-7967] [PATCH] segfault after (re-)moving audit log file Created: 2015-04-09 Updated: 2016-01-12 Resolved: 2016-01-12 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Plugin - Audit |
| Affects Version/s: | 5.5, 10.0, 10.1 |
| Fix Version/s: | 5.5.48 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Hans-Joachim Kliemeck | Assignee: | Alexey Botchkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | server_audit, verified | ||
| Attachments: |
|
| Sprint: | 10.2.0-3 |
| Description |
|
if an external program will move or remove the audit log, a segmentation fault will occur. this error will not happen, if the audit log file exist while mysql is started. if flush logs is executed after file has been moved but before stop+start of audit is triggered (via setting the file path or setting audit=OFF and audit=ON, see logrotate config), the probability of getting a segfault will be reduced. problem will occur with audit plugin (file rotation disabled) + mysql 5.6 + ubuntu 14.04 on git commit cc84ac3be41d9d6ac480d55449d5bf4e324cca10 gdb output: http://pastebin.com/ccs2Fug7 my naive solution would be to call stop_logging/start_logging on rotate() if file rotations are set to 0. this will trigger the needed reopen of the logfile |
| Comments |
| Comment by Elena Stepanova [ 2015-04-14 ] | ||||||||||||||||||||||||||
|
Hi, Are you really also getting the crash on MariaDB 5.5, 10.0, 10.1.1 as the 'Affects Version/s' field states? I can reproduce it on MySQL 5.6.23, but so far only there. Couldn't reproduce on MariaDB, or on MySQL 5.5, or on MySQL 5.6.24. | ||||||||||||||||||||||||||
| Comment by Hans-Joachim Kliemeck [ 2015-04-14 ] | ||||||||||||||||||||||||||
|
i added the versions because there is no mysql/audit version available and i'm using the current trunk version of audit plugin. i'm using ubuntu 14.04 LTS and my mysql version is 5.6.19. could you find the reason for 5.6.23? removed affected versions | ||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2015-04-15 ] | ||||||||||||||||||||||||||
|
Apparently, it was this commit on MySQL 5.6 after which the problem disappeared:
Still, holyfoot, could you please double-check that there is nothing to do/fix on the audit plugin side? | ||||||||||||||||||||||||||
| Comment by Hans-Joachim Kliemeck [ 2015-04-18 ] | ||||||||||||||||||||||||||
|
i can confirm that this commit will fix the issue. i created a backport patch for current mysql-server-5.6 version on trusty: https://bugs.launchpad.net/ubuntu/+source/mysql-5.6/+bug/1444904 | ||||||||||||||||||||||||||
| Comment by Hans-Joachim Kliemeck [ 2015-04-20 ] | ||||||||||||||||||||||||||
|
i was able to fix this problem for mysql on plugin level too. could you please take a look at the attached patch? | ||||||||||||||||||||||||||
| Comment by Hans-Joachim Kliemeck [ 2015-04-21 ] | ||||||||||||||||||||||||||
|
created pull request https://github.com/MariaDB/server/pull/46 | ||||||||||||||||||||||||||
| Comment by Hans-Joachim Kliemeck [ 2015-06-17 ] | ||||||||||||||||||||||||||
|
any progress on this issue? | ||||||||||||||||||||||||||
| Comment by Alexey Botchkov [ 2016-01-12 ] | ||||||||||||||||||||||||||
|
Should be fixed with the patch to |