The "mysql_real_connect" function is used by MySQL clients, including multi-threaded clients, to connect to a MySQL server. The "mysql_real_connect" function is allowed to be run by concurrent threads without application level serialization. Unfortunately, the thread sanitizer found a data race in the "mysql_real_connect" function when processing the …
[Read more]The MySQL server is a large multi-threaded program primarily written in the C++ programming language. Unfortunately, data races and deadlocks in concurrent C++ programs are common. Fortunately, the Thread Sanitizer can be used to find data races and deadlocks. MySQL 5.7 does not support the Thread Sanitizer, but is is easy to add to the MySQL configuration using a simple build procedure. When MySQL 5.7 is built with the Thread Sanitizer and database …
[Read more]
Percona recently open sourced TokuBackup, a library that may be used to take a
snapshot of a set of files while these files are being changed by
a running application like MySQL or MongoDB. Making
TokuBackup open source allows a larger set of users to improve
and extend the software. This blog describes how the
Address Sanitizer and Thread Sanitizer found bugs in the TokuBackup
library.
The TokuBackup library is used by Percona Server for MySQL and …
TokuFT (now called PerconaFT) is the write optimized storage component used by
TokuDB for MySQL and TokuMX for MongoDB. Since TokuFT is its
own component, TokuFT can be tested independently of TokuDB and
TokuMX. Some of the TokuFT tests use valgrind's memcheck,
helgrind, and DRD tools to identify bugs.
Helgrind and DRD find data races in multi-threaded programs at
runtime rather than at compile time. In my experience with
these …
Valgrind's helgrind tool identifies data races and lock
deadlocks in multi-threaded programs. Since the MySQL
server is a multi-threaded program, can helgrind find any issues
in the MySQL server?
A simple test that does nothing except start up the MySQL server
and shut it down is run on the MySQL test suite with memcheck and with helgrind. For this simple test
on MySQL 5.7.7, the memcheck run is nice and
clean but the …