skip to main content
10.1145/3037697.3037708acmconferencesArticle/Chapter ViewAbstractPublication PagesasplosConference Proceedingsconference-collections
research-article

ProRace: Practical Data Race Detection for Production Use

Published:04 April 2017Publication History

ABSTRACT

This paper presents ProRace, a dynamic data race detector practical for production runs. It is lightweight, but still offers high race detection capability. To track memory accesses, ProRace leverages instruction sampling using the performance monitoring unit (PMU) in commodity processors. Our PMU driver enables ProRace to sample more memory accesses at a lower cost compared to the state-of-the-art Linux driver. Moreover, ProRace uses PMU-provided execution contexts including register states and program path, and reconstructs unsampled memory accesses offline. This technique allows \ProRace to overcome inherent limitations of sampling and improve the detection coverage by performing data race detection on the trace with not only sampled but also reconstructed memory accesses. Experiments using racy production software including apache and mysql shows that, with a reasonable offline cost, ProRace incurs only 2.6% overhead at runtime with 27.5% detection probability with a sampling period of 10,000.

References

  1. Gautam Altekar and Ion Stoica. Odr: output-deterministic replay for multicore debugging. In Proceedings of the ACM SIGOPS 22nd symposium on Operating systems principles, pages 193--206. ACM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Swarnendu Biswas, Minjia Zhang, Michael D. Bond, and Brandon Lucia. Efficient, software-only data race exceptions. In Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA '15, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Michael D. Bond, Katherine E. Coons, and Kathryn S. McKinley. Pacer: Proportional detection of data races. In Proceedings of the 2010 ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '10, pages 255--268, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Christopher D. Carothers, Kalyan S. Perumalla, and Richard M. Fujimoto. Efficient optimistic parallel simulations using reverse computation. ACM Trans. Model. Comput. Simul., 9(3):224--253, July 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Shimin Chen, Babak Falsafi, Phillip B. Gibbons, Michael Kozuch, Todd C. Mowry, Radu Teodorescu, Anastassia Ailamaki, Limor Fix, Gregory R. Ganger, Bin Lin, and Steven W. Schlosser. Log-based architectures for general-purpose monitoring of deployed code. In Proceedings of the 1st Workshop on Architectural and System Support for Improving Software Dependability, ASID '06, pages 63--65, New York, NY, USA, 2006. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Jong-Deok Choi, Keunwoo Lee, Alexey Loginov, Robert O'Callahan, Vivek Sarkar, and Manu Sridharan. Efficient and precise datarace detection for multithreaded object-oriented programs. In Proceedings of the ACM SIGPLAN 2002 Conference on Programming Language Design and Implementation, PLDI '02, pages 258--269, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Jim Chow, Tal Garfinkel, and Peter M. Chen. Decoupling dynamic program analysis from execution in virtual environments. In USENIX 2008 Annual Technical Conference, ATC'08, pages 1--14, Berkeley, CA, USA, 2008. USENIX Association.Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Weidong Cui, Marcus Peinado, Sang Kil Cha, Yanick Fratantonio, and Vasileios P. Kemerlis. Retracer: Triaging crashes by reverse execution from partial memory dumps. In Proceedings of the 38th International Conference on Software Engineering, ICSE '16, pages 820--831, New York, NY, USA, 2016. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. L. Dagum and R. Menon. OpenMP: an industry standard API for shared-memory programming. IEEE Computer Science and Engineering, 5(1):46--55, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Joseph Devietti, Benjamin P. Wood, Karin Strauss, Luis Ceze, Dan Grossman, and Shaz Qadeer. Radish: Always-on sound and complete ra detection in software and hardware. In Proceedings of the 39th Annual International Symposium on Computer Architecture, ISCA '12, pages 201--212, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Laura Effinger-Dean, Brandon Lucia, Luis Ceze, Dan Grossman, and Hans-J. Boehm. Ifrit: Interference-free regions for dynamic data-race detection. In Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA '12, pages 467--484, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Tayfun Elmas, Shaz Qadeer, and Serdar Tasiran. Goldilocks: A race and transaction-aware java runtime. In Proceedings of the 2007 ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '07, pages 245--255, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. John Erickson, Madanlal Musuvathi, Sebastian Burckhardt, and Kirk Olynyk. Effective data-race detection for the kernel. In Proceedings of the 9th USENIX conference on Operating systems design and implementation, OSDI '10, 2010.Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Cormac Flanagan and Stephen N. Freund. Fasttrack: Efficient and precise dynamic race detection. In Proceedings of the 2009 ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '09, pages 121--133, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Pedro Fonseca, Cheng Li, Vishal Singhal, and Rodrigo Rodrigues. A study of the internal and external effects of concurrency bugs. In Proceedings of the 2010 IEEE/IFIP International Conference on Dependable Systems and Networks, DSN 2010, Chicago, IL, USA, June 28 - July 1 2010, pages 221--230, 2010. Google ScholarGoogle ScholarCross RefCross Ref
  16. Joseph L. Greathouse, Zhiqiang Ma, Matthew I. Frank, Ramesh Peri, and Todd Austin. Demand-driven software race detection using hardware performance counters. In Proceedings of the 38th Annual International Symposium on Computer Architecture, ISCA '11, pages 165--176, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Jeff Huang, Charles Zhang, and Julian Dolby. Clap: Recording local executions to reproduce concurrency failures. In Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '13, pages 141--152, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Intel. Intel 64 and ia-32 architectures software developers manual, 2013. http://download.intel.com/products/processor/manual/325462.pdf.Google ScholarGoogle Scholar
  19. Intel. Intel inspector xe, 2015. http://software.intel.com/en-us/intel-inspector-xe.Google ScholarGoogle Scholar
  20. Intel Corporation. Intel® Microarchitecture Codename Nehalem Performance Monitoring Unit Programming Guide, 2010.Google ScholarGoogle Scholar
  21. Intel Corporation. 6th Generation Intel® Processor Datasheet for S-Platforms, 2015.Google ScholarGoogle Scholar
  22. Intel Corporation, Santa Clara, CA. Intel® 64 and IA-32 Architectures Software Developers' Manual, 2016.Google ScholarGoogle Scholar
  23. Guoliang Jin, Aditya V. Thakur, Ben Liblit, and Shan Lu. Instrumentation and sampling strategies for cooperative concurrency bug isolation. In William R. Cook, Siobhán Clarke, and Martin C. Rinard, editors, OOPSLA, 2010.Google ScholarGoogle Scholar
  24. C. Jung, D. Lim, J. Lee, and S. Han. Adaptive execution techniques for SMT multiprocessor architectures. pages 236--246, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Changhee Jung. Effective techniques for understanding and improving data structure usage. Ph.D. Dissertation, Georgia Institute of Technology, Atlanta, GA, 2013.Google ScholarGoogle Scholar
  26. Changhee Jung, Sangho Lee, Easwaran Raman, and Santosh Pande. Automated memory leak detection for production use. In Proceedings of the 36th International Conference on Software Engineering, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Changhee Jung, Silvius Rus, Brian P. Railing, Nathan Clark, and Santosh Pande. Brainy: effective selection of data structures. In Proceedings of the 32nd ACM SIGPLAN conference on Programming language design and implementation, PLDI '11, pages 86--97, New York, NY, USA, 2011. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Baris Kasikci, Benjamin Schubert, Cristiano Pereira, Gilles Pokam, and George Candea. Failure sketching: A technique for automated root cause diagnosis of in-production failures. In Proceedings of the 25th Symposium on Operating Systems Principles, SOSP '15, pages 344--360, New York, NY, USA, 2015. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Baris Kasikci, Cristian Zamfir, and George Candea. Racemob: Crowdsourced data race detection. In Proceedings of the Twenty-Fourth ACM Symposium on Operating Systems Principles, SOSP '13, pages 406--422, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Michael A. Laurenzano, Mustafa M. Tikir, Laura Carrington, and Allan Snavely. Pebil: Efficient static binary instrumentation for linux. In International Symposium on the Performance Analysis of Systems and Software, 2010. Google ScholarGoogle ScholarCross RefCross Ref
  31. Dongyoon Lee, Mahmoud Said, Satish Narayanasamy, and Zijiang Yang. Offline symbolic analysis to infer total store order. In Proceedings of the 2011 IEEE 17th International Symposium on High Performance Computer Architecture, HPCA '11, pages 357--358, 2011. Google ScholarGoogle ScholarCross RefCross Ref
  32. Dongyoon Lee, Mahmoud Said, Satish Narayanasamy, Zijiang Yang, and Cristiano Pereira. Offline symbolic analysis for multi-processor execution replay. In Proceedings of the 42Nd Annual IEEE/ACM International Symposium on Microarchitecture, MICRO 42, pages 564--575, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Jaejin Lee, Jung-Ho Park, Honggyu Kim, Changhee Jung, Daeseob Lim, and SangYong Han. Adaptive execution techniques of parallel programs for multiprocessors. J. Parallel Distrib. Comput., 70(5):467--480, May 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Sangho Lee, Changhee Jung, and Santosh Pande. Detecting memory leaks through introspective dynamic behavior modelling using machine learning. In Proceedings of the 36th International Conference on Software Engineering, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Qingrui Liu, Changhee Jung, Dongyoon Lee, and Devesh Tiwari. Compiler-directed lightweight checkpointing for fine-grained guaranteed soft error recovery. In Proceedings of the International Conference on High Performance Computing, Networking, Storage and Analysis (SC), Nov 2016. Google ScholarGoogle ScholarCross RefCross Ref
  36. Yutao Liu, Peitao Shi, Xinran Wang, Haibo Chen, Binyu Zang, and Haibing Guan. Transparent and efficient cfi enforcement with intel processor trace. In Proceedings of the 2017 IEEE 23rd International Symposium on High Performance Computer Architecture, HPCA '17, 2017.Google ScholarGoogle ScholarCross RefCross Ref
  37. Shan Lu, Soyeon Park, Eunsoo Seo, and Yuanyuan Zhou. Learning from mistakes: A comprehensive study on real world concurrency bug characteristics. In Proceedings of the 13th International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS XIII, pages 329--339, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Brandon Lucia, Luis Ceze, Karin Strauss, Shaz Qadeer, and Hans-J. Boehm. Conflict exceptions: Simplifying concurrent language semantics with precise hardware exceptions for data-races. In Proceedings of the 37th Annual International Symposium on Computer Architecture, ISCA '10, pages 210--221, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Chi-Keung Luk, Robert Cohn, Robert Muth, Harish Patil, Artur Klauser, Geoff Lowney, Steven Wallace, Vijay Janapa Reddi, and Kim Hazelwood. Pin: Building customized program analysis tools with dynamic instrumentation. In Proceedings of the 2005 ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '05, pages 190--200, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Daniel Marino, Madanlal Musuvathi, and Satish Narayanasamy. Literace: Effective sampling for lightweight data-race detection. In Proceedings of the 2009 ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '09, pages 134--143, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. S.S. Muchnick. Advanced Compiler Design Implementation. Morgan Kaufmann Publishers, 1997.Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Abdullah Muzahid, Dario Suárez, Shanxiang Qi, and Josep Torrellas. Sigrace: Signature-based data race detection. In Proceedings of the 36th Annual International Symposium on Computer Architecture, ISCA '09, pages 337--348, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Soyeon Park, Yuanyuan Zhou, Weiwei Xiong, Zuoning Yin, Rini Kaushik, Kyu H Lee, and Shan Lu. Pres: probabilistic replay with execution sketching on multiprocessors. In Proceedings of the ACM SIGOPS 22nd symposium on Operating systems principles, pages 177--192. ACM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. PCWorld. Nasdaq's facebook glitch came from race conditions, May 2012. http://www.pcworld.com/article/255911/ nasdaqs\_facebook\_glitch\_came\_from\_race\_conditions.html.Google ScholarGoogle Scholar
  45. Eli Pozniansky and Assaf Schuster. Multirace: Efficient on-the-fly data race detection in multithreaded cGoogle ScholarGoogle Scholar
  46. programs: Research articles. Concurr. Comput. : Pract. Exper., 19(3):327--340, March 2007.Google ScholarGoogle ScholarCross RefCross Ref
  47. Milos Prvulovic. Cord: Cost-effective (and nearly overhead-free) order-recording and data race detection. In Proceedings of the 2006 IEEE 12th International Symposium on High Performance Computer Architecture, HPCA '06, 2006. Google ScholarGoogle ScholarCross RefCross Ref
  48. Milos Prvulovic and Josep Torrellas. Reenact: Using thread-level speculation mechanisms to debug data races in multithreaded codes. In Proceedings of the 30th Annual International Symposium on Computer Architecture, ISCA '03, pages 110--121, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. Gang Ren, Eric Tune, Tipp Moseley, Yixin Shi, Silvius Rus, and Robert Hundt. Google-wide profiling: A continuous profiling infrastructure for data centers. IEEE Micro, 30(4). Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. Michiel Ronsse and Koen De Bosschere. Recplay: A fully integrated practical record/replay system. ACM Trans. Comput. Syst., 17(2):133--152, May 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. Paul Sack, Brian E. Bliss, Zhiqiang Ma, Paul Petersen, and Josep Torrellas. Accurate and efficient filtering for the intel thread checker race detector. In Proceedings of the 1st Workshop on Architectural and System Support for Improving Software Dependability, ASID '06, pages 34--41, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. SecurityFocus. Software bug contributed to blackout, Feb. 2004. http://www.securityfocus.com/news/8016.Google ScholarGoogle Scholar
  53. Konstantin Serebryany and Timur Iskhodzhanov. Threadsanitizer: Data race detection in practice. In Proceedings of the Workshop on Binary Instrumentation and Applications, WBIA '09, pages 62--71, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. Tianwei Sheng, Neil Vachharajani, Stephane Eranian, Robert Hundt, Wenguang Chen, and Weimin Zheng. Racez: A lightweight and non-invasive race detection tool for production applications. In Proceedings of the 33rd International Conference on Software Engineering, ICSE '11, pages 401--410, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. The Clang Team. Clang 3.8 threadsanitizer, 2015. http://clang.llvm.org/docs/ThreadSanitizer.html.Google ScholarGoogle Scholar
  56. Kaushik Veeraraghavan, Dongyoon Lee, Benjamin Wester, Jessica Ouyang, Peter M. Chen, Jason Flinn, and Satish Narayanasamy. Doubleplay: Parallelizing sequential logging and replay. In Proceedings of the Sixteenth International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS XVI, pages 15--26, 2011.Google ScholarGoogle ScholarDigital LibraryDigital Library
  57. Jan Wen Voung, Ranjit Jhala, and Sorin Lerner. Relay: Static race detection on millions of lines of code. In Proceedings of the the 6th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on The Foundations of Software Engineering, ESEC-FSE '07, pages 205--214, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  58. Benjamin Wester, David Devecsery, Peter M. Chen, Jason Flinn, and Satish Narayanasamy. Parallelizing data race detection. In Proceedings of the Eighteenth International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS '13, pages 27--38, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  59. Yubin Xia, Yutao Liu, Haibo Chen, and Binyu Zang. Cfimon: Detecting violation of control flow integrity using performance counters. In Proceedings of the 2012 42Nd Annual IEEE/IFIP International Conference on Dependable Systems and Networks (DSN), DSN '12, pages 1--12, Washington, DC, USA, 2012. IEEE Computer Society.Google ScholarGoogle Scholar
  60. Junfeng Yang, Ang Cui, Sal Stolfo, and Simha Sethumadhavan. Concurrency attacks. In The 4th USENIX Workshop on Hot Topics in Parallelism, Berkeley, CA, 2012. USENIX.Google ScholarGoogle ScholarDigital LibraryDigital Library
  61. Jie Yu and Satish Narayanasamy. A case for an interleaving constrained shared-memory multi-processor. In Proceedings of the 36th Annual International Symposium on Computer Architecture, ISCA '09, pages 325--336, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  62. Yuan Yu, Tom Rodeheffer, and Wei Chen. Racetrack: Efficient detection of data race conditions via adaptive tracking. In Proceedings of the Twentieth ACM Symposium on Operating Systems Principles, SOSP '05, pages 221--234, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  63. Mingwei Zhang, Rui Qiao, Niranjan Hasabnis, and R. Sekar. A platform for secure static binary instrumentation. In Proceedings of the 10th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments, VEE '14, pages 129--140, New York, NY, USA, 2014. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  64. Tong Zhang, Dongyoon Lee, and Changhee Jung. Txrace: Efficient data race detection using commodity hardware transactional memory. In Proceedings of the Twenty-First International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS '16, pages 159--173, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library
  65. Pin Zhou, Radu Teodorescu, and Yuanyuan Zhou. Hard: Hardware-assisted lockset-based race detection. In Proceedings of the 2007 IEEE 13th International Symposium on High Performance Computer Architecture, HPCA '07, pages 121--132, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. ProRace: Practical Data Race Detection for Production Use

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          cover image ACM Conferences
          ASPLOS '17: Proceedings of the Twenty-Second International Conference on Architectural Support for Programming Languages and Operating Systems
          April 2017
          856 pages
          ISBN:9781450344654
          DOI:10.1145/3037697

          Copyright © 2017 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 4 April 2017

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article

          Acceptance Rates

          ASPLOS '17 Paper Acceptance Rate53of320submissions,17%Overall Acceptance Rate535of2,713submissions,20%

          Upcoming Conference

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader