| Bug #86508 | TSAN: data race in cleanup_instruments | ||
|---|---|---|---|
| Submitted: | 30 May 2017 12:14 | Modified: | 1 Jun 2017 14:54 |
| Reporter: | Tor Didriksen | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Compiling | Severity: | S3 (Non-critical) |
| Version: | 8.0.2 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
[1 Jun 2017 14:54]
Paul DuBois
Posted by developer: Fixed in 8.0.2. Code cleanup. No changelog entry needed.

Description: WARNING: ThreadSanitizer: data race (pid=3232) Write of size 8 at 0x0000037030c8 by main thread: #0 cleanup_instruments() ../storage/perfschema/pfs_instr.cc:289 (mysqld+0x00000225167a) #1 cleanup_performance_schema ../storage/perfschema/pfs_server.cc:306 (mysqld+0x00000226e0d4) #2 shutdown_performance_schema() ../storage/perfschema/pfs_server.cc:338 (mysqld+0x00000226ebc2) #3 mysqld_exit ../sql/mysqld.cc:1795 (mysqld+0x0000008cd81f) #4 mysqld_main(int, char**) ../sql/mysqld.cc:5963 (mysqld+0x0000008e79d9) #5 main ../sql/main.cc:25 (mysqld+0x0000008cc474) How to repeat: cmake .. -DWITH_RAPID=0 -DWITH_DEBUG=1 -DWITH_TSAN=1 ./mtr --mem --sanitize main.1st Suggested fix: Use std::atomic<pointer> rather than raw pointer