Discovering Concurrency Errors

Lots of concurrent software is being developed for the now ubiquitous multicore processors. And concurrent programming is difficult because it is quite easy to introduce errors that are really hard to diagnose and fix. One of the main obstacles to concurrent programming is that threads are scheduled nondeterministically and their interactions may become hard to predict and to devise. This chapter addresses the nature of concurrent programming and some classes of concurrency errors. It discusses the application of dynamic program analysis techniques to detect, locate and diagnose some common concurrency errors like data races, atomicity violations and deadlocks. This chapter also mentions some techniques that can help with quality assurance of concurrent programs, regardless of any particular class of concurrency errors, like noise injection and systematic testing, and it is closed by some prospects of concurrent software development.

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

[2]  Sriram Sankaranarayanan,et al.  Fast and Accurate Static Data-Race Detection for Concurrent Programs , 2007, CAV.

[3]  Frank Tip,et al.  Dynamic detection of atomic-set-serializability violations , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

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

[5]  Leslie Lamport,et al.  How to Make a Multiprocessor Computer That Correctly Executes Multiprocess Programs , 2016, IEEE Transactions on Computers.

[6]  Nicholas Nethercote,et al.  Valgrind: a framework for heavyweight dynamic binary instrumentation , 2007, PLDI '07.

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

[8]  Assaf Schuster,et al.  Efficient on-the-fly data race detection in multithreaded C++ programs , 2003, PPoPP '03.

[9]  Ricardo J. Dias,et al.  Verifying Concurrent Programs Using Contracts , 2017, 2017 IEEE International Conference on Software Testing, Verification and Validation (ICST).

[10]  Koen De Bosschere,et al.  TRaDe: Data Race Detection for Java , 2001, International Conference on Computational Science.

[11]  Jingde Cheng,et al.  A run-time deadlock detector for concurrent Java programs , 2001, Proceedings Eighth Asia-Pacific Software Engineering Conference.

[12]  Harish Patil,et al.  Pin: building customized program analysis tools with dynamic instrumentation , 2005, PLDI '05.

[13]  Eduard Ayguadé,et al.  Transactional Memory: An Overview , 2007, IEEE Micro.

[14]  Stephen N. Freund,et al.  Velodrome: a sound and complete dynamic atomicity checker for multithreaded programs , 2008, PLDI '08.

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

[16]  Rahul Agarwal,et al.  Run-time detection of potential deadlocks for programs with locks, semaphores, and condition variables , 2006, PADTAD '06.

[17]  Irving L. Traiger,et al.  The notions of consistency and predicate locks in a database system , 1976, CACM.

[18]  Beverly A. Sanders,et al.  Precise Data Race Detection in a Relaxed Memory Model Using Heuristic-Based Model Checking , 2009, 2009 IEEE/ACM International Conference on Automated Software Engineering.

[19]  Tomasz Imielinski,et al.  Mining association rules between sets of items in large databases , 1993, SIGMOD Conference.

[20]  Jong-Deok Choi,et al.  Hybrid dynamic data race detection , 2003, PPoPP '03.

[21]  Stephen N. Freund,et al.  Type inference against races , 2004, Sci. Comput. Program..

[22]  Satish Narayanasamy,et al.  Maple: a coverage-driven testing tool for multithreaded programs , 2012, OOPSLA '12.

[23]  Tomás Vojnar,et al.  Healing data races on-the-fly , 2007, PADTAD '07.

[24]  Eric Goubault,et al.  Geometry and concurrency: a user's guide , 2000, Mathematical Structures in Computer Science.

[25]  Jong-Deok Choi,et al.  Efficient and precise datarace detection for multithreaded object-oriented programs , 2002, PLDI '02.

[26]  Junfeng Yang,et al.  Sound and precise analysis of parallel programs through schedule specialization , 2012, PLDI.

[27]  Richard W. Vuduc,et al.  Falcon: fault localization in concurrent programs , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[28]  Eitan Farchi,et al.  Framework for testing multi‐threaded Java programs , 2003, Concurr. Comput. Pract. Exp..

[29]  Richard J. Lipton,et al.  Reduction: a method of proving properties of parallel programs , 1975, CACM.

[30]  Stephen N. Freund,et al.  The RoadRunner Dynamic Analysis Framework for Concurrent Programs , 2010, PASTE '10.

[31]  Tomás Vojnar,et al.  Noise-based testing and analysis of multi-threaded C/C++ programs on the binary level , 2012, PADTAD 2012.

[32]  Frank Tip,et al.  Associating synchronization constraints with data in an object-oriented language , 2006, POPL '06.

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

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

