Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Cannot Reproduce
-
N/A
-
Not for Release Notes
-
Q3/2025 Maintenance
Description
A multi-thread hang was observed while using Server Audit Log Buffering.
The server was brought up in client a with --plugin_load_add=server_audit and the following SQL was executed:
SET GLOBAL server_audit_logging=ON; SET GLOBAL server_audit_file_buffer_size=10; |
Then, from a second client b the following was executed (full output inc final duration):
bb-12.0-mdev-34680x2-hf CS 12.0.1 4db190845cda3598c35416a40955566b114b26e4 (Optimized, UBASAN, Clang) Build 24/06/2025 |
12.0.1-opt>SELECT 1;
|
+---+
|
| 1 |
|
+---+
|
| 1 |
|
+---+
|
1 row in set (1 min 20.202 sec)
|
While this was a SAN build, it is unlikely that this would have caused any relevant delays. Note also this was an optimized, not debug build.
From client a SHOW PROCESSLIST showed during this time:
bb-12.0-mdev-34680x2-hf CS 12.0.1 4db190845cda3598c35416a40955566b114b26e4 (Optimized, UBASAN, Clang) Build 24/06/2025 |
12.0.1-opt>show processlist;
|
+----+------+-----------+------+---------+------+-----------------+----------------------------------+----------+
|
| Id | User | Host | db | Command | Time | State | Info | Progress |
|
+----+------+-----------+------+---------+------+-----------------+----------------------------------+----------+
|
| 4 | root | localhost | test | Query | 0 | starting | show processlist | 0.000 |
|
| 5 | root | localhost | test | Query | 21 | Updating status | select @@version_comment limit 1 | 0.000 |
|
+----+------+-----------+------+---------+------+-----------------+----------------------------------+----------+
|
2 rows in set (0.004 sec)
|
Query 5 here was likely client c which was being connected at this time (manually). The connect with this new client hung, and eventually brought up the CLI. SHOW PROCESSLIST confirmed this:
bb-12.0-mdev-34680x2-hf CS 12.0.1 4db190845cda3598c35416a40955566b114b26e4 (Optimized, UBASAN, Clang) Build 24/06/2025 |
12.0.1-opt>show processlist;
|
+----+------+-----------+------+---------+------+----------+----------------------------------+----------+
|
| Id | User | Host | db | Command | Time | State | Info | Progress |
|
+----+------+-----------+------+---------+------+----------+----------------------------------+----------+
|
| 4 | root | localhost | test | Query | 0 | starting | show processlist | 0.000 |
|
| 5 | root | localhost | test | Query | 0 | | SELECT 1 | 0.000 |
|
| 6 | root | localhost | test | Query | 0 | starting | select @@version_comment limit 1 | 0.000 |
|
+----+------+-----------+------+---------+------+----------+----------------------------------+----------+
|
3 rows in set (1 min 2.601 sec)
|
Note the 62 second duration compared with the SELECT 1 80 second duration, i.e. it was started later. Eventually the SELECT 1 finished in client b, and client c's connection finished/ended up at the CLI prompt.
bb-12.0-mdev-34680x2-hf CS 12.0.1 4db190845cda3598c35416a40955566b114b26e4 (Optimized, UBASAN, Clang) Build 24/06/2025 |
12.0.1-opt>show processlist;
|
+----+------+-----------+------+---------+------+----------+------------------+----------+
|
| Id | User | Host | db | Command | Time | State | Info | Progress |
|
+----+------+-----------+------+---------+------+----------+------------------+----------+
|
| 4 | root | localhost | test | Query | 0 | starting | show processlist | 0.000 |
|
| 5 | root | localhost | test | Sleep | 38 | | NULL | 0.000 |
|
| 6 | root | localhost | test | Sleep | 38 | | NULL | 0.000 |
|
+----+------+-----------+------+---------+------+----------+------------------+----------+
|
3 rows in set (0.002 sec)
|
 |
12.0.1-opt>show processlist;
|
+----+------+-----------+------+---------+------+----------+------------------+----------+
|
| Id | User | Host | db | Command | Time | State | Info | Progress |
|
+----+------+-----------+------+---------+------+----------+------------------+----------+
|
| 4 | root | localhost | test | Query | 0 | starting | show processlist | 0.000 |
|
| 6 | root | localhost | test | Sleep | 375 | | NULL | 0.000 |
|
+----+------+-----------+------+---------+------+----------+------------------+----------+
|
2 rows in set (0.000 sec)
|
In total 3 threads were hanging for some time; client b (which triggered the issue) while running SELECT 1. Client a while running SHOW PROCESSLIST and client c simply connecting. During part of this time a
watch cat data/server_audit.log |
Bash command was running (before client c was started). It is possible that this may have triggered or aggrevated the issue, though I doubt that could be the case.
Attachments
Issue Links
- is caused by
-
MDEV-34680 Asynchronous and Buffered Logging for Audit Plugin
-
- Closed
-