[MDEV-23776] Test encryption.create_or_replace fails intermittently with a warning Created: 2020-09-21  Updated: 2022-01-06  Resolved: 2020-09-21

Status: Closed
Project: MariaDB Server
Component/s: Encryption, Storage Engine - InnoDB, Tests
Affects Version/s: 10.3, 10.4, 10.5
Fix Version/s: 10.2.35, 10.3.26, 10.4.16, 10.5.7

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-23651 InnoDB: Failing assertion: !space->re... Closed

 Description   

The test encryption.create_or_replace would occasionally fail with a warning message:

10.3 fba6ffe433fdba7aa397f1de8eb4ee0a74f55800

encryption.create_or_replace 'ctr,innodb' w2 [ fail ]  Found warnings/errors in server log file!
        Test ended at 2020-09-21 12:14:12
line
2020-09-21 12:14:06 9 [Warning] InnoDB: Trying to delete tablespace 'test/table0_int_autoinc' but there are 1 pending operations on it.

This test is effectively disabled on our CI systems, because it is marked as big test, but the failure was rather easy to repeat on 10.3 and 10.4.

This seems to have become more prominent after MDEV-23651 was fixed. The problem appears to be that fil_crypt_find_space_to_rotate() is not releasing the tablespace handle while waiting for I/O capacity, and fil_space_crypt_close_tablespace() is not waking up the threads that are in the waiting loop.



 Comments   
Comment by Marko Mäkelä [ 2020-09-21 ]

In order to be able to reproduce this with https://rr-project.org/ I split part of the test case into a new test encryption.create_or_replace_big and made the ‘core’ test also compatible with the embedded server tests. Now the cleaned-up test encryption.create_or_replace should run on our CI systems.

Comment by Marko Mäkelä [ 2020-09-22 ]

I do not remember seeing this failure in 10.2. I did not attempt repeating it on 10.2 either. I thought that the scenario is possible there and initially pushed the fix to 10.2 as well.

The revival of the test encryption.create_or_replace (so that it is actually run on our CI system) caused failures of the test encryption.innodb-bad-key-change in 10.2 but not 10.3 or 10.4. It turned out that those failures were due to missing server initialization between the two tests and repeatable by invoking

./mtr --no-reorder encryption.create_or_replace,cbc encryption.innodb-bad-key-change,cbc

I fixed the first test and re-applied the code fix to 10.2.

Generated at Thu Feb 08 09:24:58 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.