[MDEV-30064] binlog.binlog_mysqlbinlog_raw_flush sometimes fails with Errcode: 2 "No such file or directory" Created: 2022-11-21  Updated: 2023-11-22  Resolved: 2023-11-15

Status: Closed
Project: MariaDB Server
Component/s: Tests
Affects Version/s: 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11
Fix Version/s: 10.4.33, 10.5.24, 10.6.17, 10.11.7, 11.0.5, 11.1.4, 11.2.3, 11.3.2

Type: Bug Priority: Major
Reporter: Angelique Sklavounos (Inactive) Assignee: Kristian Nielsen
Resolution: Fixed Votes: 0
Labels: None


 Description   

https://buildbot.mariadb.org/#/builders/208/builds/9063

10.5 4b3b1eb81

binlog.binlog_mysqlbinlog_raw_flush 'row' w1 [ fail ]
        Test ended at 2022-11-16 16:13:55
 
CURRENT_TEST: binlog.binlog_mysqlbinlog_raw_flush
/home/buildbot/amd64-ubuntu-1804-bigtest/build/client//mariadb-binlog: File '/home/buildbot/amd64-ubuntu-1804-bigtest/build/mysql-test/var/1/tmp/master-bin.000002' not found (Errcode: 2 "No such file or directory")
mysqltest: At line 36: exec of '/home/buildbot/amd64-ubuntu-1804-bigtest/build/client//mariadb-binlog --defaults-file=/home/buildbot/amd64-ubuntu-1804-bigtest/build/mysql-test/var/1/my.cnf --local-load=/home/buildbot/amd64-ubuntu-1804-bigtest/build/mysql-test/var/tmp/1 /home/buildbot/amd64-ubuntu-1804-bigtest/build/mysql-test/var/1/tmp/master-bin.000002 > /home/buildbot/amd64-ubuntu-1804-bigtest/build/mysql-test/var/1/tmp/local-bin.000002.out' failed, error: 256, status: 1, errno: 0
Output from before failure:
# MYSQL_BINLOG MYSQLTEST_VARDIR/tmp/master-bin.000002 > MYSQLTEST_VARDIR/tmp/local-bin.000002.out
 
 
 
The result from queries just before the failure was:
CREATE TABLE t1 (a int);
FLUSH LOGS;
INSERT INTO t1 VALUES (1);
# timeout TIMEOUT MYSQL_BINLOG --raw --read-from-remote-server --user=root --host=127.0.0.1 --port=MASTER_MYPORT --stop-never --result-file=MYSQLTEST_VARDIR/tmp/ master-bin.000001
# MYSQL_BINLOG MYSQLTEST_VARDIR/tmp/master-bin.000002 > MYSQLTEST_VARDIR/tmp/local-bin.000002.out



 Comments   
Comment by Kristian Nielsen [ 2023-11-15 ]

The test runs a mariadb-binlog --read-from-remote-server and kills it (linux \`timeout\` command) after 1 second.
The test fails mostly on valgrind builder, it seems the 1 second timeout is too short there, so the expected file does not get written.

Comment by Kristian Nielsen [ 2023-11-15 ]

Hm, don't see an easy way to make this test case loop to wait for the condition to occur. The test case actually depends on the `timeout` command killing the mariadb-binlog program, as it's testing a missing flush of output buffers (normal exit will flush buffers first). And there doesn't seem to be good tools available for mysqltest to loop, waiting for the file to have the expected contents.

I think just increasing the timeout somewhat is fine in this case. If this somehow still occurs, we can reconsider.

Comment by Kristian Nielsen [ 2023-11-15 ]

Pushed to 10.4

Generated at Thu Feb 08 10:13:22 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.