[MDEV-13515] rocksdb.use_direct_reads_writes fails in buildbot with not found pattern Created: 2017-08-13  Updated: 2017-08-15  Resolved: 2017-08-15

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - RocksDB, Tests
Affects Version/s: 10.2
Fix Version/s: 10.2.8

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Sergei Petrunia
Resolution: Fixed Votes: 0
Labels: None


 Description   

http://buildbot.askmonty.org/buildbot/builders/kvm-deb-sid-amd64/builds/4384/steps/mtr/logs/stdio

rocksdb.use_direct_reads_writes          w1 [ fail ]
        Test ended at 2017-08-11 12:36:50
 
CURRENT_TEST: rocksdb.use_direct_reads_writes
--- /usr/share/mysql/mysql-test/plugin/rocksdb/rocksdb/r/use_direct_reads_writes.result	2017-08-11 11:30:24.000000000 -0400
+++ /dev/shm/var/1/log/use_direct_reads_writes.reject	2017-08-11 12:36:49.770052236 -0400
@@ -1,4 +1,4 @@
 call mtr.add_suppression("rocksdb");
 call mtr.add_suppression("Aborting");
 FOUND 1 /enable both use_direct_reads/ in mysqld.1.err
-FOUND 1 /enable both use_direct_io_for_flush_and_compaction/ in mysqld.1.err
+NOT FOUND /enable both use_direct_io_for_flush_and_compaction/ in mysqld.1.err
 
mysqltest: Result length mismatch



 Comments   
Comment by Sergei Petrunia [ 2017-08-14 ]

This is not easily reproducible.

I noticed there is a typo in the error log:

 
2017-08-14 10:57:07 140082647533376 [ERROR] RocksDB: Can't enable both use_direct_io_for_flush_and_compaction use_direct_io_for_flush_and_compaction and allow_mmap_writes

but it cant' cause this issue, can it...

Comment by Sergei Petrunia [ 2017-08-14 ]

The issue comes from these lines in use_direct_reads_writes.test

--exec echo "restart:--rocksdb_use_direct_io_for_flush_and_compaction=1 --rocksdb_allow_mmap_writes=1" >$_expect_file_name
--sleep 0.1
--exec echo "restart:" >$_expect_file_name

MTR's check_expected_crash_and_restart function is invoked whenever mysqld process crashes or exits.

  • if mysqld.expect file is not present, then this is considered to be a test failure
  • if mysqld.expect file is present, it has commands to either wait or restart the server
  • * in either case, .expect file is deleted after MTR has read the command from it.

In order to start the server with invalid arguments, use_direct_reads_writes.test puts them into .expect file and then it MUST be able to provide another .expect file.
This must happen

  • after MTR has read and deleted the first file
  • before the server has exited and MTR started to look what to do about this.

sleep 0.1 achieves this most of the time but this is still a race condition.

Generated at Thu Feb 08 08:06:11 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.