Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.4.3, 10.1.38, 10.2.23, 10.3.14
-
None
Description
The server_audit plugin uses the lock_operations mutex to perform various operations in a mutually exclusive manner:
https://github.com/MariaDB/server/blob/mariadb-10.3.7/plugin/server_audit/server_audit.c#L544
As far as I can tell, this mutex is locked for every audit event, even when server_audit_logging=OFF is set. We can see that the mutex is locked here:
https://github.com/MariaDB/server/blob/mariadb-10.3.7/plugin/server_audit/server_audit.c#L1989
And the code doesn't check whether logging is enabled until a few lines later:
https://github.com/MariaDB/server/blob/mariadb-10.3.7/plugin/server_audit/server_audit.c#L2021
Is it absolutely necessary to do it this way? It seems as though users would pay a performance penalty to have the audit plugin installed if they have a lot of concurrent connections, even if server_audit_logging=OFF is set.
It looks like the only way to prevent the mutex from being locked for every audit event is to uninstall the plugin with UNINSTALL PLUGIN / UNINSTALL SONAME:
Attachments
Issue Links
- is caused by
-
MDEV-19291 server_audit plugin mutex causes stalls at very high concurrency
- Closed
- is part of
-
MDEV-18661 loading the audit plugin causes performance regression
- Closed
- relates to
-
MDEV-20236 Add audit plugin API functions to disable/enable specific audit plugins
- Closed