[35]  Leslie Lamport,et al.  Time, clocks, and the ordering of events in a distributed system , 1978, CACM.

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

[37]  Assaf Schuster,et al.  MultiRace: efficient on‐the‐fly data race detection in multithreaded C++ programs , 2007, Concurr. Comput. Pract. Exp..

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

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

[40]  Scott D. Stoller,et al.  Runtime analysis of atomicity for multithreaded programs , 2006, IEEE Transactions on Software Engineering.

[41]  Tomás Vojnar,et al.  ANaConDA: A Framework for Analysing Multi-threaded C/C++ Programs on the Binary Level , 2012, RV.

[42]  Michael Laurenzano,et al.  PEBIL: Efficient static binary instrumentation for Linux , 2010, 2010 IEEE International Symposium on Performance Analysis of Systems & Software (ISPASS).

[43]  Klaus Havelund,et al.  Dynamic Deadlock Analysis of Multi-threaded Programs , 2005, Haifa Verification Conference.

[44]  Yuanyuan Zhou,et al.  AVIO: Detecting Atomicity Violations via Access-Interleaving Invariants , 2007, IEEE Micro.

[45]  Satish Narayanasamy,et al.  A case for an interleaving constrained shared-memory multi-processor , 2009, ISCA '09.

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

[47]  Eric Bodden,et al.  Racer: effective race detection using aspectj , 2008, ISSTA '08.

[48]  Stephen N. Freund,et al.  Type-based race detection for Java , 2000, PLDI '00.

[49]  Anna Gringauze,et al.  Detecting Data Race and Atomicity Violation via Typestate-Guided Static Analysis , 2008 .

[50]  João Lourenço,et al.  Dynamic Validation of Contracts in Concurrent Code , 2015, EUROCAST.

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

[52]  Tomás Vojnar,et al.  A Uniform Classification of Common Concurrency Errors , 2011, EUROCAST.

[53]  Gerard J. Holzmann,et al.  The SPIN Model Checker - primer and reference manual , 2003 .

[54]  Koushik Sen,et al.  A randomized dynamic program analysis technique for detecting real deadlocks , 2009, PLDI '09.

[55]  Scott D. Stoller,et al.  Static analysis of atomicity for programs with non-blocking synchronization , 2005, PPoPP.

[56]  Sriram Sankaranarayanan,et al.  Symbolic Deadlock Analysis in Concurrent Libraries and Their Clients , 2009, 2009 IEEE/ACM International Conference on Automated Software Engineering.

[57]  Patrice Godefroid,et al.  Software Model Checking: The VeriSoft Approach , 2005, Formal Methods Syst. Des..

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

[59]  Shin Hong,et al.  Testing concurrent programs to achieve high synchronization coverage , 2012, ISSTA 2012.

[60]  Shmuel Ur,et al.  Deadlocks: From Exhibiting to Healing , 2008, RV.

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

[62]  Thomas Ball,et al.  Finding and Reproducing Heisenbugs in Concurrent Programs , 2008, OSDI.

[63]  Tomás Vojnar,et al.  AtomRace: data race and atomicity violation detector and healer , 2008, PADTAD '08.

[64]  Steven Hand,et al.  On deadlock, livelock, and forward progress , 2005 .

[65]  Assaf Schuster,et al.  MultiRace: efficient on-the-fly data race detection in multithreaded C++ programs: Research Articles , 2007 .

[66]  Shaz Qadeer,et al.  CHESS: A Systematic Testing Tool for Concurrent Software , 2007 .

[67]  Thomas R. Gross,et al.  Object race detection , 2001, OOPSLA '01.

[68]  Shan Lu,et al.  ConMem: detecting severe concurrency bugs through an effect-oriented approach , 2010, ASPLOS XV.

[69]  Xiao Ma,et al.  MUVI: automatically inferring multi-variable access correlations and detecting related semantic and concurrency bugs , 2007, SOSP.

[70]  Arie Shoshani,et al.  System Deadlocks , 1971, CSUR.

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

[72]  David Hovemeyer,et al.  Finding Concurrency Bugs in Java , 2004 .

[73]  Stephen N. Freund,et al.  FastTrack: efficient and precise dynamic race detection , 2009, PLDI '09.

[74]  Min Xu,et al.  A serializability violation detector for shared-memory server programs , 2005, PLDI '05.

[75]  Barbara G. Ryder,et al.  Non-concurrency analysis , 1993, PPOPP '93.

[76]  Friedemann Mattern,et al.  Virtual Time and Global States of Distributed Systems , 2002 .