skip to main content
research-article

Multicore acceleration of priority-based schedulers for concurrency bug detection

Published:11 June 2012Publication History
Skip Abstract Section

Abstract

Testing multithreaded programs is difficult as threads can interleave in a nondeterministic fashion. Untested interleavings can cause failures, but testing all interleavings is infeasible. Many interleaving exploration strategies for bug detection have been proposed, but their relative effectiveness and performance remains unclear as they often lack publicly available implementations and have not been evaluated using common benchmarks. We describe NeedlePoint, an open-source framework that allows selection and comparison of a wide range of interleaving exploration policies for bug detection proposed by prior work.

Our experience with NeedlePoint indicates that priority-based probabilistic concurrency testing (the PCT algorithm) finds bugs quickly, but it runs only one thread at a time, which destroys parallelism by serializing executions. To address this problem we propose a parallel version of the PCT algorithm~(PPCT). We show that the new algorithm outperforms the original by a factor of 5x when testing parallel programs on an eight-core machine. We formally prove that parallel PCT provides the same probabilistic coverage guarantees as PCT. Moreover, PPCT is the first algorithm that runs multiple threads while providing coverage guarantees.

References

  1. Helgrind: A Thread Error Detector. http://valgrind.org/docs/manual/hg-manual.html.Google ScholarGoogle Scholar
  2. Intel Thread Checker. http://software.intel.com/en-us/articles/intel-thread-checker-documentation/.Google ScholarGoogle Scholar
  3. S. Adve and K. Gharachorloo. Shared Memory Consistency Models: A Tutorial. Computer, 29(12):66--76, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. C. Bienia. Benchmarking Modern Multiprocessors. PhD thesis, Princeton University, January 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. S. Burckhardt, P. Kothari, M. Musuvathi, and S. Nagarakatte. A Randomized Scheduler with Probabilistic Guarantees of Finding Bugs. In Proceedings of the 15th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. E. Clarke, O. Grumberg, and D. Peled. Model Checking. MIT Press, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. O. Edelstein, E. Farchi, E. Goldin, Y. Nir, G. Ratsaby, and S. Ur. Framework for testing multi-threaded Java programs. Concurrency and Computation: Practice and Experience, 15(3--5):485--499, 2003.Google ScholarGoogle Scholar
  8. Q. Gao, W. Zhang, Z. Chen, M. Zheng, and F. Qin. 2ndStrike: Toward Manifesting Hidden Concurrency Typestate Bugs. In Proceedings of the 16th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. P. Godefroid. Model Checking for Programming Languages using VeriSoft. In Proceedings of the 24th ACM Symposium on Principles of Programming Languages (POPL), 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. N. Jalbert, C. Pereira, G. Pokam, and K. Sen. RADBench: A Concurrency Bug Benchmark Suite. In Proceedings of the 3rd USENIX Conference on Hot Topics in Parallelism (HotPar), 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. P. Joshi, M. Naik, C.-S. Park, and K. Sen. CalFuzzer: An Extensible Active Testing Framework for Concurrent Programs. In Proceedings of the 21st International Conference on Computer Aided Verification (CAV), 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. P. Joshi, C.-S. Park, K. Sen, and M. Naik. A Randomized Dynamic Program Analysis Technique for Detecting Real Deadlocks. In Proceedings of the ACM SIGPLAN 2009 Conference on Programming Language Design and Implementation (PLDI), 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. H. Jula, D. Tralamazza, C. Zamfir, and G. Candea. Deadlock Immunity: Enabling Systems to Defend Against Deadlocks. In Proceedings of the 8th USENIX Symposium on Operating Systems Design and Implementation (OSDI), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. S. Lu, S. Park, E. Seo, and Y. 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), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. S. Lu, J. Tucek, F. Qin, and Y. Zhou. AVIO: Detecting Atomicity Violations via Access Interleaving Invariants. In Proceedings of the 12th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. B. Lucia and L. Ceze. Finding Concurrency Bugs with Context-Aware Communication Graphs. In Proceedings of the 42nd Annual IEEE/ACM International Symposium on Microarchitecture (MICRO), 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 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 Proceedings of the ACM SIGPLAN 2005 Conference on Programming Language Design and Implementation (PLDI), 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. J. Manson, W. Pugh, and S. Adve. The Java Memory Model. In Proceedings of The 32nd ACM SIGPLAN/SIGACT Symposium on Principles of Programming Languages (POPL), 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. M. Musuvathi and S. Qadeer. Iterative Context Bounding for Systematic Testing of Multithreaded Programs. In Proceedings of the ACM SIGPLAN 2007 Conference on Programming Language Design and Implementation (PLDI), 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. M. Musuvathi and S. Qadeer. Fair Stateless Model Checking. In Proceedings of the ACM SIGPLAN 2008 Conference on Programming Language Design and Implementation (PLDI), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. M. Musuvathi, S. Qadeer, T. Ball, G. Basler, P. A. Nainar, and I. Neamtiu. Finding and Reproducing Heisenbugs in Concurrent Programs. In Proceedings of the 8th USENIX Symposium on Operating Systems Design and Implementation (OSDI), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. C.-S. Park and K. Sen. Randomized Active Atomicity Violation Detection in Concurrent Programs. In Proceedings of the 16th ACM SIGSOFT International Symposium on the Foundations of Software Engineering (FSE), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. S. Park, S. Lu, and Y. Zhou. CTrigger: Exposing Atomicity Violation Bugs from their Hiding Places. In Proceedings of the 14th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. K. Sen. Effective Random Testing of Concurrent Programs. In Proceedings of 22nd IEEE/ACM International Conference on Automated Software Engineering (ASE), 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. K. Sen. Race Directed Random Testing of Concurrent Programs. In SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. W. Xiong, S. Park, J. Zhang, Y. Zhou, and Z. Ma. Ad Hoc Synchronization Considered Harmful. In Proceedings of the 9th USENIX Symposium on Operating Systems Design and Implementation (OSDI), 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. J. Yu and S. Narayanasamy. A Case for an Interleaving Constrained Shared-Memory Multi-Processor. In Proceedings of the 36th Annual International Symposium on Computer Architecture (ISCA), 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. W. Zhang, C. Sun, and S. Lu. ConMem: Detecting Severe Concurrency Bugs through an Effect-Oriented Approach. In Proceedings of the 15th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Multicore acceleration of priority-based schedulers for concurrency bug detection

    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

    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!