Multithreaded Concurrency Defect Detection for JVM Applications
Currently, with the rapid development of multi-core computer hardware, multithreaded concurrent programs are gaining increasing popularity and widespread adoption. However, due to the hidden nature of shared memory space access and the randomness of concurrent thread scheduling, multithreaded programs are highly susceptible to concurrency defects, which are often difficult to detect and reproduce. Existing concurrency defect detection methods all have their limitations; for example, methods based on system testing and symbolic execution cannot scale to large concurrent programs due to state space explosion, while methods based on probabilistic scheduling have a very low defect hit rate. To address the enormous challenges faced in concurrent program testing today, the DATE team developed DATE-Confu, a multithreaded concurrency defect detection tool for JVM applications based on dynamic program testing techniques. The tool takes JVM executable programs under test (.class files or .jar files) as input and outputs the set of concurrency defects detected in the program. Currently, the tool can detect six categories of serious concurrency defects, including data races, deadlocks, and null pointer dereferences. Users can select which types of concurrency defects to detect based on their needs. The key innovation of DATE-Confu lies in its effective combination of guided schedule fuzzing techniques and symbolic trace analysis techniques. The figure below shows the architecture diagram of DATE-Confu. The tool uses fuzzing techniques to efficiently traverse the enormous state space of multithreaded programs, while the symbolic trace analysis techniques rapidly discover unexplored control branches in the program under test, thereby providing effective information for iterative fuzzing and enabling DATE-Confu to reach higher coverage faster. DATE-Confu has so far been tested on multiple industrial-level projects. The experiments conducted to date have demonstrated that DATE-Confu achieves high testing efficiency and is capable of uncovering deeper-hidden concurrency defects.