The Quest for Precision: A Layered Approach for Data Race Detection in Static Analysis

Low level data-races in multi-threaded software are hard to detect, especially when requiring exhaustiveness, speed and precision. In this work, we combine ideas from run-time verification, static analysis and model checking to balance the above requirements. In particular, we adopt a well-known dynamic race detection algorithm based on calculating lock sets to static program analysis for achieving exhaustiveness. The resulting data race candidates are in a further step investigated by model checking with respect to a formal threading model to achieve precision. Moreover, we demonstrate the effectiveness of the combined approach by a case study on the open-source TFTP server OpenTFTP, which shows the trade-off between speed and precision in our two-stage analysis.

[1]  Bernhard Steffen,et al.  Parallelism for Free : E cient and Optimal Bitvector Analyses for Parallel Programs , 1996 .

[2]  Alexander Aiken,et al.  Effective static race detection for Java , 2006, PLDI '06.

[3]  Jeffrey S. Foster,et al.  LOCKSMITH: context-sensitive correlation analysis for race detection , 2006, PLDI '06.

[4]  Armin Biere,et al.  High‐level data races , 2003, Softw. Test. Verification Reliab..

[5]  Daniel Kroening,et al.  SATABS: SAT-Based Predicate Abstraction for ANSI-C , 2005, TACAS.

[6]  Ralf Huuck,et al.  Model Checking Software at Compile Time , 2007, First Joint IEEE/IFIP Symposium on Theoretical Aspects of Software Engineering (TASE '07).

[7]  Ricardo J. Dias,et al.  Precise Detection of Atomicity Violations , 2012, Haifa Verification Conference.

[8]  Rajeev Alur,et al.  A Temporal Logic of Nested Calls and Returns , 2004, TACAS.

[9]  Ricardo J. Dias,et al.  Detecting concurrency anomalies in transactional memory programs , 2011, Comput. Sci. Inf. Syst..

[10]  Armin Biere,et al.  Using Block-Local Atomicity to Detect Stale-Value Concurrency Errors , 2004, ATVA.

[11]  Bradford Nichols,et al.  Pthreads programming , 1996 .

[12]  Edith Schonberg,et al.  On-the-fly detection of access anomalies , 2018, PLDI '89.

[13]  Amey Karkare,et al.  Heap reference analysis using access graphs , 2006, ACM Trans. Program. Lang. Syst..

[14]  Todd Millstein,et al.  Automatic predicate abstraction of C programs , 2001, PLDI '01.

[15]  Klaus Havelund,et al.  Model Checking Programs , 2004, Automated Software Engineering.

[16]  NaikMayur,et al.  Effective static race detection for Java , 2006 .

[17]  Armin Biere,et al.  Applying static analysis to large-scale, multi-threaded Java programs , 2001, Proceedings 2001 Australian Software Engineering Conference.

[18]  Michael Burrows,et al.  Eraser: a dynamic data race detector for multithreaded programs , 1997, TOCS.

[19]  Yu Yang,et al.  Dynamic Model Checking with Property Driven Pruning to Detect Race Conditions , 2008, ATVA.

[20]  Helmut Seidl,et al.  Region Analysis for Race Detection , 2009, SAS.

[21]  Serdar Tasiran,et al.  Goldilocks: a race and transaction-aware java runtime , 2007, PLDI '07.

[22]  Stephen N. Freund,et al.  Types for atomicity: Static checking and inference for Java , 2008, TOPL.