Efficient noise injection for exposing hidden data races

The happens-before (HB) relation is widely used to precisely detect data races, which are among the major causes of concurrency bugs. However, the HB relation is sensitive to thread interleaving; thus, hidden races that can be revealed in other thread interleavings may remain despite the repeated running of a program with an HB detector. In this paper, we propose a noise injection-based race detection technique (RaceInducer) that can expose and detect hidden races by using the runtime HB analysis result to determine the noise injection instants. RaceInducer delays a thread execution after the occurrence of the first no-lock non-racing accesses of three types (read-exclusive, write-exclusive, and read-shared) to a shared variable during a precise HB detection (FastTrack). Using this technique, RaceInducer can efficiently disturb the normal locking sequences between two threads that generate HB edges hiding data races. We implemented RaceInducer on the RoadRunner instrumentation framework for Java and evaluated its detection capability and runtime overheads on 12 real-world benchmark programs. The evaluation results showed that RaceInducer generated a lower runtime overhead compared to random noise injection that randomly injected noise for no-lock non-racing accesses and can detect more races with the same noise strength. RaceInducer generates particularly lower runtime overhead than the random noise injection for large programs that generates a high number of shared-memory accesses. In addition, we experimentally demonstrated that RaceInducer incurred lower runtime overheads than a current hidden-race detector (DrFinder) for programs with a relatively large number of locking operations.

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

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

[3]  Yosi Ben-Asher,et al.  Heuristics for finding concurrent bugs , 2003, Proceedings International Parallel and Distributed Processing Symposium.

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

[5]  Sebastian Burckhardt,et al.  Preemption Sealing for Efficient Concurrency Testing , 2010, TACAS.

[6]  Tomás Vojnar,et al.  Multi-objective Genetic Optimization for Noise-Based Testing of Concurrent Software , 2014, SSBSE.

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

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

[9]  Tomás Vojnar,et al.  Advances in noise‐based testing of concurrent software , 2015, Softw. Test. Verification Reliab..

[10]  Koushik Sen,et al.  Race directed random testing of concurrent programs , 2008, PLDI '08.

[11]  Dennis Shasha,et al.  Efficient and correct execution of parallel programs that share memory , 1988, TOPL.

[12]  Xu Zhou,et al.  Detecting harmful data races through parallel verification , 2015, The Journal of Supercomputing.

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

[14]  Michael D. Bond,et al.  PACER: proportional detection of data races , 2010, PLDI '10.

[15]  Yannis Smaragdakis,et al.  Sound predictive race detection in polynomial time , 2012, POPL '12.

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

[17]  Jens Palsberg,et al.  Race directed scheduling of concurrent programs , 2014, PPoPP '14.

[18]  Nancy G. Leveson,et al.  An investigation of the Therac-25 accidents , 1993, Computer.

[19]  BurckhardtSebastian,et al.  A randomized scheduler with probabilistic guarantees of finding bugs , 2010 .

[20]  Yan Cai,et al.  Effective and precise dynamic detection of hidden races for Java programs , 2015, ESEC/SIGSOFT FSE.

[21]  Pravesh Kothari,et al.  A randomized scheduler with probabilistic guarantees of finding bugs , 2010, ASPLOS XV.

[22]  Chao Wang,et al.  Assertion guided symbolic execution of multithreaded programs , 2015, ESEC/SIGSOFT FSE.

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

[24]  Long Zheng,et al.  DigHR: precise dynamic detection of hidden races with weak causal relation analysis , 2018, The Journal of Supercomputing.

[25]  Tomás Vojnar,et al.  Advances in the ANaConDA framework for dynamic analysis and testing of concurrent C/C++ programs , 2018, ISSTA.

[26]  Michael D. Bond,et al.  High-coverage, unbounded sound predictive race detection , 2018, PLDI.

[27]  Jingling Xue,et al.  Acculock: Accurate and efficient detection of data races , 2011, International Symposium on Code Generation and Optimization (CGO 2011).

[28]  Yuan Cheng,et al.  An optimized RGA supporting selective undo for collaborative text editing systems , 2019, J. Parallel Distributed Comput..

[29]  Doo-Hwan Bae,et al.  AdaptiveLock: Efficient Hybrid Data Race Detection Based on Real-World Locking Patterns , 2018, International Journal of Parallel Programming.

[30]  Chao Wang,et al.  Coverage guided systematic concurrency testing , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[31]  Benjamin P. Wood,et al.  Lightweight data race detection for production runs , 2017, CC.

[32]  C. Flanagan The FASTTRACK2 Race Detector , 2017 .

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

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

[35]  Satish Narayanasamy,et al.  LiteRace: effective sampling for lightweight data-race detection , 2009, PLDI '09.

[36]  Tanakorn Leesatapornwongsa,et al.  What Bugs Live in the Cloud? A Study of 3000+ Issues in Cloud Systems , 2014, SoCC.

[37]  Stephen N. Freund,et al.  BigFoot: static check placement for dynamic race detection , 2017, PLDI.

[38]  Zeev Volkovich,et al.  Boosted decision trees for behaviour mining of concurrent programmes , 2017, Concurr. Comput. Pract. Exp..

[39]  Kai Lu,et al.  Efficiently Trigger Data Races through Speculative Execution , 2015, 2015 IEEE 17th International Conference on High Performance Computing and Communications, 2015 IEEE 7th International Symposium on Cyberspace Safety and Security, and 2015 IEEE 12th International Conference on Embedded Software and Systems.

[40]  Danny Dig,et al.  Effective Techniques for Static Race Detection in Java Parallel Loops , 2015, ACM Trans. Softw. Eng. Methodol..

[41]  Amer Diwan,et al.  The DaCapo benchmarks: java benchmarking development and analysis , 2006, OOPSLA '06.

[42]  Yuan Cheng,et al.  Supporting selective undo of string-wise operations for collaborative editing systems , 2018, Future Gener. Comput. Syst..

[43]  Sorin Lerner,et al.  RELAY: static race detection on millions of lines of code , 2007, ESEC-FSE '07.

[44]  Dan Grossman,et al.  IFRit: interference-free regions for dynamic data-race detection , 2012, OOPSLA '12.

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

[46]  Jeff Huang,et al.  SWORD: A Scalable Whole Program Race Detector for Java , 2019, 2019 IEEE/ACM 41st International Conference on Software Engineering: Companion Proceedings (ICSE-Companion).

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

[48]  Grigore Rosu,et al.  Maximal sound predictive race detection with control flow abstraction , 2014, PLDI.

[49]  Tomás Vojnar,et al.  Noise Injection Heuristics for Concurrency Testing , 2011, MEMICS.

[50]  Stephen N. Freund,et al.  VerifiedFT: a verified, high-performance precise dynamic race detector , 2018, PPoPP.

[51]  Martin Schulz,et al.  Debugging high-performance computing applications at massive scales , 2015, Commun. ACM.

[52]  Doo-Hwan Bae,et al.  SimpleLock+: Fast and Accurate Hybrid Data Race Detection , 2016, Comput. J..

[53]  Mahesh Viswanathan,et al.  Dynamic race prediction in linear time , 2017, PLDI.

[54]  W. K. Chan,et al.  HistLock: Efficient and Sound Hybrid Detection of Hidden Predictive Data Races with Functional Contexts , 2016, 2016 IEEE International Conference on Software Quality, Reliability and Security (QRS).

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

[56]  Bo Jiang,et al.  HistLock+: Precise Memory Access Maintenance Without Lockset Comparison for Complete Hybrid Data Race Detection , 2018, IEEE Transactions on Reliability.