[MDEV-13684] InnoDB race condition between fil_crypt_thread and btr_scrub_init Created: 2017-08-31  Updated: 2017-08-31  Resolved: 2017-08-31

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB, Storage Engine - XtraDB
Affects Version/s: 10.1.10, 10.2.0, 10.3.0
Fix Version/s: 10.1.27, 10.2.9, 10.3.2

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

Issue Links:
Relates
relates to MDEV-13485 MTR tests fail massively with --innod... Closed

 Description   

There is a race condition in InnoDB startup. A number of fil_crypt_thread are created by fil_crypt_threads_init(). These threads may call btr_scrub_complete_space() before btr_scrub_init() was called. Those too early calls would be accessing an uninitialized scrub_stat_mutex.

The bug was introduced in MariaDB 10.1.10 when the btr_scrub_init() call was moved after the fil_crypt_threads_init() call. That change was made unnecessary in a MDEV-12052 related clean-up in MariaDB 10.1.24.

The bug was caught in 10.2 thanks to the assertion that was added in MDEV-13485.



 Comments   
Comment by Jan Lindström (Inactive) [ 2017-08-31 ]

ok to push.

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