Thursday, September 3, 2015

A Monster Test Crashes the Thread Sanitizer

One of the TokuFT (now PerconaFT) tests crashed the Thread Sanitizer that is included in clang 3.5.   The crash occurred at run time after the test was compiled.   I instrumented TokuFT to trace all of the mutex initialization, lock, and unlock functions called by the failing test.  This trace was used to create a monster test case with 12,258 mutexes and over 445K mutex operations.  Unfortunately, this crash does not occur with the latest clang 3.8 (thanks Dmitry for investigating this), so it is time to upgrade to a version of clang with this bug fixed.

In addition, I ran into another Thread Sanitizer crash in its deadlock detector and a workaround was quickly produced.  Thanks Kostya.

Lessons remembered: check if the problem was reported previously, and always try the latest and greatest version of the software.   The problem could already be fixed.

No comments:

Post a Comment