audit_log: malformed record could be written after audit_log_flush=ON in ASYNC and PERFORMANCE modes
Bug #1613650 reported by
Sergei Glushchenko
This bug affects 1 person
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
Parser reporting
not well-formed (invalid token) at line 639, column 12, byte 20241 at /usr/lib/
but in my testing environment the log file is only 18919 bytes and 577 lines.
We need to add the code to print the entire file in case of parser error to diagnose the issue.
tags: | added: audit ci |
summary: |
- Sporadic audit_log_old failures + audit_log: malformed record could be written after audit_log_flush=ON in + ASYNC and PERFORMANCE modes |
To post a comment you must log in.
Malformed record appears at the end of the file and it looks like:
<AUDIT_RECORD "40_2016- 08-25T14: 07:40" "2016-08- 25T14:07: 40 UTC" CLASS=" select" ID="122" && &" "& quot;" <> << >> >> '"
NAME=</AUDIT>
"Query"
RECORD=
TIMESTAMP=
COMMAND_
CONNECTION_
STATUS="0"
SQLTEXT="select '&;
USER="root[root] @ localhost []"
HOST="localhost"
OS_USER=""
IP=""
DB="test"
/>
Note that </AUDIT> is written in the middle of <AUDIT_RECORD>. Probably footer (which is written by logger_close) interferes with the usual record written by flush thread.