skip to main content
research-article

Butterfly analysis: adapting dataflow analysis to dynamic parallel monitoring

Published:13 March 2010Publication History
Skip Abstract Section

Abstract

Online program monitoring is an effective technique for detecting bugs and security attacks in running applications. Extending these tools to monitor parallel programs is challenging because the tools must account for inter-thread dependences and relaxed memory consistency models. Existing tools assume sequential consistency and often slow down the monitored program by orders of magnitude. In this paper, we present a novel approach that avoids these pitfalls by not relying on strong consistency models or detailed inter-thread dependence tracking. Instead, we only assume that events in the distant past on all threads have become visible; we make no assumptions on (and avoid the overheads of tracking) the relative ordering of more recent events on other threads. To overcome the potential state explosion of considering all the possible orderings among recent events, we adapt two techniques from static dataflow analysis, reaching definitions and reaching expressions, to this new domain of dynamic parallel monitoring. Significant modifications to these techniques are proposed to ensure the correctness and efficiency of our approach. We show how our adapted analysis can be used in two popular memory and security tools. We prove that our approach does not miss errors, and sacrifices precision only due to the lack of a relative ordering among recent events. Moreover, our simulation study on a collection of Splash-2 and Parsec 2.0 benchmarks running a memory-checking tool on a hardware-assisted logging platform demonstrates the potential benefits in trading off a very low false positive rate for (i) reduced overhead and (ii) the ability to run on relaxed consistency models.

