Microsoft Cuzz: Fuzz Testing Goes Parallel
Wandering the Professional Developer Conference (PDC) show floor today, I ran across the Microsoft Research section, and spoke with Maden Musuvathi, a researcher in the Software Reliability Research group at Microsoft Research working on testing solutions for concurrent code. He was demoing a prototype product called Microsoft Cuzz -- shorthand for Concurrent Fuzz testing.
Of course, fuzz testing is used to smoke out flaws in code by blasting random or otherwise unexpected data input at application interfaces, with the goal of kicking off program failures that might otherwise go undetected. Cuzz does something similar, shaping thread interaction in concurrent C or C++ Win32 code to create conditions likely to produce hard to reproduce failures.
As Musuvathi explains. Cuzz determines the mathematical probability that a concurrent code failure will occur by observing the number of threads and the number of synchronizations. Other issues, such as locks, mutexes and complex synchronizations don't impact the calculated probability, Musuvathi said. Developers inject the Cuzz DLL into the binary executable and then run the test. Cuzz tracks each thread it activates, logging the thread activations that result in a crash.
Musuvathi said that developers at PDC have lamented the difficulty of finding and resolving concurrency-based flaws. It's a lament Microsoft's own teams have shared. Musuvathi said another concurrent code testing app --
called CHESS -- was initially developed to help parallel code projects at Microsoft, including Parallel LINQ and Task Parallel Library (TPL). Musuvathi described CHESS as a unit testing tool, whereas Cuzz can be broadly applied to detect hard-to-find flaws.
Cuzz remains a project, but Musuvathi is hopeful that the tool can find its way into developers hands down the road. He also says the program will likely be advanced to address managed and 64-bit parallel code down the road.
Posted by Michael Desmond on 11/18/2009