Abstract
Finding and fixing data races is a difficult parallel programming problem, even for experienced programmers. Despite the usage of race detectors at application development time, programmers might not be able to detect all races. Severe damage can be caused after application deployment at clients due to crashes and corrupted data. Run-time race detectors can tackle this problem, but current approaches either slow down application execution by orders of magnitude or require complex hardware. In this paper, we present a new approach to detect and repair races at application run-time. Our approach monitors cache coherency bus traffic for parallel accesses to unprotected shared resources. The technique has low overhead and requires just minor extensions to standard multicore hardware and software to make measurements more accurate. In particular, we exploit synergy effects between data needed for debugging and data made available by standard performance analysis hardware. We demonstrate feasibility and effectiveness using a controlled environment with a fully implemented software-based detector that executes real C/C++ applications. Our evaluations include the Helgrind and SPLASH2 benchmarks, as well as 29 representative parallel bug patterns derived from real-world programs. Experiments show that our technique successfully detects and automatically heals common race patterns, while the cache message overhead increases on average by just 0.2%.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
AMD. Amd64 architecture programmer’s manual (September 2007), http://www.amd.com
Ceze, L., et al.: Colorama: Architectural support for data-centric synchronization. In: Proc. IEEE HPCA 2007, pp. 133–144 (2007)
Flanagan, C., Freund, S.N.: Fasttrack: efficient and precise dynamic race detection. In: Proc. PLDI 2009, pp. 121–133. ACM, New York (2009)
Gupta, S., et al.: Using hardware transactional memory for data race detection. In: Proc. IEEE IPDPS 2009, pp. 1–11 (2009)
Helmbold, D.P., McDowell, C.E.: A taxonomy of race detection algorithms. Technical report, University of California at Santa Cruz, UCSC-CRL-94-35, Santa Cruz, CA, USA, September 28 (1994)
Intel. Intel 64 and IA-32 architectures software developer’s manual (December 2009), www.intel.com
Intel. Intel thread checker v.3.1 (2011), http://software.intel.com
Jannesari, A., et al.: Helgrind+: An efficient dynamic race detector. In: Proc. IEEE IPDPS 2009 (2009)
Krena, B., et al.: Healing data races on-the-fly. In: Proc. ACM PADTAD 2007, pp. 54–64 (2007)
Lea, D.: The java.util. concurrent synchronizer framework. Sci. Comp. Prog 58(3) (2005)
Lu, S., et al.: Avio: detecting atomicity violations via access interleaving invariants. In: Proc. ASPLOS-XII, pp. 37–48. ACM, New York (2006)
Lucia, B., et al.: Atom-aid: Detecting and surviving atomicity violations. In: Proc. ISCA 2008, pp. 277–288. ACM, New York (2008)
Luk, C.-K., et al.: Pin: building customized program analysis tools with dynamic instrumentation. In: Proc. PLDI 2005, pp. 190–200. ACM, New York (2005)
McCloskey, B., et al.: Autolocker: synchronization inference for atomic sections. In: Proc. POPL 2006. ACM, New York (2006)
Narayanasamy, S., et al.: Bugnet: Continuously recording program execution for deterministic replay debugging. In: Proc. ISCA 2005, pp. 284–295. ACM, New York (2005)
Nistor, A., et al.: Light64: Lightweight hardware support for data race detection during systematic testing of parallel programs. In: Proc. IEEE MICRO 2009 (2009)
O’Callahan, R., Choi, J.-D.: Hybrid dynamic data race detection. In: Proc. PPoPP 2003. ACM, New York (2003)
Pankratius, V., Jannesari, A., Tichy, W.: Parallelizing bzip2: A case study in multicore software engineering. IEEE Software 26(6), 70–77 (2009)
Pankratius, V., Adl-Tabatabai, A.-R.: A Study of Transactional Memory vs. Locks in Practice. In: Proc. SPAA 2011. ACM, New York (2011)
Perkovic, D., Keleher, P.J.: Online data-race detection via coherency guarantees. In: Proc. OSDI 1996. USENIX (1996)
Rajamani, S., et al.: Isolator: dynamically ensuring isolation in concurrent programs. In: Proc. ASPLOS 2009. ACM, New York (2009)
Ratanaworabhan, P., et al.: Detecting and tolerating asymmetric races. In: Proc. PPoPP 2009. ACM, New York (2009)
Schimmel, J., Pankratius, V.: TachoRace: Exploiting Performance Counters for Run-Time Race Detection. Technical Report 2010-01, Karlsruhe Institute of Technology, Germany (April 2010)
Slater, R., Tibrewala, N.: Optimizing the mesi cache coherence protocol for multithreaded applications on small symmetric multiprocessor systems (1998), http://tibrewala.net/papers/mesi98
Valgrind-project. Data-race-test:test suite for helgrind, a data race detector (2008)
Valgrind-project. Helgrind: a data-race detector (2011), http://valgrind.org
Woo, S., et al.: The SPLASH-2 programs: characterization and methodological considerations. In: Proc. ISCA 1995. ACM, New York (1995)
Zhou, P., et al.: Hard: Hardware-assisted lockset-based race detection. In: Proc. IEEE HPCA 2007, pp. 121–132 (2007)
Zhou, Y., Torrellas, J.: Deploying architectural support for software defect detection in future processors. In: Workshop on the Evaluation of Software Defect Detection Tools (2005)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Schimmel, J., Pankratius, V. (2011). Exploiting Cache Traffic Monitoring for Run-Time Race Detection. In: Jeannot, E., Namyst, R., Roman, J. (eds) Euro-Par 2011 Parallel Processing. Euro-Par 2011. Lecture Notes in Computer Science, vol 6852. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-23400-2_3
Download citation
DOI: https://doi.org/10.1007/978-3-642-23400-2_3
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-23399-9
Online ISBN: 978-3-642-23400-2
eBook Packages: Computer ScienceComputer Science (R0)