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.
Similar content being viewed by others
References
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
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
SecurityFocus (2014) Software bug contributed to blackout. http://www.securityfocus.com/news/8016. Accessed 15 Oct 2014
Pratikakis P, Foster JS, Hicks M (2011) Locksmith: practical static race detection for c. ACM Trans Program Lang Syst (TOPLAS) 33(3):1–55
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
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)
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)
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)
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
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
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
Naik M, Aiken A, Whaley J (2006) Effective static race detection for Java, vol 41. ACM, New York
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
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)
Sterling N (1993) WARLOCK-a static data race analysis tool. In: USENIx Winter, pp 97–106
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Gilchrist J (2014) Parallel BZIP2. http://compression.ca/pbzip2. Accessed 15 Oct 2014
McPherson C (2014) Ctrace. http://ctrace.sourceforge.net. Accessed 15 Oct 2014
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
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
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
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
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
Corresponding author
Rights and permissions
About this article
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
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11227-015-1418-8