Abstract
Present advanced precise race detection techniques leverage strict causal relation to locate data races, leading to false negatives and missing many hidden races. In this paper, we present a novel race detection technique, called DigHR, which can detect more hidden races than existing precise techniques. DigHR is based on a weak causal relation, called afterward-confirm (AC) relation, which relaxes restrictions of existing causal relations and is proved to be sound. To represent AC relations between events, we propose a new data structure, called water-flow graph, which enable DigHR to analyze AC relations and detect hidden races at run-time. We have implemented DigHR in C/C++ and evaluated the effectiveness of DigHR by detecting races from real-world benchmarks and applications. The experimental results show that DigHR can precisely detect 21% more races than previous techniques, including FastTrack and CP.










Similar content being viewed by others
Notes
The source code of DigHR is available at https://github.com/pluohust/DigHR.
References
Netzer RHB, Miller BP (1992) What are race conditions?: Some issues and formalizations. ACM Lett Program Lang Syst 1(1):74–88
CVE-2016-5195, Dirty cow. https://dirtycow.ninja/?spm=5176.bbsr297492.0.0.nysnWC
Leveson N, Turner C (1993) An investigation of the therac-25 accidents. Computer 26(7):18–41
SecurityFocus, Software bug contributed to blackout. http://www.securityfocus.com/news/8016
Lamport L (1978) Time, clocks, and the ordering of events in a distributed system. Commun ACM 21(7):558–565
Flanagan C, Freund SN (2009) Fasttrack: efficient and precise dynamic race detection. ser. PLDI ’09. ACM, pp 121–133
Pozniansky E, Schuster A (2007) Multirace: efficient on-the-fly data race detection in multithreaded C++ programs. Concurr Comput Pract Exp 19(3):327–340
Itzkovitz A, Schuster A, Zeev-Ben-Mordehai O (1999) Toward integration of data race detection in dsm systems. J Parallel Distrib Comput 59(2):180–203
Ronsse M, De Bosschere K (1999) Recplay: a fully integrated practical record/replay system. ACM Trans Comput Syst 17(2):133–152
Choi J-D, Miller BP, Netzer RHB (1991) Techniques for debugging parallel programs with flowback analysis. ACM Trans Program Lang Syst 13(4):491–530
Smaragdakis Y, Evans J, Sadowski C, Yi J, Flanagan C (2012) Sound predictive race detection in polynomial time. In: Proc. of POPL. ACM
Huang J, Meredith PO, Rosu G (2014) Maximal sound predictive race detection with control flow abstraction. ser. PLDI ’14
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. ser. PLDI ’05. ACM
Elmas T, Burnim J, Necula G, Sen K (2013) Concurrit: a domain specific language for reproducing concurrency bugs. ser. PLDI ’13. ACM
Yang Y (2009) Efficient dynamic verification of concurrent programs. Ph.D. dissertation
cherokee, http://cherokee-project.com/
pbzip2, http://compression.ca/pbzip2/
Grossman D (2003) Type-safe multithreading in cyclone. ser. TLDI ’03. ACM
Pratikakis P, Foster JS, Hicks M (2006) Locksmith: context-sensitive correlation analysis for race detection. ser. PLDI ’06. ACM
Abadi M, Flanagan C, Freund SN (2006) Types for safe locking: static race detection for Java. ACM Trans Program Lang Syst 28(2):207–255
Engler D, Ashcraft K (2003) Racerx: effective, static detection of race conditions and deadlocks. In: Proceedings of the Nineteenth ACM Symposium on Operating Systems Principles. ACM
Naik M, Aiken A, Whaley J (2006) Effective static race detection for Java. In: Proceedings of the 27th ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM
Kahlon V, Yang Y, Sankaranarayanan S, Gupta A (2007) Fast and accurate static data-race detection for concurrent programs. In: Proceedings of the 19th International Conference on Computer Aided Verification, ser. CAV’07. Springer, pp 226–239
Voung JW, Jhala R, Lerner S (2007) Relay: static race detection on millions of lines of code. ser. ESEC-FSE ’07. ACM
Henzinger TA, Jhala R, Majumdar R (2004) Race checking by context inference. In: Proceedings of the ACM SIGPLAN 2004 Conference on Programming Language Design and Implementation. ACM
Qadeer S, Wu D (2004) Kiss: keep it simple and sequential. In: Proceedings of the ACM SIGPLAN 2004 Conference on Programming Language Design and Implementation. ACM
Wu Z, Lu K, Wang X (2016) Surveying concurrency bug detectors based on types of detected bugs. Sci China Inf Sci 60(3):031101
Prvulovic M (2006) Cord: cost-effective (and nearly overhead-free) order-recording and data race detection. In HPCA. IEEE Computer Society, pp 232–243
Dimitrov D, Raychev V, Vechev M, Koskinen E (2014) Commutativity race detection. In: Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation, ser. PLDI ’14. ACM, pp 305–315
Mattern F (1989) Virtual time and global states of distributed systems. In: Proc. workshop on parallel and distributed algorithms
O’Callahan R, Choi J-D (2003)Hybrid dynamic data race detection. In: Proceedings of the Ninth ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, ser. PPoPP ’03. ACM, pp 167–178
Tian C, Nagarajan V, Gupta R, Tallam S (2008) Dynamic recognition of synchronization operations for improved data race detection. In: Proceedings of the 2008 International Symposium on Software Testing and Analysis, ser. ISSTA ’08. ACM, pp 143–154
Serebryany K, Iskhodzhanov T (2009) Threadsanitizer: data race detection in practice. ser. WBIA ’09. ACM
Bond MD, Coons KE, McKinley KS (2010) Pacer: proportional detection of data races. ser. PLDI ’10. ACM
Li D, Srisa-an W, Dwyer MB (2011) Sos: saving time in dynamic race detection with stationary analysis. ser. OOPSLA ’11. ACM
Wester B, Devecsery D, Chen PM, Flinn J, Narayanasamy S (2013) Parallelizing data race detection. ser. ASPLOS ’13. ACM
Jiang Y, Yang Y, Xiao T, Sheng T, Chen W (2016) DRDDR: a lightweight method to detect data races in Linux kernel. J Supercomput 72(4):1645–1659
Bo Z, Shuang X, Yang A, TAO W (2016) DPTSV: a dynamic priority task scheduling strategy for TSS deadlock based on value evaluation. China Commun 1(13):161–175
Letko Z, Vojnar T, Křena B (2008) Atomrace: data race and atomicity violation detector and healer. In: Proceedings of the 6th Workshop on Parallel and Distributed Systems: Testing, Analysis, and Debugging, ser. PADTAD ’08. ACM
Burckhardt S, Kothari P, Musuvathi M, Nagarakatte S (2010) A randomized scheduler with probabilistic guarantees of finding bugs. ser. ASPLOS XV. ACM
Nagarakatte S, Burckhardt S, Martin MM, Musuvathi M (2012) Multicore acceleration of priority-based schedulers for concurrency bug detection. ser. PLDI ’12. ACM
Blum B, Gibson G (2016) Stateless model checking with data-race preemption points. In: Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications. ACM
Yu J, Narayanasamy S, Pereira C, Pokam G (2012) Maple: a coverage-driven testing tool for multithreaded programs. ser. OOPSLA ’12. ACM
Veeraraghavan K, Chen PM, Flinn J, Narayanasamy S (2011) Detecting and surviving data races using complementary schedules. In: Proceedings of the Twenty-Third ACM Symposium on Operating Systems Principles, ser. SOSP ’11. ACM, pp 369–384
Acknowledgements
This work is supported by National Science Foundation of China under Grant No. 61672249 and National 973 Fundamental Basic Research Program under Grant No. 2014CB340600.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Luo, P., Zou, D., Jin, H. et al. DigHR: precise dynamic detection of hidden races with weak causal relation analysis. J Supercomput 74, 2684–2704 (2018). https://doi.org/10.1007/s11227-018-2307-8
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11227-018-2307-8