skip to main content
article

RacerX: effective, static detection of race conditions and deadlocks

Published:19 October 2003Publication History
Skip Abstract Section

Abstract

This paper describes RacerX, a static tool that uses flow-sensitive, interprocedural analysis to detect both race conditions and deadlocks. It is explicitly designed to find errors in large, complex multithreaded systems. It aggressively infers checking information such as which locks protect which operations, which code contexts are multithreaded, and which shared accesses are dangerous. It tracks a set of code features which it uses to sort errors both from most to least severe. It uses novel techniques to counter the impact of analysis mistakes. The tool is fast, requiring between 2-14 minutes to analyze a 1.8 million line system. We have applied it to Linux, FreeBSD, and a large commercial code base, finding serious errors in all of them. RacerX is a static tool that uses flow-sensitive, interprocedural analysis to detect both race conditions and deadlocks. It uses novel strategies to infer checking information such as which locks protect which operations, which code contexts are multithreaded, and which shared accesses are dangerous. We applied it to FreeBSD, Linux and a large commercial code base and found serious errors in all of them.

References

  1. C. Boyapati, R. Lee, and M. Rinard. Ownership types for safe programming: Preventing data races and deadlocks. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), November 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. G. Brat, K. Havelund, S. Park, and W. Visser. Model checking programs. In IEEE International Conference on Automated Software Engineering (ASE), 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. M. Burrows and K. Leino. Finding stale-value errors in concurrent programs. Technical Report SRC-TN-2002-004, Compaq Systems Research Center, May 2002.]]Google ScholarGoogle Scholar
  4. W. Bush, J. Pincus, and D. Sielaff. A static analyzer for finding dynamic programming errors. Software: Practice and Experience, 30(7):775--802, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. S. Chandra, B. Richards, and J. Larus. Teapot: a domain-specific language for writing cache coherence protocols. IEEE Transactions on Software Engineering, 25(3):317--33, May-June 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Cheng, Feng, Leiserson, Randall, and Stark. Detecting data races in cilk programs that use locks. In SPAA: Annual ACM Symposium on Parallel Algorithms and Architectures, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. J. 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, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. E. Clarke, O. Grumberg, and D. Peled. Model Checking. MIT Press, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. J. Corbett. Evaluating deadlock detection methods for concurrent software. IEEE Transactions on Software Engineering, 22(3), 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. J. Corbett, M. Dwyer, J. Hatcliff, S. Laubach, C. Pasareanu, Robby, and H. Zheng. Bandera: Extracting finite-state models from java source code. In ICSE 2000, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. M. Das, S. Lerner, and M. Seigle. Path-sensitive program verification in polynomial time. In Proceedings of the ACM SIGPLAN 2002 Conference on Programming Language Design and Implementation, Berlin, Germany, June 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. D. Detlefs, K. R. M. Leino, G. Nelson, and J. Saxe. Extended static checking. TR SRC-159, COMPAQ SRC, Dec. 1998.]]Google ScholarGoogle Scholar
  13. A. Dinning and E. Schonberg. An empirical comparision of monitoring algorithms for access anomaly detection. In Proceedings of the 2nd ACM SIGPLAN Symposium on the Principles and Practice of Parallel Programming, 1990.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. D. Engler, D. Chen, S. Hallem, A. Chou, and B. Chelf. Bugs as deviant behavior: A general approach to inferring errors in systems code. In Proceedings of the Eighteenth ACM Symposium on Operating Systems Principles, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. C. Flanagan and S. N. Freund. Type-based race detection for Java. In SIGPLAN Conference on Programming Language Design and Implementation, pages 219--232, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. C. Flanagan and K. Leino. Houdini, an annotation assistant for ESC/Java. In Symposium of Formal Methods Europe, pages 500--517, Mar. 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. D. Freedman, R. Pisani, and R. Purves. Statistics. W.W. Norton, third edition edition, 1998.]]Google ScholarGoogle Scholar
  18. J. Gosling, B. Joy, G. Steele, and G. Bracha. The Java Language Specification (2nd Edition). Addison-Wesley, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. D. Grossman. Type-safe multithreading in cyclone. In Workshop on Types in Language Design and Implementation (TLDI), Jan. 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. S. Hallem, B. Chelf, Y. Xie, and D. Engler. A system and language for building system-specific, static analyses. In Proceedings of the ACM SIGPLAN 2002 Conference on Programming Language Design and Implementation, Berlin, Germany, June 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. D. P. Helmbold and C. E. McDowell. A taxonomy of race detection algorithms. Technical Report UCSC-CRL-94-35, 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. L. Lamport. Time, clocks, and the ordering of events in a distributed system. Comm. of the ACM, 21(7):558--565, July 1978.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. B. W. Lampson and D. D. Redell. Experience with processes and monitors in mesa. Commun. ACM, 23(2):105--116, Feb. 1980.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. K. M. Leino, G. Nelson, and J. Saxe. ESC/Java user's manual. Technical note 2000-002, Compaq Systems Research Center, Oct. 2001.]]Google ScholarGoogle Scholar
  25. J. Mellor-Crummey. On-the-fly detection of data races for programs with nested fork-join parallelism. In Proceedings of the 1991 Supercomputer Debugging Workshop, 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. A. Morton. Personal communication. Semantics and deadlock implications of the Linux BKL, Feb. 2003.]]Google ScholarGoogle Scholar
  27. D. Perkovic and P. Keleher. Online data-race detection via coherency guarantees. In Proceedings of the 2nd USENIX Symposium on Operating System Design and Implementation, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. T. Reps, S. Horowitz, and M. Sagiv. Precise interprocedural dataflow analysis via graph reachability. In Proceedings of the 22th Annual Symposium on Principles of Programming Languages, pages 49--61, 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson. Eraser: A dynamic data race detector for multithreaded programming. ACM Transactions on Computer Systems, 15(4):391--411, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. N. Sterling. Warlock: A static data race analysis tool. In Proceedings of the 1993 USENIX Winter Technical Conference, pages 97--106, 1993.]]Google ScholarGoogle Scholar

Index Terms

  1. RacerX: effective, static detection of race conditions and deadlocks

                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 SIGOPS Operating Systems Review
                  ACM SIGOPS Operating Systems Review  Volume 37, Issue 5
                  SOSP '03
                  December 2003
                  329 pages
                  ISSN:0163-5980
                  DOI:10.1145/1165389
                  Issue’s Table of Contents
                  • cover image ACM Conferences
                    SOSP '03: Proceedings of the nineteenth ACM symposium on Operating systems principles
                    October 2003
                    338 pages
                    ISBN:1581137575
                    DOI:10.1145/945445

                  Copyright © 2003 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: 19 October 2003

                  Check for updates

                  Qualifiers

                  • article

                PDF Format

                View or Download as a PDF file.

                PDF

                eReader

                View online with eReader.

                eReader