Exploiting Cache Traffic Monitoring for Run-Time Race Detection

  • Jochen Schimmel
  • Victor Pankratius
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6852)


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%.


Parallel Program Cache Line Data Race Performance Counter Cache Coherence Protocol 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    AMD. Amd64 architecture programmer’s manual (September 2007),
  2. 2.
    Ceze, L., et al.: Colorama: Architectural support for data-centric synchronization. In: Proc. IEEE HPCA 2007, pp. 133–144 (2007)Google Scholar
  3. 3.
    Flanagan, C., Freund, S.N.: Fasttrack: efficient and precise dynamic race detection. In: Proc. PLDI 2009, pp. 121–133. ACM, New York (2009)Google Scholar
  4. 4.
    Gupta, S., et al.: Using hardware transactional memory for data race detection. In: Proc. IEEE IPDPS 2009, pp. 1–11 (2009)Google Scholar
  5. 5.
    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)Google Scholar
  6. 6.
    Intel. Intel 64 and IA-32 architectures software developer’s manual (December 2009),
  7. 7.
    Intel. Intel thread checker v.3.1 (2011),
  8. 8.
    Jannesari, A., et al.: Helgrind+: An efficient dynamic race detector. In: Proc. IEEE IPDPS 2009 (2009)Google Scholar
  9. 9.
    Krena, B., et al.: Healing data races on-the-fly. In: Proc. ACM PADTAD 2007, pp. 54–64 (2007)Google Scholar
  10. 10.
    Lea, D.: The java.util. concurrent synchronizer framework. Sci. Comp. Prog 58(3) (2005)Google Scholar
  11. 11.
    Lu, S., et al.: Avio: detecting atomicity violations via access interleaving invariants. In: Proc. ASPLOS-XII, pp. 37–48. ACM, New York (2006)CrossRefGoogle Scholar
  12. 12.
    Lucia, B., et al.: Atom-aid: Detecting and surviving atomicity violations. In: Proc. ISCA 2008, pp. 277–288. ACM, New York (2008)Google Scholar
  13. 13.
    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)Google Scholar
  14. 14.
    McCloskey, B., et al.: Autolocker: synchronization inference for atomic sections. In: Proc. POPL 2006. ACM, New York (2006)Google Scholar
  15. 15.
    Narayanasamy, S., et al.: Bugnet: Continuously recording program execution for deterministic replay debugging. In: Proc. ISCA 2005, pp. 284–295. ACM, New York (2005)Google Scholar
  16. 16.
    Nistor, A., et al.: Light64: Lightweight hardware support for data race detection during systematic testing of parallel programs. In: Proc. IEEE MICRO 2009 (2009)Google Scholar
  17. 17.
    O’Callahan, R., Choi, J.-D.: Hybrid dynamic data race detection. In: Proc. PPoPP 2003. ACM, New York (2003)Google Scholar
  18. 18.
    Pankratius, V., Jannesari, A., Tichy, W.: Parallelizing bzip2: A case study in multicore software engineering. IEEE Software 26(6), 70–77 (2009)CrossRefGoogle Scholar
  19. 19.
    Pankratius, V., Adl-Tabatabai, A.-R.: A Study of Transactional Memory vs. Locks in Practice. In: Proc. SPAA 2011. ACM, New York (2011)Google Scholar
  20. 20.
    Perkovic, D., Keleher, P.J.: Online data-race detection via coherency guarantees. In: Proc. OSDI 1996. USENIX (1996)Google Scholar
  21. 21.
    Rajamani, S., et al.: Isolator: dynamically ensuring isolation in concurrent programs. In: Proc. ASPLOS 2009. ACM, New York (2009)Google Scholar
  22. 22.
    Ratanaworabhan, P., et al.: Detecting and tolerating asymmetric races. In: Proc. PPoPP 2009. ACM, New York (2009)Google Scholar
  23. 23.
    Schimmel, J., Pankratius, V.: TachoRace: Exploiting Performance Counters for Run-Time Race Detection. Technical Report 2010-01, Karlsruhe Institute of Technology, Germany (April 2010)Google Scholar
  24. 24.
    Slater, R., Tibrewala, N.: Optimizing the mesi cache coherence protocol for multithreaded applications on small symmetric multiprocessor systems (1998),
  25. 25.
    Valgrind-project. Data-race-test:test suite for helgrind, a data race detector (2008)Google Scholar
  26. 26.
    Valgrind-project. Helgrind: a data-race detector (2011),
  27. 27.
    Woo, S., et al.: The SPLASH-2 programs: characterization and methodological considerations. In: Proc. ISCA 1995. ACM, New York (1995)Google Scholar
  28. 28.
    Zhou, P., et al.: Hard: Hardware-assisted lockset-based race detection. In: Proc. IEEE HPCA 2007, pp. 121–132 (2007)Google Scholar
  29. 29.
    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)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Jochen Schimmel
    • 1
  • Victor Pankratius
    • 1
  1. 1.IPDKarlsruhe Institute of TechnologyKarlsruheGermany

Personalised recommendations