Skip to main content

XGBoost Dynamic Detection for Data Race in Multithreaded Programs

  • Conference paper
  • First Online:
Advances in Natural Computation, Fuzzy Systems and Knowledge Discovery (ICNC-FSKD 2021)

Abstract

Data race is the most widespread in concurrent program defects. Aiming at the problems of false positives, false negatives and high overheads in the process of data race detection. A multithreaded programs data race detection method based on the XGBoost model was proposed. The hybrid detection algorithm based on the sim-hb relationship of the thread segment and the lockset algorithm is used to detect data race, identify implicit synchronization pairs and perform instruction-level filtering, and extract instruction features to construct the XGBoost dynamic detection model. Designed and implemented the multithreaded programs data race detection tool XGRace, and performed data race detection on the classic multithreaded programs SPLASH-2 benchmark suite and Parsec benchmark program 3.0. The results show that: compared with Djit+, Eraser, Thread Sanitizer and AIRaceTest, XGrace has an average of 19.7% lower false negatives rate and 6.2% lower false positives rate, while the time and memory overhead are reduced by 34.1% and 29.8% respectively, which provides an effective and accurate data race detection method for multithreaded programs.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 219.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 279.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Su, X.H., Yu, Z., Wang, T.T.: A survey on exposing detecting and avoiding concurrency bugs. Chin. J. Comput. 38(11), 2215–2233 (2015)

    Google Scholar 

  2. Biswas, S., Cao, M., Zhang, M.: Lightweight data race detection for production runs. In: Proceedings of the 26th International Conference on Compiler Construction, pp. 11–21. ACM, New York (2017)

    Google Scholar 

  3. Sulzmann, M., Stadtmuller, K.: Efficient, near complete, and often sound hybrid dynamic data race prediction. In: Proceedings of the 17th International Conference on Managed Programming Languages and Runtimes, pp. 30–51. ACM, New York (2020)

    Google Scholar 

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

    Article  Google Scholar 

  5. Pozniansky, E., Schuster, A.: Efficient on-the-fly data race detection in multithreaded C++ programs. In: Proceedings of the Ninth ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pp. 179–190. ACM, New York (2003)

    Google Scholar 

  6. Serebryany, K., Iskhodzhanov, T.: ThreadSanitizer: data race detection in practice. In: Proceedings of the Workshop on Binary Instrumentation and Applications, pp. 62–71. ACM, New York (2009)

    Google Scholar 

  7. Guo, Y., Cao, Y., Yang, Z.: AtexRace: across thread and execution sampling for in-house race detection. In: Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering, pp. 315–325. ACM, New York (2017)

    Google Scholar 

  8. Sun, J Z., Yang, J W., Yang, Z J.: Random forest instruction level detection model for data race in multithreaded programs. J. Tsinghua Univ. (Sci. Technol.) 60(10), 804–813 (2020)

    Google Scholar 

  9. Chen, T., Guestrin, C.: XGBoost: a scalable tree boosting system. In: Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 785–794. ACM, New York (2016)

    Google Scholar 

  10. Jannesari, A., Tichy, W.F.: Library-independent data race detection. IEEE Trans. Parallel Distrib. Syst. 25(10), 2606–2616 (2014)

    Article  Google Scholar 

  11. Luk, C.K., Cohn, R., Muth, R.: Pin: building customized program analysis tools with dynamic instrumentation. ACM SIGPLAN Not. 40(6), 190–200 (2005)

    Article  Google Scholar 

  12. ARNAB DAS.arnabd88.[CP/DK] (2017). https://github.com/arnabd88

  13. Badr, M., Jerger, N E.: Fast and accurate performance analysis of synchronization. In: Proceedings of the 9th International Workshop on Programming Models and Applications for Multicores and Manycores, pp. 31–40. ACM, New York (2018)

    Google Scholar 

  14. Rauber, T., Runger, G., Stachowski, M.: Model-based optimization of the energy efficiency of multi-threaded applications. Sustain. Comput. Inform. Syst. 22(1), 44–61 (2019)

    Google Scholar 

Download references

Acknowledgment

This work was supported by the Key R&D Projects of Shaanxi Province (Grant No. 2020GY-010), the Postgraduate Innovation Fund Project of Xi’an University of Posts and Telecommunications (Grant No. CXJJLY2019072).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Lijia Shan .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Sun, J., Shan, L., Shu, X. (2022). XGBoost Dynamic Detection for Data Race in Multithreaded Programs. In: Xie, Q., Zhao, L., Li, K., Yadav, A., Wang, L. (eds) Advances in Natural Computation, Fuzzy Systems and Knowledge Discovery. ICNC-FSKD 2021. Lecture Notes on Data Engineering and Communications Technologies, vol 89. Springer, Cham. https://doi.org/10.1007/978-3-030-89698-0_128

Download citation

Publish with us

Policies and ethics