Advertisement

The Journal of Supercomputing

, Volume 74, Issue 6, pp 2684–2704 | Cite as

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

  • Peng Luo
  • Deqing Zou
  • Hai Jin
  • Yajuan Du
  • Long Zheng
  • Jinan Shen
Article
  • 98 Downloads

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.

Keywords

Race detection Dynamic technique Data structure Causal relation 

Notes

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.

References

  1. 1.
    Netzer RHB, Miller BP (1992) What are race conditions?: Some issues and formalizations. ACM Lett Program Lang Syst 1(1):74–88CrossRefGoogle Scholar
  2. 2.
  3. 3.
    Leveson N, Turner C (1993) An investigation of the therac-25 accidents. Computer 26(7):18–41CrossRefGoogle Scholar
  4. 4.
    SecurityFocus, Software bug contributed to blackout. http://www.securityfocus.com/news/8016
  5. 5.
    Lamport L (1978) Time, clocks, and the ordering of events in a distributed system. Commun ACM 21(7):558–565CrossRefzbMATHGoogle Scholar
  6. 6.
    Flanagan C, Freund SN (2009) Fasttrack: efficient and precise dynamic race detection. ser. PLDI ’09. ACM, pp 121–133Google Scholar
  7. 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–340CrossRefGoogle Scholar
  8. 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–203CrossRefGoogle Scholar
  9. 9.
    Ronsse M, De Bosschere K (1999) Recplay: a fully integrated practical record/replay system. ACM Trans Comput Syst 17(2):133–152CrossRefGoogle Scholar
  10. 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–530CrossRefGoogle Scholar
  11. 11.
    Smaragdakis Y, Evans J, Sadowski C, Yi J, Flanagan C (2012) Sound predictive race detection in polynomial time. In: Proc. of POPL. ACMGoogle Scholar
  12. 12.
    Huang J, Meredith PO, Rosu G (2014) Maximal sound predictive race detection with control flow abstraction. ser. PLDI ’14Google Scholar
  13. 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. ACMGoogle Scholar
  14. 14.
    Elmas T, Burnim J, Necula G, Sen K (2013) Concurrit: a domain specific language for reproducing concurrency bugs. ser. PLDI ’13. ACMGoogle Scholar
  15. 15.
    Yang Y (2009) Efficient dynamic verification of concurrent programs. Ph.D. dissertationGoogle Scholar
  16. 16.
  17. 17.
  18. 18.
  19. 19.
    Grossman D (2003) Type-safe multithreading in cyclone. ser. TLDI ’03. ACMGoogle Scholar
  20. 20.
    Pratikakis P, Foster JS, Hicks M (2006) Locksmith: context-sensitive correlation analysis for race detection. ser. PLDI ’06. ACMGoogle Scholar
  21. 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–255CrossRefGoogle Scholar
  22. 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. ACMGoogle Scholar
  23. 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. ACMGoogle Scholar
  24. 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–239Google Scholar
  25. 25.
    Voung JW, Jhala R, Lerner S (2007) Relay: static race detection on millions of lines of code. ser. ESEC-FSE ’07. ACMGoogle Scholar
  26. 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. ACMGoogle Scholar
  27. 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. ACMGoogle Scholar
  28. 28.
    Wu Z, Lu K, Wang X (2016) Surveying concurrency bug detectors based on types of detected bugs. Sci China Inf Sci 60(3):031101CrossRefGoogle Scholar
  29. 29.
    Prvulovic M (2006) Cord: cost-effective (and nearly overhead-free) order-recording and data race detection. In HPCA. IEEE Computer Society, pp 232–243Google Scholar
  30. 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–315Google Scholar
  31. 31.
    Mattern F (1989) Virtual time and global states of distributed systems. In: Proc. workshop on parallel and distributed algorithmsGoogle Scholar
  32. 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–178Google Scholar
  33. 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–154Google Scholar
  34. 34.
    Serebryany K, Iskhodzhanov T (2009) Threadsanitizer: data race detection in practice. ser. WBIA ’09. ACMGoogle Scholar
  35. 35.
    Bond MD, Coons KE, McKinley KS (2010) Pacer: proportional detection of data races. ser. PLDI ’10. ACMGoogle Scholar
  36. 36.
    Li D, Srisa-an W, Dwyer MB (2011) Sos: saving time in dynamic race detection with stationary analysis. ser. OOPSLA ’11. ACMGoogle Scholar
  37. 37.
    Wester B, Devecsery D, Chen PM, Flinn J, Narayanasamy S (2013) Parallelizing data race detection. ser. ASPLOS ’13. ACMGoogle Scholar
  38. 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–1659CrossRefGoogle Scholar
  39. 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–175CrossRefGoogle Scholar
  40. 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. ACMGoogle Scholar
  41. 41.
    Burckhardt S, Kothari P, Musuvathi M, Nagarakatte S (2010) A randomized scheduler with probabilistic guarantees of finding bugs. ser. ASPLOS XV. ACMGoogle Scholar
  42. 42.
    Nagarakatte S, Burckhardt S, Martin MM, Musuvathi M (2012) Multicore acceleration of priority-based schedulers for concurrency bug detection. ser. PLDI ’12. ACMGoogle Scholar
  43. 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. ACMGoogle Scholar
  44. 44.
    Yu J, Narayanasamy S, Pereira C, Pokam G (2012) Maple: a coverage-driven testing tool for multithreaded programs. ser. OOPSLA ’12. ACMGoogle Scholar
  45. 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–384Google Scholar

Copyright information

© Springer Science+Business Media, LLC, part of Springer Nature 2018

Authors and Affiliations

  • Peng Luo
    • 1
  • Deqing Zou
    • 1
  • Hai Jin
    • 1
  • Yajuan Du
    • 1
  • Long Zheng
    • 1
  • Jinan Shen
    • 1
  1. 1.Cluster and Grid Computing Lab, Services Computing Technology and System LabHuazhong University of Science and TechnologyWuhanChina

Personalised recommendations