Audit log hangs when trying to write log record of length audit_log_buffer_size
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.5 |
Fix Released
|
High
|
Sergei Glushchenko | |||
5.6 |
Fix Released
|
High
|
Sergei Glushchenko | |||
5.7 |
Fix Released
|
High
|
Sergei Glushchenko |
Bug Description
It is a bug in audit_log_
loop:
if (log->write_pos + len < log->flush_pos + log->size)
{
size_t wrlen= min(len, log->size -
memcpy(log->buf + (log->write_pos % log->size), buf, wrlen);
if (wrlen < len)
memcpy(
log->write_pos= log->write_pos + len;
DBUG_
}
else
{
if (!log->
{
mysql_
goto loop;
}
}
When len equals to log->size and both log->flush_pos == log->write_pos == 0 (buffer is fully flushed) this is going to be infinite loop.
summary: |
- Audit log hands when trying to write log record of length + Audit log hangs when trying to write log record of length audit_log_buffer_size |
tags: | added: audit |
Nobody has probably seen it because minimum value for audit_log_ buffer_ size is 4K, when log record was limited to 1K and even less (see Bug 1557293).