skip to main content
research-article

Chimera: hybrid program analysis for determinism

Published:11 June 2012Publication History
Skip Abstract Section

Abstract

Chimera uses a new hybrid program analysis to provide deterministic replay for commodity multiprocessor systems. Chimera leverages the insight that it is easy to provide deterministic multiprocessor replay for data-race-free programs (one can just record non-deterministic inputs and the order of synchronization operations), so if we can somehow transform an arbitrary program to be data-race-free, then we can provide deterministic replay cheaply for that program. To perform this transformation, Chimera uses a sound static data-race detector to find all potential data-races. It then instruments pairs of potentially racing instructions with a weak-lock, which provides sufficient guarantees to allow deterministic replay but does not guarantee mutual exclusion.

Unsurprisingly, a large fraction of data-races found by the static tool are false data-races, and instrumenting them each of them with a weak-lock results in prohibitively high overhead. Chimera drastically reduces this cost from 53x to 1.39x by increasing the granularity of weak-locks without significantly compromising on parallelism. This is achieved by employing a combination of profiling and symbolic analysis techniques that target the sources of imprecision in the static data-race detector. We find that performance overhead for deterministic recording is 2.4% on average for Apache and desktop applications and about 86% for scientific applications.

References

  1. lpsolve, mixed integer linear programming solver. http://lpsolve.sourceforge.net/5.5.Google ScholarGoogle Scholar
  2. G. Altekar and I. Stoica. ODR: Output-deterministic replay for multicore debugging. In Proceedings of the 22nd ACM Symposium on Operating Systems Principles, pages 193--206, October 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. L. O. Andersen. Program analysis and specialization for the c programming language. In PhD thesis, DIKU, University of Copenhagen, 1994.Google ScholarGoogle Scholar
  4. A. Aviram, S.-C.Weng, S. Hu, and B. Ford. Efficient system enforced deterministic parallelism. In Proceedings of the 9th Symposium on Operating Systems Design and Implementation, Vancouver, BC, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. G. Balakrishnan and T. Reps. Analyzing memory accesses in x86 executables. In In CC, pages 5?23. Springer-Verlag, 2004.Google ScholarGoogle Scholar
  6. T. Bergan, O. Anderson, J. Devietti, L. Ceze, and D. Grossman. Coredet: a compiler and runtime system for deterministic multithreaded execution. In Proceedings of the 15th International Conference on Architectural Support for Programming Languages and Operating Systems, pages 53--64, Pittsburgh, PA, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. E. D. Berger, T. Yang, T. Liu, and G. Novark. Grace: Safe multithreaded programming for C/C++. In Proceedings of the International Conference on Object Oriented Programming Systems, Languages, and Applications, pages 81--96, Orlando, FL, October 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. S. Bhansali, W. Chen, S. de Jong, A. Edwards, and M. Drinic. Framework for instruction-level tracing and analysis of programs. In Second International Conference on Virtual Execution Environments, pages 154--163, June 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. R. L. Bocchino, Jr., V. S. Adve, D. Dig, S. V. Adve, S. Heumann, R. Komuravelli, J. Overbey, P. Simmons, H. Sung, and M. Vakilian. A type and effect system for deterministic parallel Java. In Proceedings of the International Conference on Object Oriented Programming Systems, Languages, and Applications, pages 97--116, Orlando, FL, October 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. C. Boyapati and M. Rinard. A parameterized type system for racefree java programs. In Proceedings of the 16th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, OOPSLA '01, pages 56--69, New York, NY, USA, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. T. C. Bressoud and F. B. Schneider. Hypervisor-based fault tolerance. ACM Transactions on Computer Systems, 14(1):80--107, February 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. J.-D. Choi, K. Lee, A. Loginov, R. O'Callahan, V. Sarkar, and M. 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, Berlin, Germany, June 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. J. Chow, T. Garfinkel, and P. M. Chen. Decoupling dynamic program analysis from execution in virtual environments. In Proceedings of the 2008 USENIX Technical Conference, pages 1--14, June 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. J. Devietti, B. Lucia, L. Ceze, and M. Oskin. DMP: Deterministic shared memory multiprocessing. In Proceedings of the 2009 International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), pages 85--96, March 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. J. Devietti, J. Nelson, T. Bergan, L. Ceze, and D. Grossman. Rcdc: a relaxed consistency deterministic computer. In Proceedings of the sixteenth international conference on Architectural support for programming languages and operating systems, pages 67--78, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. G.W. Dunlap, S. T. King, S. Cinar, M. A. Basrai, and P. M. Chen. Re-Virt: Enabling intrusion analysis through virtual-machine logging and replay. In Proceedings of the 5th Symposium on Operating Systems Design and Implementation, pages 211--224, Boston, MA, December 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. G. W. Dunlap, D. G. Lucchetti, M. Fetterman, and P. M. Chen Execution replay on multiprocessor virtual machines. In Proceedings of the 2008 ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments (VEE), pages 121--130, March 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. T. Elmas, S. Qadeer, and S. Tasiran. Goldilocks: A race and transaction-aware Java runtime. In PLDI, pages 245--255, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. D. Engler and K. Ashcraft. RacerX: Efficient static detection of race conditions and deadlocks. In Proceedings of the 19th ACM Symposium on Operating Systems Principles, pages 237--252, Bolton Landing, NY, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. C. Flanagan and S. Freund. FastTrack: Efficient and precis dynamic race detection. In Proceedings of the ACM SIGPLAN 2009 Conference on Programming Language Design and Implementation, pages 121--133, Dublin, Ireland, June 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. C. Flanagan and S. N. Freund. Type-based race detection for java. In Proceedings of the ACM SIGPLAN conference on Programming language design and implementation, pages 219--232, Vancouver, British Columbia, Canada, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. D. Grossman. Type-safe multithreading in cyclone. In Proceedings of the 2003 ACM SIGPLAN international workshop on Types in languages design and implementation, TLDI '03, pages 13--25, New York, NY, USA, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. D. Hower, P. Dudnik, M. D. Hill, and D. A. Wood. Calvin Deterministic or not? free will to choose. In 17th International Conference on High-Performance Computer Architecture, February. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. D. R. Hower and M. D. Hill. Rerun: Exploiting episodes for lightweight memory race recording. In Proceedings of the 2008 International Symposium on Computer Architecture, pages 265--276, June 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. R. Huang, D. Y. Den, and G. E. Suh. Orthrus: Efficient software integrity protection on multi-cores. In Proceedings of the 15th International Conference on Architectural Support for Programming Languages and Operating Systems, pages 371--383, Pittsburgh, PA, March 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. V. Kahlon, N. Sinha, E. Kruus, and Y. Zhang. Static data race detection for concurrent programs with asynchronous calls. In Proceedings of the the 7th joint meeting of the European software engineering conference and the ACM SIGSOFT symposium on The foundations of software engineering, ESEC/FSE '09, pages 13--22, New York, NY, USA, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. S. T. King, G. W. Dunlap, and P. M. Chen. Debugging operating systems with time-traveling virtual machines. In Proceedings of the 2005 USENIX Technical Conference, pages 1--15, April 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. T. J. LeBlanc and J. M. Mellor-Crummey. Debugging parallel programs with instant replay. IEEE Transaction on Computers, 36(4): 471--482, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. D. Lee, B. Wester, K. Veeraraghavan, P. M. Chen, J. Flinn, and S. Narayanasamy. Respec: Efficient online multiprocessor replay via speculation and external determinism. In Proceedings of the 15th International Conference on Architectural Support for Programming Languages and Operating Systems, pages 77--89, Pittsburgh, PA, March 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. T. Liu, C. Curtsinger, and E. D. Berger. Dthreads: efficient deterministic multithreading. In Proceedings of the Twenty-Third ACM Symposium on Operating Systems Principles, pages 327--336, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. B. Lucia, J. Devietti, K. Strauss, and L. Ceze. Atom-aid: Detecting and surviving atomicity violations. In Proceedings of the 35th Annual International Symposium on Computer Architecture, pages 277--288, Beijing, China, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. P. Montesinos, L. Ceze, and J. Torrellas. DeLorean: Recording and deterministically replaying shared-memory multiprocessor execution efficiently. In Proceedings of the 2008 International Symposium on Computer Architecture, pages 289--300, June 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. S. Narayanasamy, C. Pereira, and B. Calder. Recording shared memory dependencies using Strata. In ASPLOS-XII: Proceedings of the 12th International Conference on Architectural Support for Programming Languages and Operating Systems, pages 229--240, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. S. Narayanasamy, C. Pereira, H. Patil, R. Cohn, and B. Calder. Automatic logging of operating system effects to guide application-level architecture simulation. In International Conference on Measurements and Modeling of Computer Systems (SIGMETRICS), pages 216--227, June 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. G. C. Necula, S. McPeak, S. P. Rahul, and W. Weimer. Cil: Intermediate language and tools for analysis and transformation of c programs. In Proceedings of the 11th International Conference on Compiler Construction, CC '02, pages 213--228, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. E. B. Nightingale, D. Peek, P. M. Chen, and J. Flinn Parallelizing security checks on commodity hardware. In Proceedings of the 13th International Conference on Architectural Support for Programming Languages and Operating Systems, pages 308--318, Seattle, WA, March 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. M. Olszewski, J. Ansel, and S. Amarasinghe. Kendo: efficient deterministic multithreading in software. In Proceedings of the 2009 International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), pages 97--108, March 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. S. Park, Y. Zhou, W. Xiong, Z. Yin, R. Kaushik, K. H. Lee, and S. Lu. PRES: Probabilistic replay with execution sketching on multiprocessors. In Proceedings of the 22nd SOSP, pages 177--191, October 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. P. Pratikakis, J. S. Foster, and M. Hicks. Locksmith: Practical static race detection for c. ACM Trans. Program. Lang. Syst., 33:3:1?3:55, January 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. M. Ronsse and K. De Bosschere. RecPlay: A fully integrated practical record/replay system. ACM Transactions on Computer Systems, 17:133?152, May 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. R. Rugina and M. Rinard. Symbolic bounds analysis of pointers, array indices, and accessed memory regions. In Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation, PLDI '00, pages 182--195, New York, NY, USA, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. R. Rugina and M. C. Rinard. Symbolic bounds analysis of pointers, array indices, and accessed memory regions. ACM Trans. Program. Lang. Syst., 27:185?235, March 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. M. Russinovich and B. Cogswell. Replay for concurrent nondeterministic shared-memory applications. In Proceedings of the ACM SIGPLAN 1996 Conference on Programming Language Design and Implementation, pages 258--266, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. S. Srinivasan, C. Andrews, S. Kandula, and Y. Zhou. Flashback: A light-weight extension for rollback and deterministic replay for software debugging. In Proceedings of the 2004 USENIX Technical Conference, pages 29--44, Boston, MA, June 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. B. Steensgaard. Points-to analysis in almost linear time. In Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, POPL '96, pages 32--41, New York, NY, USA, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. N. Sterling. Warlock: A static data race analysis tool. pages 97--106, 1993.Google ScholarGoogle Scholar
  47. J. Tucek, S. Lu, C. Huang, S. Xanthos, and Y. Zhou. Triage: Diagnosing production run failures at the user's site. In Proceedings of the 21st ACM Symposium on Operating Systems Principles, pages 131--144, October 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. uclib.org. uClibc, a C library for embedded Linux. http://uClibc.org.Google ScholarGoogle Scholar
  49. K. Veeraraghavan, D. Lee, B. Wester, J. Ouyang, P. M. Chen, J Flinn, and S. Narayanasamy. DoublePlay: Parallelizing sequential logging and replay. In Proceedings of the 16th International Conference on Architectural Support for Programming Languages and Operating Systems, Long Beach, CA, March 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. J. W. Voung, R. Jhala, and S. Lerner. Relay: static rac 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, pages 205--214, Dubrovnik, Croatia, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. D. Weeratunge, X. Zhang, and S. Jagannathan. Analyzing multicore dumps to facilitate concurrency bug reproduction. In Proceedings of the 2010 International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), pages 155--166, March 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. R. P. Wilson and M. S. Lam. Efficient context-sensitive pointer analysis for c programs. In Proceedings of the ACM SIGPLAN 1995 conference on Programming language design and implementation, PLDI '95, pages 1--12, New York, NY, USA, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. S. C. Woo, M. Ohara, E. Torrie, J. P. Singh, and A. Gupta. The SPLASH-2 programs: Characterization and methodological considerations. In Proceedings of the 22nd International Symposium on Computer Architecture, pages 24--36, June 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. M. Xu, R. Bodik, and M. D. Hill. A ?flight data recorder?for enabling full-system multiprocessor deterministic replay. In Proceedings of the 2003 International Symposium on Computer Architecture, pages 122--135, June 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. M. Xu, V. Malyugin, J. Sheldon, G. Venkitachalam, and B.Weissman. ReTrace: Collecting execution trace with virtual machine deterministic replay. In Proceedings of the 2007 Workshop on Modeling, Benchmarking and Simulation (MoBS), June 2007.Google ScholarGoogle Scholar
  56. C. Zamfir and G. Candea. Execution synthesis: A technique for automated software debugging. In Proceedings of the European Conference Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Chimera: hybrid program analysis for determinism

        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

        Full Access

        • Published in

          cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 47, Issue 6
          PLDI '12
          June 2012
          534 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/2345156
          Issue’s Table of Contents
          • cover image ACM Conferences
            PLDI '12: Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation
            June 2012
            572 pages
            ISBN:9781450312059
            DOI:10.1145/2254064

          Copyright © 2012 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 11 June 2012

          Check for updates

          Qualifiers

          • research-article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!