References

  1. S. V. Adve and K. Gharachorloo. Shared memory consistency models: A tutorial. IEEE Computer, 29(12), 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. A. Aho, R. Sethi, and J. Ullman. Compilers: Principles, Techniques, and Tools. Addison-Wesley, Reading, MA, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. J. Auerbach, D. Bacon, P. Cheng, D. Grove, B. Biron, C. Gracie, B. McCloskey, A. Micic, and R. Sciampacone. Tax-and-spend: Democratic scheduling for real-time garbage collection. In EMSOFT, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. D. F. Bacon, C. R. Attanasio, H. B. Lee, V. Rajan, and S. Smith. Java without the coffee breaks: A nonintrusive multiprocessor garbage collector. In PLDI, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. C. Bienia and K. Li. Parsec 2.0: A new benchmark suite for chipmultiprocessors. In MoBS, June 2009.Google ScholarGoogle Scholar
  6. D. Bruening. Efficient, Transparent, and Comprehensive Runtime Code Manipulation. PhD thesis, MIT, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. W. R. Bush, J. D. Pincus, and D. J. Sielaff. A static analyzer for finding dynamic programming errors. Software-Practice & Experience, 30, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. S. Chen, M. Kozuch, T. Strigkos, B. Falsafi, P. B. Gibbons, T. C. Mowry, V. Ramachandran, O. Ruwase, M. Ryan, and E. Vlachos. Flexible hardware acceleration for instruction-grain program monitoring. In ISCA, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. R. Chugh, J. Voung, R. Jhala, and S. Lerner. Dataflow analysis for concurrent programs using datarace detection. In PLDI, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. J. Chung, M. Dalton, H. Kannan, and C. Kozyrakis. Thread-safe dynamic binary translation using transactional memory. In HPCA, 2008.Google ScholarGoogle Scholar
  11. M. L. Corliss, E. C. Lewis, and A. Roth. DISE: A programmable macro engine for customizing applications. In ISCA, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. M. Dubois, C. Scheurich, and F. Briggs. Memory access buffering in multiprocessors. In ISCA, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. D. Engler, B. Chelf, A. Chou, and S. Hallem. Checking system rules using system-specific, programmer-written compiler extensions. In OSDI, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. M. D. Ernst, J. Cockrell,W. G. Griswold, and D. Notkin. Dynamically discovering likely program invariants to support program evolution. IEEE Transactions on Software Engineering, 27(2), 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. C. Flanagan, K. R. M. Leino, M. Lillibridge, G. Nelson, J. B. Saxe, and R. Stata. Extended static checking for Java. In PLDI, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. D. Grunwald and H. Srinivasan. Data flow equations for explicitly parallel programs. In PPOPP, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. S. A. Hofmeyr, S. Forrest, and A. Somayaji. Intrusion detection using sequences of system calls. Journal of Computer Security, 6(3), 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. J. Knoop, B. Steffen, and J. Vollmer. Parallelism for free: efficient and optimal bitvector analyses for parallel programs. ACM Transactions on Programming Languages and Systems, 18(3), 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. J. Krinke. Static slicing of threaded programs. ACM SIGPLAN Notices, 33(7), 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. D. Long and L. Clarke. Data flow analysis of concurrent systems that use the rendezvous model of synchronization. In ISSTA, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. B. Lucia and L. Ceze. Finding concurrency bugs with context-aware communication graphs. In MICRO, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. C.-K. Luk, R. Cohn, R. Muth, H. Patil, A. Klauser, G. Lowney, S. Wallace, V. J. Reddi, and K. Hazelwood. Pin: Building customized program analysis tools with dynamic instrumentation. In PLDI, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. A. Muzahid, D. Suárez, S. Qi, and J. Torrellas. SigRace: Signaturebased data race detection. In ISCA, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. S. Narayanasamy, G. Pokam, and B. Calder. BugNet: Continuously recording program execution for deterministic replay debugging. In ISCA, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. S. Narayanasamy, C. Pereira, and B. Calder. Recording shared memory dependencies using strata. In ASPLOS, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. N. Nethercote. Dynamic Binary Analysis and Instrumentation. PhD thesis, U. Cambridge, 2004. http://valgrind.org.Google ScholarGoogle Scholar
  27. N. Nethercote and J. Seward. Valgrind: A framework for heavyweight dynamic binary instrumentation. In PLDI, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. N. Nethercote and J. Seward. Valgrind: A program supervision framework. Electronic Notes in Theoretical Computer Science, 89(2), 2003.Google ScholarGoogle Scholar
  29. J. Newsome and D. Song. Dynamic taint analysis for automatic detection, analysis, and signature generation of exploits on commodity software. In NDSS, 2005.Google ScholarGoogle Scholar
  30. S. Park, Y. Zhou, W. Xiong, Z. Yin, R. Kaushik, K. Lee, and S. Lu. PRES: Probabilistic replay with execution sketching on multiprocessors. In SOSP, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. N. Provos. Improving host security with system call policies. In USENIX Security, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. F. Qin, J. Tucek, J. Sundaresan, and Y. Zhou. Rx: Treating bugs as allergies -- a safe method to survive software failures. In SOSP, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. V. Sarkar. Analysis and optimization of explicitly parallel programs using the parallel program graph representation. Lecture Notes in Computer Science, 1366, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson. Eraser: A dynamic race detector for multi-threaded programs. ACM Transactions on Computer Systems, 15(4), 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. R. E. Tarjan. Fast algorithms for solving path problems. Journal of the ACM, 28(3), 1981. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Virtutech Simics. http://www.virtutech.com/.Google ScholarGoogle Scholar
  37. E. Vlachos, M. L. Goodstein, M. A. Kozuch, S. Chen, B. Falsafi, P. B. Gibbons, and T. C. Mowry. ParaLog: Enabling and accelerating online parallel monitoring of multithreaded applications. In ASPLOS, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. S. C. Woo, M. Ohara, E. Torrie, J. P. Singh, and A. Gupta. The SPLASH-2 programs: Characterization and methodological considerations. In ISCA, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. M. Xu, R. Bodik, and M. D. Hill. A regulated transitive reduction (RTR) for longer memory race recording. In ASPLOS, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. P. Zhou, R. Teodorescu, and Y. Zhou. HARD: Hardware-assisted lockset-based race detection. In HPCA, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Y. Zhou, P. Zhou, F. Qin,W. Liu, and J. Torrellas. Efficient and flexible architectural support for dynamic monitoring. ACM Transactions on Architecture and Code Optimization, 2(1), 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Butterfly analysis: adapting dataflow analysis to dynamic parallel monitoring

            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 45, Issue 3
              ASPLOS '10
              March 2010
              399 pages
              ISSN:0362-1340
              EISSN:1558-1160
              DOI:10.1145/1735971
              Issue’s Table of Contents
              • cover image ACM Conferences
                ASPLOS XV: Proceedings of the fifteenth International Conference on Architectural support for programming languages and operating systems
                March 2010
                422 pages
                ISBN:9781605588391
                DOI:10.1145/1736020
                • General Chair:
                • James C. Hoe,
                • Program Chair:
                • Vikram S. Adve

              Copyright © 2010 ACM

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 13 March 2010

              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!