A Meta Heuristic for Effectively Detecting Concurrency Errors

Mainstream programming is migrating to concurrent architectures to improve performance and facilitate more complex computation. The state of the art static analysis tools for detecting concurrency errors are imprecise, generate a large number of false error warnings, and require manual verification of each warning. In this paper we present a meta heuristic to help reduce the manual effort required in the verification of warnings generated by static analysis tools. We manually generate a small sequence of program locations that represent points of interest in checking the feasibility of a particular static analysis warning; then we use a meta heuristic to automatically control scheduling decisions in a model checker to guide the program along the input sequence to test the feasibility of the warning. The meta heuristic guides a greedy depth-first search based on a two-tier ranking system where the first tier considers the number of program locations already observed from the input sequence, and the second tier considers the perceived closeness to the next location in the input sequence. The error traces generated by this technique are real and require no further manual verification. We show the effectiveness of our approach by detecting feasible concurrency errors in benchmarked concurrent programs and the JDK 1.4 concurrent libraries based on warnings generated by the Jlint static analysis tool.

[1]  Assaf Schuster,et al.  Scaling model checking of dataraces using dynamic information , 2007, J. Parallel Distributed Comput..

[2]  Michael D. Ernst,et al.  Static Deadlock Detection for Java Libraries , 2005, ECOOP.

[3]  Alex Groce,et al.  Model checking Java programs using structural heuristics , 2002, ISSTA '02.

[4]  Andreas Podelski,et al.  ACSAR: Software Model Checking with Transfinite Refinement , 2007, SPIN.

[5]  Andrew P. Black ECOOP 2005 - Object-Oriented Programming, 19th European Conference, Glasgow, UK, July 25-29, 2005, Proceedings , 2005, ECOOP.

[6]  Stefan Leue,et al.  Trail-directed model checking , 2001, Workshop on Software Model Checking @ CAV.

[7]  Eric Mercer,et al.  An Improved Distance Heuristic Function for Directed Software Model Checking , 2006, 2006 Formal Methods in Computer Aided Design.

[8]  Alan J. Hu,et al.  An Effective Guidance Strategy for Abstraction-Guided Simulation , 2007, 2007 44th ACM/IEEE Design Automation Conference.

[9]  Eitan Farchi,et al.  Concurrent bug patterns and how to test them , 2003, Proceedings International Parallel and Distributed Processing Symposium.

[10]  Eric Mercer,et al.  Guided model checking for programs with polymorphism , 2009, PEPM '09.

[11]  Shin Nakajima,et al.  The SPIN Model Checker : Primer and Reference Manual , 2004 .

[12]  Matthew B. Dwyer,et al.  Controlling factors in evaluating path-sensitive error detection techniques , 2006, SIGSOFT '06/FSE-14.

[13]  Fabio Somenzi,et al.  Guiding simulation with increasingly refined abstract traces , 2006, 2006 43rd ACM/IEEE Design Automation Conference.

[14]  Stefan Edelkamp,et al.  Directed explicit model checking with HSF-SPIN , 2001, SPIN '01.

[15]  Eric Mercer,et al.  A context-sensitive structural heuristic for guided search model checking , 2005, ASE '05.

[16]  Paul A. Strooper,et al.  Testing Java monitors through deterministic execution , 2001, Proceedings 2001 Australian Software Engineering Conference.

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

[18]  Eric Mercer,et al.  Hardness for Explicit State Software Model Checking Benchmarks , 2007, Fifth IEEE International Conference on Software Engineering and Formal Methods (SEFM 2007).

[19]  Matthew B. Dwyer,et al.  Parallel Randomized State-Space Search , 2007, 29th International Conference on Software Engineering (ICSE'07).

[20]  Klaus Havelund,et al.  Using Runtime Analysis to Guide Model Checking of Java Programs , 2013, SPIN.

[21]  Eric Mercer,et al.  Generating Counter-Examples Through Randomized Guided Search , 2007, SPIN.

[22]  Mark Lillibridge,et al.  Extended static checking for Java , 2002, PLDI '02.

[23]  Klaus Havelund,et al.  Model checking programs , 2000, Proceedings ASE 2000. Fifteenth IEEE International Conference on Automated Software Engineering.

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

[25]  Stefan Edelkamp,et al.  Byte code distance heuristics and trail direction for model checking java programs , 2003 .