CARISMA: a context-sensitive approach to race-condition sample-instance selection for multithreaded applications

Dynamic race detectors can explore multiple thread schedules of a multithreaded program over the same input to detect data races. Although existing sampling-based precise race detectors reduce overheads effectively so that lightweight precise race detection can be performed in testing or post-deployment environments, they are ineffective in detecting races if the sampling rates are low. This paper presents CARISMA to address this problem. CARISMA exploits the insight that along an execution trace, a program may potentially handle many accesses to the memory locations created at the same site for similar purposes. Iterating over multiple execution trials of the same input, CARISMA estimates and distributes the sampling budgets among such location creation sites, and probabilistically collects a fraction of all accesses to the memory locations associated with such sites for subsequent race detection. Our experiment shows that, compared with PACER on the same platform and at the same sampling rate (such as 1%), CARISMA is significantly more effective.

[1]  Shan Lu,et al.  Instrumentation and sampling strategies for cooperative concurrency bug isolation , 2010, OOPSLA.

[2]  Walter F. Tichy,et al.  Helgrind+: An efficient dynamic race detector , 2009, 2009 IEEE International Symposium on Parallel & Distributed Processing.

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

[4]  Michael D. Bond,et al.  Breadcrumbs: efficient context sensitivity for dynamic bug detection analyses , 2010, PLDI '10.

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

[6]  T. H. Tse,et al.  Adaptive Random Test Case Prioritization , 2009, 2009 IEEE/ACM International Conference on Automated Software Engineering.

[7]  Wenguang Chen,et al.  RACEZ: a lightweight and non-invasive race detection tool for production applications , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[8]  Patrice Godefroid,et al.  Dynamic partial-order reduction for model checking software , 2005, POPL '05.

[9]  Brandon Lucia,et al.  Finding concurrency bugs with context-aware communication graphs , 2009, 2009 42nd Annual IEEE/ACM International Symposium on Microarchitecture (MICRO).

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

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

[12]  Stephen P. Boyd,et al.  Convex Optimization , 2004, Algorithms and Theory of Computation Handbook.

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

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

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

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

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

[18]  Koushik Sen,et al.  Effective random testing of concurrent programs , 2007, ASE.

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

[20]  A. W. Kemp,et al.  Univariate Discrete Distributions , 1993 .

[21]  W. K. Chan,et al.  MagicFuzzer: Scalable deadlock detection for large-scale applications , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[22]  J. Davis Univariate Discrete Distributions , 2006 .

[23]  Ondrej Lhoták,et al.  Pick your contexts well: understanding object-sensitivity , 2011, POPL '11.

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

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

[26]  W. K. Chan,et al.  LOFT: Redundant Synchronization Event Removal for Data Race Detection , 2011, 2011 IEEE 22nd International Symposium on Software Reliability Engineering.

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

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

[29]  Matthias Hauswirth,et al.  Low-overhead memory leak detection using adaptive statistical profiling , 2004, ASPLOS XI.

[30]  Thomas A. Henzinger,et al.  Race checking by context inference , 2004, PLDI '04.