Slow Log Rotation Hang Bug
I've been doing some testing with various versions of MySQL and MariaDB regarding slow log rotation. And it looks like MariaDB (tested 10.4, 10.5, 10.6 so far) suffers from a bug. Setup: sloq_query_log=1 long_query_time=0 # sysbench oltp_read_write --threads=$(nproc) Action: mv slow.log slow.log.1 MariaDB [(none)]> flush slow logs; ^^ This never returns (never as in I haven't tried waiting for > 10 minutes). On MySQL 5.5 this is instantaneous. On 5.6 - 8.0 it takes a few seconds, worst case I measured over the weekend is 77s, which is pretty terrible, but with MariaDB 10.3 - 10.6 it never seems to complete at all. If I kill sysbench, it completes immediately. On 10.3 it works, in line with MySQL 5.6 - 8.0. This seems like a rather significant bug.
Correction: - with MariaDB 10.3 - 10.6 it never seems to complete at all. + with MariaDB 10.4 - 11.4 it never seems to complete at all. On Sun, Nov 17, 2024 at 6:44 PM Gordan Bobic <gordan.bobic@gmail.com> wrote:
I've been doing some testing with various versions of MySQL and MariaDB regarding slow log rotation. And it looks like MariaDB (tested 10.4, 10.5, 10.6 so far) suffers from a bug.
Setup: sloq_query_log=1 long_query_time=0
# sysbench oltp_read_write --threads=$(nproc)
Action: mv slow.log slow.log.1
MariaDB [(none)]> flush slow logs;
^^ This never returns (never as in I haven't tried waiting for > 10 minutes).
On MySQL 5.5 this is instantaneous. On 5.6 - 8.0 it takes a few seconds, worst case I measured over the weekend is 77s, which is pretty terrible, but with MariaDB 10.3 - 10.6 it never seems to complete at all.
If I kill sysbench, it completes immediately.
On 10.3 it works, in line with MySQL 5.6 - 8.0.
This seems like a rather significant bug.
Additional: Whatever the cause, it got substantially worse in 10.4.34. With 10.4.0-10.4.33 it isn't great, but it typically finishes in between a few seconds up to 5 minutes. With 10.4.34, it never finishes in the seconds, I saw only one example in hours of testing where it `flush slow logs;` under heavy load completed in under a minute, in most cases it takes upward of 10 minutes. On Sun, Nov 17, 2024 at 6:56 PM Gordan Bobic <gordan.bobic@gmail.com> wrote:
Correction: - with MariaDB 10.3 - 10.6 it never seems to complete at all. + with MariaDB 10.4 - 11.4 it never seems to complete at all.
On Sun, Nov 17, 2024 at 6:44 PM Gordan Bobic <gordan.bobic@gmail.com> wrote:
I've been doing some testing with various versions of MySQL and MariaDB regarding slow log rotation. And it looks like MariaDB (tested 10.4, 10.5, 10.6 so far) suffers from a bug.
Setup: sloq_query_log=1 long_query_time=0
# sysbench oltp_read_write --threads=$(nproc)
Action: mv slow.log slow.log.1
MariaDB [(none)]> flush slow logs;
^^ This never returns (never as in I haven't tried waiting for > 10 minutes).
On MySQL 5.5 this is instantaneous. On 5.6 - 8.0 it takes a few seconds, worst case I measured over the weekend is 77s, which is pretty terrible, but with MariaDB 10.3 - 10.6 it never seems to complete at all.
If I kill sysbench, it completes immediately.
On 10.3 it works, in line with MySQL 5.6 - 8.0.
This seems like a rather significant bug.
Hi, Gordan, Could you please report it on jira.mariadb.org? On Nov 17, Gordan Bobic via discuss wrote:
I've been doing some testing with various versions of MySQL and MariaDB regarding slow log rotation. And it looks like MariaDB (tested 10.4, 10.5, 10.6 so far) suffers from a bug.
Setup: sloq_query_log=1 long_query_time=0
# sysbench oltp_read_write --threads=$(nproc)
Action: mv slow.log slow.log.1
MariaDB [(none)]> flush slow logs;
^^ This never returns (never as in I haven't tried waiting for > 10 minutes).
On MySQL 5.5 this is instantaneous. On 5.6 - 8.0 it takes a few seconds, worst case I measured over the weekend is 77s, which is pretty terrible, but with MariaDB 10.3 - 10.6 it never seems to complete at all.
If I kill sysbench, it completes immediately.
On 10.3 it works, in line with MySQL 5.6 - 8.0.
This seems like a rather significant bug.
Regards, Sergei Chief Architect, MariaDB Server and security@mariadb.org
Done: https://jira.mariadb.org/browse/MDEV-35444 On Tue, Nov 19, 2024 at 4:11 PM Sergei Golubchik <serg@mariadb.org> wrote:
Hi, Gordan,
Could you please report it on jira.mariadb.org?
On Nov 17, Gordan Bobic via discuss wrote:
I've been doing some testing with various versions of MySQL and MariaDB regarding slow log rotation. And it looks like MariaDB (tested 10.4, 10.5, 10.6 so far) suffers from a bug.
Setup: sloq_query_log=1 long_query_time=0
# sysbench oltp_read_write --threads=$(nproc)
Action: mv slow.log slow.log.1
MariaDB [(none)]> flush slow logs;
^^ This never returns (never as in I haven't tried waiting for > 10 minutes).
On MySQL 5.5 this is instantaneous. On 5.6 - 8.0 it takes a few seconds, worst case I measured over the weekend is 77s, which is pretty terrible, but with MariaDB 10.3 - 10.6 it never seems to complete at all.
If I kill sysbench, it completes immediately.
On 10.3 it works, in line with MySQL 5.6 - 8.0.
This seems like a rather significant bug.
Regards, Sergei Chief Architect, MariaDB Server and security@mariadb.org
participants (2)
-
Gordan Bobic
-
Sergei Golubchik