Skip to main content

Race Detection Techniques

  • Reference work entry
Encyclopedia of Parallel Computing

Synonyms

Anomaly detection

Definition

Race detection is the procedure of identifying race conditions in parallel programs and program executions. Unintended race conditions are a common source of error in parallel programs and hence race detection methods play an important role in debugging such errors.

Discussion

Introduction

The following paragraphs summarize the notion of race conditions and data races. An elaborate discussion and detailed definitions are given in the corresponding related entry on “ race conditions.”

Race conditions. A widely accepted definition of race conditions is given by Netzer and Miller [47]: A general race, or race for short, is a pair of conflicting accesses to a shared resource for which the order of accesses is not guaranteed by the program, i.e., the accesses may execute in either order or simultaneously. A subclass of general races are data races, for which conflicting memory accesses may occur simultaneously.

Data races. The bulk of literature on race...

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 1,600.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD 1,799.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Bibliography

  1. Abadi M, Flanagan CE, Freund SN (2006) Types for safe locking: static race detection for Java. Trans Program Lang Syst (TOPLAS) 28(2):207–255

    Article  Google Scholar 

  2. Adve S, Hill M (June 1990) Weak ordering — A new definition. In: Proceedings of the annual international symposium on computer architecture (ISCA’90), pp 2–14

    Google Scholar 

  3. Adve S, Hill M, Miller B, Netzer R (May 1991) Detecting data races on weak memory systems. In: Proceedings of the annual international symposium on computer architecture (ISCA’91), pp 234–243

    Google Scholar 

  4. Allen TR, Padua DA (August 1987) Debugging fortran on a shared memory machine. In: Proceedings of the international conference on parallel processing, pp 721–727

    Google Scholar 

  5. Ayewah N, Hovemeyer D, Morgenthaler JD, Penix J, Pugh W (2008) Using static analysis to find bugs. IEEE Softw 25(5):22–29

    Article  Google Scholar 

  6. Bacon D, Strom R, Tarafdar A (October 2000) Guava: a dialect of Java without data races. In: Proceedings of the conference on object-oriented programming, systems, languages, and applications (OOPSLA’00), pp 382–400

    Google Scholar 

  7. Balasundaram V, Kennedy K (1989) Compile-time detection of race conditions in a parallel program. In: Proceedings of the international conference on supercomputing (ISC’89), pp 175–185

    Google Scholar 

  8. Boyapati C, Lee R, Rinard M (November 2002) Ownership types for safe programming: preventing data races and deadlocks. In: Proceedings of the conference on object-oriented programming, systems, languages, and applications (OOPSLA’02), pp 211–230

    Google Scholar 

  9. Bristow G, Dreay C, Edwards B, Riddle W (1979) Anomaly detection in concurrent programs. In: Proceedings of the international conference on software engineering (ICSE’79), pp 265–273

    Google Scholar 

  10. Burckhardt S, Alur R, Martin MMK (2007) CheckFence: checking consistency of concurrent data types on relaxed memory models. In: PLDI’07: Proceedings of the 2007 ACM SIGPLAN conference on programming language design and implementation. ACM, New York, pp 12–21

    Google Scholar 

  11. Charron-Bost B (1991) Concerning the size of logical clocks in distributed systems. Inf Process Lett 39(1):11–16

    Article  MATH  MathSciNet  Google Scholar 

  12. Chen F, Serbanuta TF, Rosu G (2008) jpredictor: a predictive runtime analysis tool for java. In: ICSE’08: Proceedings of the 30th international conference on software engineering. ACM, New York, pp 221–230

    Google Scholar 

  13. Choi J-D, Min SL (1991) Race frontier: reproducing data races in parallel program debugging. In: PPOPP’91: Proceedings of the third ACM SIGPLAN symposium on principles and practice of parallel programming. ACM, New York, pp 145–154

    Google Scholar 

  14. Choi J-D, Lee K, Loginov A, O’Callahan R, Sarkar V, Sridharan M (June 2002) Efficient and precise datarace detection for multithreaded object-oriented programs. In: Conference on programming language design and implementation (PLDI’02), pp 258–269

    Google Scholar 

  15. Dinning A, Schonberg E (1990) An empirical comparison of monitoring algorithms for access anomaly detection. In: PPOPP’90: Proceedings of the second ACM SIGPLAN symposium on principles & practice of parallel programming. ACM, New York, pp 1–10

    Google Scholar 

  16. Dinning A, Schonberg E (December 1991) Detecting access anomalies in programs with critical sections. In: Proceedings of the ACM/ONR workshop on parallel and distributed debugging, pp 85–96

    Google Scholar 

  17. Duesterwald E, Soffa M (1993) Concurrency analysis in the presence of procedures using a data-flow framework. In: Proceedings of the symposium on testing, analysis, and verification (TAV4), pp 36–48

    Google Scholar 

  18. Engler D, Ashcraft K (October 2003) RacerX: Effective, static detection of race conditions and deadlocks. In: Proceedings of the symposium on operating systems principles (SOSP’03), pp 237–252

    Google Scholar 

  19. Fidge CJ (1988) Timestamp in message passing systems that preserves partial ordering. In: Proceedings of the 11th Australian computing conference, pp 56–66

    Google Scholar 

  20. Flanagan C, Freund SN (June 2000) Type-based race detection for Java. In: Proceedings of the conference on programming language design and implementation (PLDI’00), pp 219–229

    Google Scholar 

  21. Flanagan C, Freund SN (June 2001) Detecting race conditions in large programs. In: Proceedings of the workshop on program analysis for software tools and engineering (PASTE’01), pp 90–96

    Google Scholar 

  22. Flanagan C, Freund SN (2009) FastTrack: Efficient and precise dynamic race detection. In: PLDI’09: Proceedings of the 2009 ACM SIGPLAN conference on programming language design and implementation. ACM, New York, pp 121–133

    Google Scholar 

  23. Flanagan C, Qadeer S (June 2003) A type and effect system for atomicity. In: Proceedings of the conference on programming language design and implementation (PLDI’03), pp 338–349

    Google Scholar 

  24. Flanagan C, Leino R, Lillibridge M, Nelson G, Saxe J, Stata R (June 2002) Extended static checking for Java. In: Proceedings of the conference on programming language design and implementation (PLDI’02), pp 234–245

    Google Scholar 

  25. Flanagan C, Freund SN, Yi J (2008) Velodrome: a sound and complete dynamic atomicity checker for multithreaded programs. In: PLDI’08: Proceedings of the 2008 ACM SIGPLAN conference on programming language design and implementation. ACM, New York, pp 293–303

    Google Scholar 

  26. Helmbold DP, McDowell CE (September 1994) A taxonomy of race detection algorithms. Technical Report UCSC-CRL-94-35, University of California, Santa Cruz, Computer Research Laboratory

    Google Scholar 

  27. Henzinger TA, Jhala R, Majumdar R (2004) Race checking by context inference. In: PLDI’04: Proceedings of the ACM SIGPLAN 2004 conference on programming language design and implementation. ACM, New York, pp 1–13

    Google Scholar 

  28. Hovemeyer D, Pugh W (July 2004) Finding concurrency bugs in java. In: Proceedings of the PODC workshop on concurrency and synchronization in Java programs

    Google Scholar 

  29. Jannesari A, Bao K, Pankratius V, Tichy WF (2009) Helgrind + : An efficient dynamic race detector. In: Proceedings of the 23rd international parallel & distributed processing symposium (IPDPS’09). IEEE, Rome

    Google Scholar 

  30. Kidd N, Reps T, Dolby J, Vaziri M (2009) Finding concurrency-related bugs using random isolation. In: VMCAI’09: Proceedings of the 10th international conference on verification, model checking, and abstract interpretation. Springer-Verlag, Heidelberg, pp 198–213

    Google Scholar 

  31. Lamport L (July 1978) Time, clock and the ordering of events in a distributed system. Commun ACM 21(7):558–565

    Article  MATH  Google Scholar 

  32. Lhoták O, Hendren L (March 2006) Context-sensitive points-to analysis: is it worth it? In: Mycroft A, Zeller A (eds) International conference of compiler construction (CC’06), vol 3923 of LNCS. Springer, Vienna, pp 47–64

    Google Scholar 

  33. Mattern F (1988) Virtual time and global states of distributed systems. In: Proceedings of the Parallel and distributed algorithms conference. Elsevier Science, Amsterdam, pp 215–226

    Google Scholar 

  34. Marino D, Musuvathi M, Narayanasamy S (2009) Literace: effective sampling for lightweight data-race detection. In: PLDI’09: Proceedings of the 2009 ACM SIGPLAN conference on programming language design and implementation. ACM, New York, pp 134–143

    Google Scholar 

  35. Masticola S, Ryder B (1993) Non-concurrency analysis. In: Proceedings of the symposium on principles and practice of parallel programming (PPoPP’93), pp 129–138

    Google Scholar 

  36. Mellor-Crummey J (November 1991) On-the-y detection of data races for programs with nested fork-join parallelism. In: Proceedings of the supercomputer debugging workshop, pp 24–33

    Google Scholar 

  37. Mellor-Crummey J (May 1993) Compile-time support for efficient data race detection in shared-memory parallel programs. In: Proceedings of the workshop on parallel and distributed debugging, pp 129–139

    Google Scholar 

  38. Midkiff S, Lee J, Padua D (June 2001) A compiler for multiple memory models. In: Rec. Workshop compilers for parallel computers (CPC’01)

    Google Scholar 

  39. Milanova A, Rountev A, Ryder BG (2005) Parameterized object sensitivity for points-to analysis for Java. ACM Trans Softw Eng Methodol 14(1):1–41

    Article  Google Scholar 

  40. Min SL, Choi J-D (1991) An efficient cache-based access anomaly detection scheme. In: ASPLOS-IV: Proceedings of the 4th international conference on architectural support for programming languages and operating systems. ACM, New York, pp 235–244

    Google Scholar 

  41. Musuvathi M, Qadeer S, Ball T, Basler G, Nainar PA, Neamtiu I (2008) Finding and reproducing heisenbugs in concurrent programs. In: OSDI’08: Proceedings of the 8th USENIX conference on operating systems design and implementation. USENIX Association, Berkeley, pp 267–280

    Google Scholar 

  42. Muzahid A, Suárez D, Qi S, Torrellas J (2009) Sigrace: signature-based data race detection. In: ISCA’09: Proceedings of the 36th annual international symposium on computer architecture. ACM, New York, pp 337–348

    Google Scholar 

  43. Naik M, Aiken A, Whaley J (June 2006) Effective static race detection for Java. In: Proceedings of the conference on programming language design and implementation (PLDI’06), pp 308–319

    Google Scholar 

  44. Naumovich G, Avrunin G, Clarke L (September 1999) An efficient algorithm for computing MHP information for concurrent Java programs. In: Proceedings of the European software engineering conference and symposium on the foundations of software engineering, pp 338–354

    Google Scholar 

  45. Netzer R, Miller B (August 1990a) Detecting data races in parallel program executions. Technical report TR90-894, Department of Computer Science, University of Wisconsin, Madison

    Google Scholar 

  46. Netzer R, Miller B (January 1990b) On the complexity of event ordering for shared-memory parallel program executions. Technical report TR 908, Computer Sciences Department, University of Wisconsin, Madison

    Google Scholar 

  47. Netzer R, Miller B (March 1992) What are race conditions? Some issues and formalizations. ACM Lett Program Lang Syst 1(1): 74–88

    Article  Google Scholar 

  48. Netzer R, Brennan T, Damodaran-Kamal S (1996) Debugging race conditions in message-passing programs. In: SPDT’96: Proceedings of the SIGMETRICS symposium on parallel and distributed tools. ACM, New York, pp 31–40

    Google Scholar 

  49. Nudler I, Rudolph L (1988) Tools for the efficient development of efficient parallel programs. In: Proceedings of the 1st Israeli conference on computer system engineering

    Google Scholar 

  50. O’Callahan R, Choi J-D (June 2003) Hybrid dynamic data race detection. In: Symposium on principles and practice of parallel programming (PPoPP’03), pp 167–178

    Google Scholar 

  51. Perkovic D, Keleher PJ (October 1996) Online data-race detection via coherency guarantees. In: Proceedings of the 2nd symposium on operating systems design and implementation (OSDI’96), pp 47–57

    Google Scholar 

  52. Pozniansky E, Schuster A (June 2003) Efficient on-the-y data race detection in multi-threaded { c} + + programs. In: Proceedings of the symposium on principles and practice of parallel programming (PPoPP’03), pp 179–190

    Google Scholar 

  53. Pozniansky E, Schuster A (2007) Multirace: efficient on-the-y data race detection in multithreaded { c} + + programs: research articles. Concurrency Comput: Pract Exper 19(3):327–340

    Article  Google Scholar 

  54. Prvulovic M, Torrellas J (2003) Reenact: using thread-level speculation mechanisms to debug data races in multithreaded codes. SIGARCH Comput Archit News 31(2):110–121

    Article  Google Scholar 

  55. Rajwar R, Goodman JR (2001) Speculative lock elision: enabling highly concurrent multithreaded execution. In MICRO 34: Proceedings of the 34th annual ACM/IEEE international symposium on microarchitecture. IEEE Computer Society, Washington, DC, pp 294–305

    Google Scholar 

  56. Ramalingam G (2000) Context-sensitive synchronization-sensitive analysis is undecidable. ACM Trans Program Lang Syst (TOPLAS) 22:416–430

    Article  Google Scholar 

  57. Richards B, Larus JR (1998) Protocol-based data-race detection. In SPDT’98: Proceedings of the SIGMETRICS symposium on parallel and distributed tools. ACM, New York, pp 40–47

    Google Scholar 

  58. Savage S, Burrows M, Nelson G, Sobalvarro P, Anderson T (October 1997a) Eraser: a dynamic data race detector for multi-threaded programs. In: Proceedings of the symposium on operating systems principles (SOSP’97), pp 27–37

    Google Scholar 

  59. Savage S, Burrows M, Nelson G, Sobalvarro P, Anderson T (1997b) Eraser: a dynamic data race detector for multithreaded programs. ACM Transactions on computer systems 15(4): 391–411

    Article  Google Scholar 

  60. Scheurich C, Dubois M (June 1987) Correct memory operation of cache-based multiprocessors. In: Proceedings of 14th annual symposium on computer architecture, Computer Architecture News, pp 234–243

    Google Scholar 

  61. Sen K, Rosu G, Agha G (2003) Runtime safety analysis of multithreaded programs. In: ESEC/FSE-11: Proceedings of the 9th European software engineering conference held jointly with 11th ACM SIGSOFT international symposium on foundations of software engineering. ACM, New York, pp 337–346

    Google Scholar 

  62. Shacham O, Sagiv M, Schuster A (2005) Scaling model checking of dataraces using dynamic information. In: PPoPP’05: Proceedings of the tenth ACM SIGPLAN symposium on principles and practice of parallel programming. ACM, New York, pp 107–118

    Google Scholar 

  63. Stoller SD (October 2002) Model-checking multi-threaded distributed Java programs. Int J Softw Tools Technol Transfer 4(1): 71–91

    Article  Google Scholar 

  64. Sura Z, Fang X, Wong C-L, Midkiff SP, Lee J, Padua DA (June 2005) Compiler techniques for high performance sequentially consistent Java programs. In: Proceedings of the symposium principles and practice of parallel programming (PPoPP’05), pp 2–13

    Google Scholar 

  65. Taylor RN (May 1983) A general purpose algorithm for analyzing concurrent programs. Commun ACM 26(5):362–376

    Article  MATH  Google Scholar 

  66. Visser W, Havelund K, Brat G, Park S (2000) Model checking programs. In: ASE’00: Proceedings of the 15th IEEE international conference on automated software engineering. IEEE Computer Society, Washington, p 3

    Google Scholar 

  67. von Praun C, Gross T (October 2001) Object race detection. In: Conference on object-oriented programming, systems, languages, and applications (OOPSLA’01), pp 70–82

    Google Scholar 

  68. Wang L, Stoller SD (2006) Accurate and efficient runtime detection of atomicity errors in concurrent programs. In: PPoPP’06: Proceedings of the eleventh ACM SIGPLAN symposium on Principles and practice of parallel programming. ACM, New York, pp 137–146

    Google Scholar 

  69. Welc A, Jagannathan S, Hosking AL (June 2004) Transactional monitors for concurrent objects. In: Proceedings of the European conference on object-oriented programming (ECOOP’04), pp 519–542

    Google Scholar 

  70. Yu Y, Rodeheffer T, Chen W (October 2003) RaceTrack: Efficient detection of data race conditions via adaptive tracking. In: Proceedings of the symposium on operating systems principles (SOSP’03), pp 221–234

    Google Scholar 

  71. Yu Y, Rodeheffer T, Chen W (2005) Racetrack: efficient detection of data race conditions via adaptive tracking. In SOSP’05: Proceedings of the 20th ACM symposium on operating systems principles. ACM, New York, pp 221–234

    Google Scholar 

  72. Zhou P, Teodorescu R, Zhou Y (2007) Hard: hardware-assisted lockset-based race detection. In: HPCA’07: Proceedings of the 2007 IEEE 13th international symposium on high performance computer architecture. IEEE Computer Society, Washington, DC, pp 121–132

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer Science+Business Media, LLC

About this entry

Cite this entry

von Praun, C. (2011). Race Detection Techniques. In: Padua, D. (eds) Encyclopedia of Parallel Computing. Springer, Boston, MA. https://doi.org/10.1007/978-0-387-09766-4_38

Download citation

Publish with us

Policies and ethics