Skip to main content
Log in

Detecting harmful data races through parallel verification

  • Published:
The Journal of Supercomputing Aims and scope Submit manuscript

Abstract

Data races widely exist in concurrent programs and the harmful races have caused severe failures. To detect the harmful races, previous tools verify all the races, identifying the harmful ones. However, efficiency is affected when there are a large number of races needed to be verified. The multicore technology trend worsens this problem. Unlike previous work, to detect the harmful races, we try to improve the efficiency through parallel verification. We use imprecise race detection to find the races, including benign races and harmful races. The races are divided into many parts, and each part is sent to one machine for verification. On each machine, the races are verified dynamically, identifying the harmful races that would lead to program failures. To our knowledge, this is the first work that parallelizes race verification to improve the efficiency. We have experimented on a number of real-world concurrent programs and all the known harmful races in known benchmarks are detected. Additionally, our tool could scale well as the number of machines increases, and the speedup can also be increased linearly with the number of machines. Comparing with many previous tools, our work imposes lower runtime overhead.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11

Similar content being viewed by others

References

  1. Voung JW, Jhala R, Lerner S (2007) RELAY: static race detection on millions of lines of code. In: 15th ACM SIGSOFT international symposium on foundations of software engineering (FSE 2007), Cavtat near Dubrovnik, Croatia, pp 205–214

  2. Narayanasamy SZW, Tigani J, Edwards A, Calder B (2007) Automatically classifying benign and harmful data races using replay analysis. In: 28th annual ACMSIGPLAN conference on programming language design and implementation (PLDI 2007), pp 22–31

  3. SecurityFocus (2014) Software bug contributed to blackout. http://www.securityfocus.com/news/8016. Accessed 15 Oct 2014

  4. Pratikakis P, Foster JS, Hicks M (2011) Locksmith: practical static race detection for c. ACM Trans Program Lang Syst (TOPLAS) 33(3):1–55

    Article  Google Scholar 

  5. Sen K (2008) Race directed random testing of concurrent programs. In: 29th annual ACMSIGPLAN conference on programming language design and implementation (PLDI 2008), pp 11–21

  6. Eslamimehr M, Palsberg J (2014) Race directed scheduling of concurrent programs. In: Proceedings of the 19th ACM SIGPLAN symposium on principles and practice of parallel programming (PPoPP 2014)

  7. Dimitrov D, Raychev V, Vechev M, Koskinen E (2014) Commutativity race detection. In: 35th annual ACMSIGPLAN conference on programming language design and implementation (PLDI 2014)

  8. Baris K, Cristian Z, George C (2013) RaceMob: crowdsourced data race detection. In : Proceedings of the 23th ACM symposium on operating systems principles (SOSP 2013)

  9. Zhendong W, Kai L, Xiaoping W, Xu Z (2014) Collaborative technique for concurrency bug detection. Int J Parallel Program. pp 1–26. doi:10.1007/s10766-014-0304-y

  10. Savage S, Burrows M, Nelson G, Sobalvarro P, Anderson T (1997) Eraser: a dynamic data race detector for multithreaded programs. ACM Trans Comput Syst (TOCS) 15:391–411

    Article  Google Scholar 

  11. Callahan R, Choi J-D (2003) Hybrid dynamic data race detection. In: Proceedings of the 8th ACM SIGPLAN symposium on principles and practice of parallel programming (PPoPP 2003), pp 167–178

  12. Naik M, Aiken A, Whaley J (2006) Effective static race detection for Java, vol 41. ACM, New York

    Google Scholar 

  13. Kasikci B, Zamfir C, Candea G (2012) Data races vs. data race bugs: telling the difference with portend. In: 17th architectural support for programming languages and operating systems (ASPLOS 2012), pp 185–198

  14. Huang J, Meredith PO, Rosu G (2014) Maximal sound predictive race detection with control flow abstraction. In: 35th annual ACMSIGPLAN conference on programming language design and implementation (PLDI 2014)

  15. Sterling N (1993) WARLOCK-a static data race analysis tool. In: USENIx Winter, pp 97–106

  16. Engler D, Ashcraft K (2003) RacerX: effective, static detection of race conditions and deadlocks. In: Proceedings of the 19th ACM symposium on operating systems principles (SOSP 2003), pp 237–252

  17. Zhang W, Sun C, Lu S (2010) ConMem: detecting severe concurrency bugs through an effect-oriented approach. In: 15th architectural support for programming languages and operating systems (ASPLOS 2010), pp 179–192

  18. Zhang W, Lim J, Olichandran R, Scherpelz J, Jin G, Lu S, Reps T (2011) ConSeq: detecting concurrency bugs through sequential errors. In: 16th architectural support for programming languages and operating systems (ASPLOS 2011), pp 251–264

  19. Lu S, Park S, Hu C, Ma X, Jiang W, Li Z, Popa RA, Zhou Y (2007) MUVI: automatically inferring multi-variable access correlations and detecting related semantic and concurrency bugs. In: Proceedings of the 21th ACM symposium on operating systems principles (SOSP 2007), pp 103–116

  20. Yu J, Narayanasamy S, Pereira C, Pokam G (2012) Maple: a coverage-driven testing tool for multithreaded programs. In: Proceedings of the ACM international conference on object oriented programming systems languages and applications (OOPSLA 2012). pp 485–502

  21. Liblit B, Naik M, Zheng AX, Aiken A, Jordan MI (2005) Scalable statistical bug isolation, In: 26th annual ACMSIGPLAN conference on programming language design and implementation (PLDI 2005), pp 15–26

  22. Bond MD, Coons KE, McKinley KS (2010) PACER: proportional detection of data races, In: 31th annual ACMSIGPLAN conference on programming language design and implementation (PLDI 2010), pp 255–268

  23. Jin G, Thakur A, Liblit B, Lu S (2010) Instrumentation and sampling strategies for cooperative concurrency bug isolation. In: Proceedings of the ACM international conference on object oriented programming systems languages and applications (OOPSLA 2010), pp 241–255

  24. Lu S, Tucek J, Qin F, Zhou Y (2006) AVIO: detecting atomicity violations via access interleaving invariants. In: Architectural support for programming languages and operating systems (ASPLOS 2006), pp 37–48

  25. Park S, Lu S, Zhou Y (2009) CTrigger: exposing atomicity violation bugs from their hiding places. Ctrigger: exposing atomicity violation bugs from their hiding places. In: 15th architectural support for programming languages and operating systems (ASPLOS 2009), pp 25–36

  26. Lu S, Park S, Seo E, Zhou Y (2008) Learning from mistakes: a comprehensive study on real world concurrency bug characteristics. In: architectural support for programming languages and operating systems (ASPLOS 2008), pp 329–339

  27. Huang J, Zhang C (2011) Persuasive prediction of concurrency access anomalies. In : Proceedings of the 2011 international symposium on software testing and analysis (ISSTA 2011), pp 144–154

  28. Lai Z, Cheung SC, Chan WK (2010) Detecting atomic-set serializability violations in multithreaded programs through active randomized testing. In: Proceedings of the 32nd ACM/IEEE international conference on software engineering (ICSE 2010), pp 235–244

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

  30. Luk C-K, Cohn R, Muth R, Patil H, Klauser A, Lowney G, Wallace S, Reddi VJ, Hazelwood K (2005) Pin: building customized program analysis tools with dynamic instrumentation. In 26th annual ACMSIGPLAN conference on programming language design and implementation (PLDI 2005), pp 190–200

  31. Lucia B, Devietti J, Strauss K, Ceze L (2008) Atom-aid: detecting and surviving atomicity violations. In: Proceedings of the 35th annual international symposium on computer architecture (ISCA 2008), pp 277–288

  32. Woo SC, Ohara M, Torrie E, Singh JP, Gupta A (1995) The SPLASH-2 programs: characterization and methodological considerations. In: Proceedings of the 22th annual international symposium on computer architecture (ISCA 1995), pp 24–36

  33. Gilchrist J (2014) Parallel BZIP2. http://compression.ca/pbzip2. Accessed 15 Oct 2014

  34. McPherson C (2014) Ctrace. http://ctrace.sourceforge.net. Accessed 15 Oct 2014

  35. Xu Z, Kai L, Xiaoping W, Xu L (2012) Exploiting parallelism in deterministic shared memory multiprocessing. J Parallel Distrib Comput (JPDC) 72(5):716–727. doi:10.1016/j.jpdc.2012.02.008

  36. Kai L, Xu Z, Bergan T, Xiaoping Wang (2014) Efficient deterpinistic multithreading without global barriers. In: Proceedings of the 19th ACM SIGPLAN symposium on principles and practice of parallel programming

  37. Zhendong W, Kai L, Xiaoping W, Xu Z, Chen C (2014) PFinder: efficiently detecting bugs in concurrent programs through parallelizing race verification. The 9th IEEE international conference on computer engineering and systems

  38. Kai L, Zhendong W, Xiaoping W, Chen C, Xu Z (2015) RaceChecker: efficient identification of harmful data races. The 23rd Euromicro international conference on parallel, distributed, and network-based processing (PDP 2015), pp 78–85

Download references

Acknowledgments

We appreciate the kind comments and professional criticisms of the anonymous reviewers. This work is partially supported by National High-tech R&D Program of China (863 Program) under Grants 2012AA01A301 and 2012AA010901, by program for New Century Excellent Talents in University and by National Science Foundation (NSF) China 61402492, 61272142, 61103082, 61170261 and 61103193. Moreover, it is a part of Innovation Fund Sponsor Project of Excellent Postgraduate Student B130608. An earlier version of this paper [37] appeared in The 9th IEEE International Conference on Computer Engineering and Systems.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Zhendong Wu.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Wu, Z., Lu, K., Wang, X. et al. Detecting harmful data races through parallel verification. J Supercomput 71, 2922–2943 (2015). https://doi.org/10.1007/s11227-015-1418-8

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11227-015-1418-8

Keywords

Navigation