skip to main content
10.1145/2568225.2568236acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

CARE: cache guided deterministic replay for concurrent Java programs

Published:31 May 2014Publication History

ABSTRACT

Deterministic replay tools help programmers debug concurrent programs. However, for long-running programs, a replay tool may generate huge log of shared memory access dependences. In this paper, we present CARE, an application-level deterministic record and replay technique to reduce the log size. The key idea of CARE is logging read-write dependences only at per-thread value prediction cache misses. This strategy records only a subset of all exact read-write dependences, and reduces synchronizations protecting memory reads in the instrumented code. Realizing that such record strategy provides only value-deterministic replay, CARE also adopts variable grouping and action prioritization heuristics to synthesize sequentially consistent executions at replay in linear time. We implemented CARE in Java and experimentally evaluated it with recognized benchmarks. Results showed that CARE successfully resolved all missing read-write dependences, producing sequentially consistent replay for all benchmarks. CARE exhibited 1.7--40X (median 3.4X) smaller runtime overhead, and 1.1--309X (median 7.0X) smaller log size against state-of-the-art technique LEAP.

References

  1. ASM toolkit for bytecode manipulation. http://asm.ow2. org/.Google ScholarGoogle Scholar
  2. JVM tool interface. http://docs.oracle.com/ javase/7/docs/platform/jvmti/jvmti.html.Google ScholarGoogle Scholar
  3. G. Altekar and I. Stoica. ODR: output-deterministic replay for multicore debugging. In Proceedings of the ACM SIGOPS 22nd symposium on Operating systems principles, SOSP, pp. 193–206, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. D. F. Bacon and S. C. Goldstein. Hardware-assisted replay of multiprocessor programs. In Proceedings of the 1991 ACM/ONR workshop on Parallel and distributed debugging, PADD, pp. 194–206, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. A. Basu, J. Bobba, and M. D. Hill. Karma: Scalable deterministic record-replay. In Proceedings of the international conference on Supercomputing, ICS, pp. 359–368, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. J. Bell, N. Sarda, and G. Kaiser. Chronicler: Lightweight recording to reproduce field failures. In Proceedings of the 2013 International Conference on Software Engineering, ICSE, pp. 362–371, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 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 fifteenth edition of ASPLOS on Architectural support for programming languages and operating systems, ASPLOS, pp. 53–64, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. S. Bhansali, W.-K. Chen, S. de Jong, A. Edwards, R. Murray, M. Drini´c, D. Mihoˇcka, and J. Chau. Framework for instruction-level tracing and analysis of program executions. In Proceedings of the 2nd international conference on Virtual execution environments, VEE, pp. 154–163, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Y. Chen and H. Chen. Scalable deterministic replay in a parallel full-system emulator. In Proceedings of the 18th ACM SIGPLAN symposium on Principles and practice of parallel programming, PPoPP, pp. 207–218, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. A. Cheung, A. Solar-Lezama, and S. Madden. Partial replay of long-running applications. In Proceedings of the 19th ACM SIGSOFT symposium and the 13th European conference on Foundations of software engineering, ESEC/FSE, pp. 135–145, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. J. Devietti, B. Lucia, L. Ceze, and M. Oskin. DMP: deterministic shared memory multiprocessing. In Proceedings of the 14th international conference on Architectural support for programming languages and operating systems, ASPLOS, pp. 85–96, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. G. W. Dunlap, S. T. King, S. Cinar, M. A. Basrai, and P. M. Chen. ReVirt: enabling intrusion analysis through virtualmachine logging and replay. In Proceedings of the 5th symposium on Operating systems design and implementation, OSDI, pp. 211–224, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. G. W. Dunlap, D. G. Lucchetti, M. A. Fetterman, and P. M. Chen. Execution replay of multiprocessor virtual machines. In Proceedings of the fourth ACM SIGPLAN/SIGOPS international conference on Virtual execution environments, VEE, pp. 121–130, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. P. B. Gibbons and E. Korach. Testing shared memories. SIAM J. Comput., 26(4):1208–1244, Aug. 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. L. Gomez, I. Neamtiu, T. Azim, and T. Millstein. RERAN: Timing- and touch-sensitive record and replay for android. In Proceedings of the 2013 International Conference on Software Engineering, ICSE, pp. 72–81, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. N. Honarmand, N. Dautenhahn, J. Torrellas, S. T. King, G. Pokam, and C. Pereira. Cyrus: Unintrusive applicationlevel record-replay for replay parallelism. In Proceedings of the eighteenth international conference on Architectural support for programming languages and operating systems, ASPLOS, pp. 193–206, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. D. Hower, P. Dudnik, M. Hill, and D. Wood. Calvin: Deterministic or not? Free will to choose. In 2011 IEEE 17th International Symposium on High Performance Computer Architecture, HPCA, pp. 333–334, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. J. Huang, P. Liu, and C. Zhang. LEAP: Lightweight deterministic multi-processor replay of concurrent Java programs. In Proceedings of the eighteenth ACM SIGSOFT international symposium on Foundations of software engineering, FSE, pp. 207–216, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. J. Huang, C. Zhang, and J. Dolby. CLAP: Recording local executions to reproduce concurrency failures. In Proceedings of the 34th ACM SIGPLAN conference on Programming language design and implementation, PLDI, pp. 141–152, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. N. Jalbert and K. Sen. A trace simplification technique for effective debugging of concurrent programs. In Proceedings of the eighteenth ACM SIGSOFT international symposium on Foundations of software engineering, FSE, pp. 57–66, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Y. Jiang, C. Xu, and X. Ma. DPAC: An infrastructure for dynamic program analysis of concurrency Java programs. In Proceedings of the 2013 Middleware Doctoral Symposium, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. P. Joshi, C.-S. Park, K. Sen, and M. Naik. A randomized dynamic program analysis technique for detecting real deadlocks. In Proceedings of the 2009 ACM SIGPLAN conference on Programming language design and implementation, PLDI, pp. 110–120, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. S. T. King, G. W. Dunlap, and P. M. Chen. Debugging operating systems with time-traveling virtual machines. In Proceedings of the annual conference on USENIX Annual Technical Conference, ATEC, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. T. LeBlanc and J. Mellor-Crummey. Debugging parallel programs with instant replay. Computers, IEEE Transactions on, C-36(4):471–482, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. D. Lee, P. M. Chen, J. Flinn, and S. Narayanasamy. Chimera: Hybrid program analysis for determinism. In Proceedings of the 33rd ACM SIGPLAN conference on Programming Language Design and Implementation, PLDI, pp. 463–474, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. K. H. Lee, Y. Zheng, N. Sumner, and X. Zhang. Toward generating reducible replay logs. In Proceedings of the 32nd ACM SIGPLAN conference on Programming language design and implementation, PLDI, pp. 246–257, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. J. Manson, W. Pugh, and S. V. Adve. The Java memory model. In Proceedings of the 32nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, POPL, pp. 378–391, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. R. H. B. Netzer. Optimal tracing and replay for debugging shared-memory parallel programs. In Proceedings of the 1993 ACM/ONR workshop on Parallel and distributed debugging, PADD, pp. 1–11, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. 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 ACM SIGOPS 22nd symposium on Operating systems principles, SOSP, pp. 177– 192, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. K. Sen. Race directed random testing of concurrent programs. In Proceedings of the 2008 ACM SIGPLAN conference on Programming language design and implementation, PLDI, pp. 11–21, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Y. Smaragdakis, J. Evans, C. Sadowski, J. Yi, and C. Flanagan. Sound predictive race detection in polynomial time. In Proceedings of the 39th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages, POPL, pp. 387–400, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. J. Tucek, S. Lu, C. Huang, S. Xanthos, and Y. Zhou. Triage: Diagnosing production run failures at the user’s site. In Proceedings of twenty-first ACM SIGOPS symposium on Operating systems principles, SOSP, pp. 131–144, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. D. Weeratunge, X. Zhang, and S. Jagannathan. Analyzing multicore dumps to facilitate concurrency bug reproduction. In Proceedings of the fifteenth edition of ASPLOS on Architectural support for programming languages and operating systems, ASPLOS, pp. 155–166, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. M. Xu, M. D. Hill, and R. Bodik. A regulated transitive reduction (RTR) for longer memory race recording. In Proceedings of the 12th international conference on Architectural support for programming languages and operating systems, ASPLOS, pp. 49–60, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Z. Yang, M. Yang, L. Xu, H. Chen, and B. Zang. ORDER: Object centric deterministic replay for java. In Proceedings of the 2011 USENIX conference on USENIX annual technical conference, ATEC, pp. 30–43, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. C. Zamfir and G. Candea. Execution synthesis: A technique for automated software debugging. In Proceedings of the 5th European conference on Computer systems, EuroSys, pp. 321– 334, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. J. Zhou, X. Xiao, and C. Zhang. Stride: Search-based deterministic replay in polynomial time via bounded linkage. In Proceedings of the 2012 International Conference on Software Engineering, ICSE, pp. 892–902, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. CARE: cache guided deterministic replay for concurrent Java programs

    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
      ICSE 2014: Proceedings of the 36th International Conference on Software Engineering
      May 2014
      1139 pages
      ISBN:9781450327565
      DOI:10.1145/2568225

      Copyright © 2014 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: 31 May 2014

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate276of1,856submissions,15%

      Upcoming Conference

      ICSE 2025

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader