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

A randomized scheduler with probabilistic guarantees of finding bugs

Published:13 March 2010Publication History

ABSTRACT

This paper presents a randomized scheduler for finding concurrency bugs. Like current stress-testing methods, it repeatedly runs a given test program with supplied inputs. However, it improves on stress-testing by finding buggy schedules more effectively and by quantifying the probability of missing concurrency bugs. Key to its design is the characterization of the depth of a concurrency bug as the minimum number of scheduling constraints required to find it. In a single run of a program with n threads and k steps, our scheduler detects a concurrency bug of depth d with probability at least 1/nkd-1. We hypothesize that in practice, many concurrency bugs (including well-known types such as ordering errors, atomicity violations, and deadlocks) have small bug-depths, and we confirm the efficiency of our schedule randomization by detecting previously unknown and known concurrency bugs in several production-scale concurrent programs.

References

  1. Y. Ben-Asher, Y. Eytani, E. Farchi, and S. Ur. Producing scheduling that causes concurrent programs to fail. In PADTAD, pages 37--40, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. S. Burckhardt et al. A randomized scheduler with probabilistic guarantees of finding bugs. Technical Report MSR-TR-2010-3, Microsoft Research, 2010.Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. R. H. Carver and K.-C. Tai. Replay and testing for concurrent programs. IEEE Softw., 8 (2): 66--74, 1991. ISSN 0740-7459. http://dx.doi.org/10.1109/52.73751. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. J.-D. Choi and A. Zeller. Isolating failure-inducing thread schedules. In ISSTA, pages 210--220, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. J. Devietti, B. Lucia, L. Ceze, and M. Oskin. DMP: deterministic shared memory multiprocessing. In ASPLOS, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. G. W. Dunlap, S. T. King, S. Cinar, M. A. Basrai, and P. M. Chen. ReVirt: Enabling intrusion analysis through virtual-machine logging and replay. In OSDI, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. G. W. Dunlap, D. G. Lucchetti, M. A. Fetterman, and P. M. Chen. Execution replay of multiprocessor virtual machines. In VEE 08: Virtual Execution Environments, pages 121--130. ACM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarCross RefCross Ref
  9. T. Elmas, S. Qadeer, and S. Tasiran. Goldilocks: a race and transaction-aware java runtime. In PLDI, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. E. Farchi, Y. Nir, and S. Ur. Concurrent bug patterns and how to test them. In IPDPS, page 286, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. C. Flanagan and S. N. Freund. Fasttrack: efficient and precise dynamic race detection. In PLDI, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. M. Frigo, C. E. Leiserson, and K. H. Randall. The implementation of the Cilk-5 multithreaded language. In PLDI, pages 212--223. ACM Press, 1998. Google ScholarGoogle Scholar
  13. P. Godefroid. Model checking for programming languages using Verisoft. In phPOPL 97, pages 174--186. ACM Press, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. J. L. Hellerstein. Achieving service rate objectives with decay usage scheduling. IEEE Trans. Softw. Eng., 19 (8): 813--825, 1993. ISSN 0098-5589. http://dx.doi.org/10.1109/32.238584. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. M. Isard, M. Budiu, Y. Yu, A. Birrell, and D. Fetterly. Dryad: Distributed data-parallel programs from sequential building blocks. Technical Report MSR-TR-2006-140, Microsoft Research, 2006.Google ScholarGoogle Scholar
  16. P. Joshi, C.-S. Park, K. Sen, and M. Naik. A randomized dynamic program analysis technique for detecting real deadlocks. In PLDI, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. H. Jula, D. M. Tralamazza, C. Zamfir, and G. Candea. Deadlock immunity: Enabling systems to defend against deadlocks. In OSDI, pages 295--308, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. T. J. LeBlanc and J. M. Mellor-Crummey. Debugging parallel programs with instant replay. IEEE Trans. Comput., 36 (4): 471--482, 1987. ISSN 0018-9340. http://dx.doi.org/10.1109/TC.1987.1676929. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. S. Lu, J. Tucek, F. Qin, and Y. Zhou. Avio: Detecting atomicity violations via access-interleaving invariants. IEEE Micro, 27 (1): 26--35, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. S. Lu, S. Park, E. Seo, and Y. Zhou. Learning from mistakes: a comprehensive study on real world concurrency bug characteristics. In ASPLOS, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. M. Musuvathi and S. Qadeer. Iterative context bounding for systematic testing of multithreaded programs. In PLDI, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. M. Musuvathi, S. Qadeer, T. Ball, G. Basler, P. A. Nainar, and I. Neamtiu. Finding and reproducing heisenbugs in concurrent programs. In OSDI, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. A. Muzahid, D. Suárez, S. Qi, and J. Torrellas. Sigrace: signature-based data race detection. In ISCA, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. M. Olszewski, J. Ansel, and S. Amarasinghe. Kendo: efficient deterministic multithreading in software. In ASPLOS, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. S. Park, S. Lu, and Y. Zhou. CTrigger: exposing atomicity violation bugs from their hiding places. In ASPLOS, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. K. Sen. Effective random testing of concurrent programs. In ASE, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. M. Xu, R. Bodik, and M. D. Hill. A "flight data recorder" for enabling full-system multiprocessor deterministic replay. In ISCA, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. M. Xu, R. Bodík, and M. D. Hill. A serializability violation detector for shared-memory server programs. In PLDI, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. J. Yu and S. Narayanasamy. A case for an interleaving constrained shared-memory multi-processor. In ISCA, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A randomized scheduler with probabilistic guarantees of finding bugs

        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

        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!