Testing concurrent programs using value schedules

Concurrent programs are difficult to debug and verify because of the nondeterministic nature of concurrent executions. A particular concurrency-related bug may only show up under certain rarely-executed thread interleavings. Therefore, commonly used debugging methodologies, such as inserting print statements, are no longer sufficient for uncovering concurrency-related bugs. However, many existing bug detection methods, such as dynamic analysis and model checking, have a very high computational cost. In this paper, we introduce a new technique for uncovering concurrency-related bugs from multithreaded Java programs. Our technique uncovers concurrency-related bugs by generating and testing read-write assignment sequences, referred to as value schedules, of a multithreaded Java program. Our value-schedule-based technique distinguishes itself in its ability to avoid exploring superfluous program state space caused by speculative permutation on transitions. Therefore, our technique can achieve a higher degree of POR (Partial Order Reduction) than existing methods. We demonstrate our technique using some programs, with an implementation built using an explicit state model checker called JPF

[1]  Jason Gait,et al.  A probe effect in concurrent programs , 1986, Softw. Pract. Exp..

[2]  Barton P. Miller,et al.  What are race conditions?: Some issues and formalizations , 1992, LOPL.

[3]  Laurie J. Hendren,et al.  Context-sensitive interprocedural points-to analysis in the presence of function pointers , 1994, PLDI '94.

[4]  Gwan-Hwan Hwang,et al.  Reachability testing: an approach to testing concurrent software , 1994, Proceedings of 1st Asia-Pacific Software Engineering Conference.

[5]  S. Savage,et al.  Eraser: a dynamic data race detector for multi-threaded programs , 1997 .

[6]  Michael Burrows,et al.  Eraser: a dynamic data race detector for multi-threaded programs , 1997, TOCS.

[7]  Patrice Godefroid,et al.  Model checking for programming languages using VeriSoft , 1997, POPL '97.

[8]  Gerard J. Holzmann,et al.  The Model Checker SPIN , 1997, IEEE Trans. Software Eng..

[9]  George S. Avrunin,et al.  An efficient algorithm for computing MHP information for concurrent Java programs , 1999, ESEC/FSE-7.

[10]  G. Ramalingam,et al.  Context-sensitive synchronization-sensitive analysis is undecidable , 2000, TOPL.

[11]  Willem Visser,et al.  Combining static analysis and model checking for software analysis , 2001, Proceedings 16th Annual International Conference on Automated Software Engineering (ASE 2001).

[12]  Dawson R. Engler,et al.  RacerX: effective, static detection of race conditions and deadlocks , 2003, SOSP '03.

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

[14]  Ondrej Lhoták,et al.  Scaling Java Points-to Analysis Using SPARK , 2003, CC.

[15]  Stephen N. Freund,et al.  Atomizer: a dynamic atomicity checker for multithreaded programs , 2004, 18th International Parallel and Distributed Processing Symposium, 2004. Proceedings..

[16]  Eitan Farchi,et al.  Fidgeting to the point of no return , 2004, 18th International Parallel and Distributed Processing Symposium, 2004. Proceedings..

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

[18]  Grigore Rosu,et al.  An Overview of the Runtime Verification Tool Java PathExplorer , 2004, Formal Methods Syst. Des..

[19]  Richard N. Taylor,et al.  Complexity of analyzing the synchronization structure of concurrent programs , 1983, Acta Informatica.

[20]  Dinghao Wu,et al.  KISS: keep it simple and sequential , 2004, PLDI '04.

[21]  Rahul Agarwal,et al.  Optimized run-time race detection and atomicity checking using partial discovered types , 2005, ASE.

[22]  Wei Chen,et al.  RaceTrack: efficient detection of data race conditions via adaptive tracking , 2005, SOSP '05.

[23]  Shmuel Ur,et al.  Multi-threaded Testing with AOP Is Easy, and It Finds Bugs! , 2005, Euro-Par.

[24]  Jun Chen,et al.  Choosing Among Alternative Futures , 2005, Haifa Verification Conference.

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

[26]  Martín Abadi,et al.  Types for safe locking: Static race detection for Java , 2006, TOPL.

[27]  Scott D. Stoller,et al.  Accurate and efficient runtime detection of atomicity errors in concurrent programs , 2006, PPoPP '06.

[28]  Richard H. Carver,et al.  Reachability testing of concurrent programs , 2006, IEEE Transactions on Software Engineering.

[29]  Eitan Farchi,et al.  Choosing among alternative pasts , 2007, Concurr. Comput. Pract. Exp..

[30]  Alexander Aiken,et al.  Conditional must not aliasing for static race detection , 2007, POPL '07.