[MDEV-12259] rocksdb.drop_table rocksdb.drop_table crash Created: 2017-03-14  Updated: 2017-11-07  Resolved: 2017-04-03

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - RocksDB
Affects Version/s: None
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Sergei Golubchik Assignee: Sergei Golubchik
Resolution: Cannot Reproduce Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-14308 rocksdb.drop_table locks in set globa... Open

 Description   

Running rocksdb.drop_table twice causes a crash:

$ ./mtr rocksdb.drop_table rocksdb.drop_table



 Comments   
Comment by Sergei Petrunia [ 2017-03-15 ]

serg, is it a crash or a timeout? I get a timeout https://gist.github.com/spetrunia/fadee1bf567f7369caf6861d9acfa608 ...
which seems to be a common problem affecting a few tests:
https://jira.mariadb.org/browse/MDEV-9658?focusedCommentId=93018&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-93018

This is something that started to happen after the last merge. No idea what it is, yet.

Comment by Sergei Petrunia [ 2017-03-15 ]

And it works on the release build:

ubuntu@ip-172-31-42-80:~/mariadb-10.2/mysql-test$ ./mtr rocksdb.drop_table  rocksdb.drop_table 
Logging: ./mtr  rocksdb.drop_table rocksdb.drop_table                                                                                                                                             
vardir: /home/ubuntu/mariadb-10.2/mysql-test/var                                                                                                                                                  
Checking leftover processes...                                                                                                                                                                    
Removing old var directory...                                                                                                                                                                     
Creating var directory '/home/ubuntu/mariadb-10.2/mysql-test/var'...                                                                                                                              
Checking supported features...                                                                                                                                                                    
MariaDB Version 10.2.5-MariaDB                                                                                                                                                                    
 - SSL connections supported                                                                                                                                                                      
Collecting tests...                                                                                                                                                                               
Installing system database...                                                                                                                                                                     
                                                                                                                                                                                                  
==============================================================================                                                                                                                    
                                                                                                                                                                                                  
TEST                                      RESULT   TIME (ms) or COMMENT                                                                                                                           
--------------------------------------------------------------------------                                                                                                                        
 
worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
rocksdb.drop_table                       [ pass ]  263952
rocksdb.drop_table                       [ pass ]  268871
--------------------------------------------------------------------------
The servers were restarted 0 times
Spent 532.823 of 536 seconds executing testcases
 
Completed: All 2 tests were successful.

Comment by Sergei Petrunia [ 2017-03-15 ]

Debug build is a bit slower but not by much, and the test still passes

ubuntu@ip-172-31-42-80:~/mariadb-10.2-dbg/mysql-test$ ./mtr rocksdb.drop_table  rocksdb.drop_table 
Logging: ./mtr  rocksdb.drop_table rocksdb.drop_table
vardir: /home/ubuntu/mariadb-10.2-dbg/mysql-test/var
Removing old var directory...
Creating var directory '/home/ubuntu/mariadb-10.2-dbg/mysql-test/var'...
Checking supported features...
MariaDB Version 10.2.5-MariaDB-debug
 - SSL connections supported
 - binaries are debug compiled
Collecting tests...
Installing system database...
 
==============================================================================
 
TEST                                      RESULT   TIME (ms) or COMMENT
--------------------------------------------------------------------------
 
worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
rocksdb.drop_table                       [ pass ]  308815
rocksdb.drop_table                       [ pass ]  309536
--------------------------------------------------------------------------
The servers were restarted 0 times
Spent 618.351 of 622 seconds executing testcases
 
Completed: All 2 tests were successful.

Comment by Sergei Golubchik [ 2017-03-15 ]

I'm getting a crash. I'll reassign it to me for now.

Comment by Sergei Petrunia [ 2017-03-15 ]

The tests seem to run very slowly, especially so on the machine with rotating HDD (the above times are from Amazon EC2, and SSD. HDD is even slower)

Trying to disable MyRocks' flushing:

diff --git a/storage/rocksdb/mysql-test/rocksdb/my.cnf b/storage/rocksdb/mysql-test/rocksdb/my.cnf
index c6817df..64420f7 100644
--- a/storage/rocksdb/mysql-test/rocksdb/my.cnf
+++ b/storage/rocksdb/mysql-test/rocksdb/my.cnf
@@ -9,3 +9,5 @@ sql-mode=NO_ENGINE_SUBSTITUTION
 explicit-defaults-for-timestamp=1
 loose-rocksdb_lock_wait_timeout=1
 loose-rocksdb_strict_collation_check=0
+
+loose-rocksdb-flush-log-at-trx-commit=0

ubuntu@ip-172-31-42-80:~/mariadb-10.2-dbg/mysql-test$ ./mtr rocksdb.drop_table  rocksdb.drop_table 
Logging: ./mtr  rocksdb.drop_table rocksdb.drop_table
vardir: /home/ubuntu/mariadb-10.2-dbg/mysql-test/var
Checking leftover processes...
Removing old var directory...
Creating var directory '/home/ubuntu/mariadb-10.2-dbg/mysql-test/var'...
Checking supported features...
MariaDB Version 10.2.5-MariaDB-debug
 - SSL connections supported
 - binaries are debug compiled
Collecting tests...
Installing system database...
 
==============================================================================
 
TEST                                      RESULT   TIME (ms) or COMMENT
--------------------------------------------------------------------------
 
worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
rocksdb.drop_table                       [ pass ]  46547
rocksdb.drop_table                       [ pass ]  46338
--------------------------------------------------------------------------
The servers were restarted 0 times
Spent 92.885 of 97 seconds executing testcases
 
Completed: All 2 tests were successful.

Comment by Sergei Petrunia [ 2017-03-15 ]

A lot of timeouts go away if I set @@rocksdb_flush_logs_at_trx_commit to 0 for
the rocksdb test suite:

https://gist.github.com/spetrunia/d61bf3f92ca248cd57a3e87504daece0
https://gist.github.com/spetrunia/19eed7367eeb05b3500d062ca7e0e49e

Generated at Thu Feb 08 07:56:21 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.