Bug #92040 TSAN: Data race in safe_mutex implementation
Submitted: 16 Aug 2018 10:45 Modified: 29 Aug 2018 18:15
Reporter: Jon Olav Hauglid Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:8.0.14 OS:Any
Assigned to: CPU Architecture:Any

[16 Aug 2018 10:45] Jon Olav Hauglid
Description:
Thread Sanitizer reveals that the safe_mutex_assert_owner() and safe_mutex_assert_not_owner()
functions are not thread safe as they inspect members of the safe_mutex_t struct without
holding the protecting mutex.

This only has consequences for debug builds as safe_mutex is not used for release builds.

How to repeat:
Run pretty much any MTR test on server built with WITH_TSAN.
[29 Aug 2018 18:15] Paul DuBois
Posted by developer:
 
Fixed in 8.0.14.

Data races discovered by Thread Sanitizer in Event_queue::lock_data
and the SAFE_MUTEX implementation were fixed.