Skip to main content
Log in

DigHR: precise dynamic detection of hidden races with weak causal relation analysis

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

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.

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.

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

Similar content being viewed by others

Notes

  1. The source code of DigHR is available at https://github.com/pluohust/DigHR.

References

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

    Article  Google Scholar 

  2. CVE-2016-5195, Dirty cow. https://dirtycow.ninja/?spm=5176.bbsr297492.0.0.nysnWC

  3. Leveson N, Turner C (1993) An investigation of the therac-25 accidents. Computer 26(7):18–41

    Article  Google Scholar 

  4. SecurityFocus, Software bug contributed to blackout. http://www.securityfocus.com/news/8016

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

    Article  MATH  Google Scholar 

  6. Flanagan C, Freund SN (2009) Fasttrack: efficient and precise dynamic race detection. ser. PLDI ’09. ACM, pp 121–133

  7. 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

    Article  Google Scholar 

  8. 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

    Article  Google Scholar 

  9. Ronsse M, De Bosschere K (1999) Recplay: a fully integrated practical record/replay system. ACM Trans Comput Syst 17(2):133–152

    Article  Google Scholar 

  10. 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

    Article  Google Scholar 

  11. Smaragdakis Y, Evans J, Sadowski C, Yi J, Flanagan C (2012) Sound predictive race detection in polynomial time. In: Proc. of POPL. ACM

  12. Huang J, Meredith PO, Rosu G (2014) Maximal sound predictive race detection with control flow abstraction. ser. PLDI ’14

  13. 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

  14. Elmas T, Burnim J, Necula G, Sen K (2013) Concurrit: a domain specific language for reproducing concurrency bugs. ser. PLDI ’13. ACM

  15. Yang Y (2009) Efficient dynamic verification of concurrent programs. Ph.D. dissertation

  16. Aget, http://www.enderunix.org/aget/

  17. cherokee, http://cherokee-project.com/

  18. pbzip2, http://compression.ca/pbzip2/

  19. Grossman D (2003) Type-safe multithreading in cyclone. ser. TLDI ’03. ACM

  20. Pratikakis P, Foster JS, Hicks M (2006) Locksmith: context-sensitive correlation analysis for race detection. ser. PLDI ’06. ACM

  21. 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

    Article  Google Scholar 

  22. 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

  23. 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

  24. 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

  25. Voung JW, Jhala R, Lerner S (2007) Relay: static race detection on millions of lines of code. ser. ESEC-FSE ’07. ACM

  26. 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

  27. 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

  28. Wu Z, Lu K, Wang X (2016) Surveying concurrency bug detectors based on types of detected bugs. Sci China Inf Sci 60(3):031101

    Article  Google Scholar 

  29. Prvulovic M (2006) Cord: cost-effective (and nearly overhead-free) order-recording and data race detection. In HPCA. IEEE Computer Society, pp 232–243

  30. 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

  31. Mattern F (1989) Virtual time and global states of distributed systems. In: Proc. workshop on parallel and distributed algorithms

  32. 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

  33. 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

  34. Serebryany K, Iskhodzhanov T (2009) Threadsanitizer: data race detection in practice. ser. WBIA ’09. ACM

  35. Bond MD, Coons KE, McKinley KS (2010) Pacer: proportional detection of data races. ser. PLDI ’10. ACM

  36. Li D, Srisa-an W, Dwyer MB (2011) Sos: saving time in dynamic race detection with stationary analysis. ser. OOPSLA ’11. ACM

  37. Wester B, Devecsery D, Chen PM, Flinn J, Narayanasamy S (2013) Parallelizing data race detection. ser. ASPLOS ’13. ACM

  38. 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

    Article  Google Scholar 

  39. 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

    Article  Google Scholar 

  40. 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

  41. Burckhardt S, Kothari P, Musuvathi M, Nagarakatte S (2010) A randomized scheduler with probabilistic guarantees of finding bugs. ser. ASPLOS XV. ACM

  42. Nagarakatte S, Burckhardt S, Martin MM, Musuvathi M (2012) Multicore acceleration of priority-based schedulers for concurrency bug detection. ser. PLDI ’12. ACM

  43. 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

  44. Yu J, Narayanasamy S, Pereira C, Pokam G (2012) Maple: a coverage-driven testing tool for multithreaded programs. ser. OOPSLA ’12. ACM

  45. 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

Download references

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

Authors

Corresponding author

Correspondence to Deqing Zou.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11227-018-2307-8

Keywords

Navigation