A Study of Real-World Data Races in Golang

被引:8
|
作者
Chabbi, Milind [1 ]
Ramanathan, Murali Krishna [1 ]
机构
[1] Uber Technol Inc, Programming Syst Grp, Sunnyvale, CA 94086 USA
来源
PROCEEDINGS OF THE 43RD ACM SIGPLAN INTERNATIONAL CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION (PLDI '22) | 2022年
关键词
Data race; Golang; Dynamic analysis;
D O I
10.1145/3519939.3523720
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
The concurrent programming literature is rich with tools and techniques for data race detection. Less, however, has been known about real-world, industry-scale deployment, experience, and insights about data races. Golang (Go for short) is a modern programming language that makes concurrency a first-class citizen. Go offers both message passing and shared memory for communicating among concurrent threads. Go is gaining popularity in modern microservice-based systems. Data races in Go stand in the face of its emerging popularity. In this paper, using our industrial codebase as an example, we demonstrate that Go developers embrace concurrency and show how the abundance of concurrency alongside language idioms and nuances make Go programs highly susceptible to data races. Google's Go distribution ships with a built-in dynamic data race detector based on ThreadSanitizer. However, dynamic race detectors pose scalability and flakiness challenges; we discuss various software engineering trade-offs to make this detector work effectively at scale. We have deployed this detector in Uber's 46 million lines of Go codebase hosting 2100 distinct microservices, found over 2000 data races, and fixed over 1000 data races, spanning 790 distinct code patches submitted by 210 unique developers over a six-month period. Based on a detailed investigation of these data race patterns in Go, we make seven high-level observations relating to the complex interplay between the Go language paradigm and data races.
引用
收藏
页码:474 / 489
页数:16
相关论文
共 44 条
  • [21] Program Conversion for Detecting Data Races in Concurrent Interrupt Handlers
    Lee, Byoung-Kwi
    Kang, Mun-Hye
    Park, Kyoung Choon
    Yi, Jin Seob
    Yang, Sang Woo
    Jun, Yong-Kee
    SOFTWARE ENGINEERING, BUSINESS CONTINUITY, AND EDUCATION, 2011, 257 : 407 - +
  • [22] Dynamic Analysis of the Effect of the Device-to-Device Variability of Real-World Memristors on the Implementation of Uncoupled Memristive Cellular Nonlinear Networks
    Wang, Yongmin
    Schnieders, Kristoffer
    Ntinas, Vasileios
    Ascoli, Alon
    Cueppers, Felix
    Hoffmann-Eifert, Susanne
    Wiefels, Stefan
    Tetzlaff, Ronald
    Rana, Vikas
    Menzel, Stephan
    IEEE TRANSACTIONS ON NANOTECHNOLOGY, 2025, 24 : 121 - 128
  • [23] Detecting Data Races in OpenMP with Deep Learning and Large Language Models
    Alsofyani, May
    Wang, Liqiang
    53RD INTERNATIONAL CONFERENCE ON PARALLEL PROCESSING, ICPP 2024, 2024, : 96 - 103
  • [24] Test-Driven Repair of Data Races in Structured Parallel Programs
    Surendran, Rishi
    Raman, Raghavan
    Chaudhuri, Swarat
    Mellor-Crummey, John
    Sarkar, Vivek
    ACM SIGPLAN NOTICES, 2014, 49 (06) : 15 - 25
  • [25] Understanding and identifying latent data races cross-thread interleaving
    Long Zheng
    Xiaofei Liao
    Song Wu
    Xuepeng Fan
    Hai Jin
    Frontiers of Computer Science, 2015, 9 : 524 - 539
  • [26] Understanding and identifying latent data races cross-thread interleaving
    Zheng, Long
    Liao, Xiaofei
    Wu, Song
    Fan, Xuepeng
    Jin, Hai
    FRONTIERS OF COMPUTER SCIENCE, 2015, 9 (04) : 524 - 539
  • [27] Detecting Data Races Caused by Inconsistent Lock Protection in Device Drivers
    Chen, Qiu-Liang
    Bai, Jia-Ju
    Jiang, Zu-Ming
    Lawall, Julia
    Hu, Shi-Min
    2019 IEEE 26TH INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION AND REENGINEERING (SANER), 2019, : 366 - 376
  • [28] Low-Level Detection of Language-Level Data Races with LARD
    Wood, Benjamin P.
    Ceze, Luis
    Grossman, Dan
    ACM SIGPLAN NOTICES, 2014, 49 (04) : 671 - 685
  • [29] GRace: A Low-Overhead Mechanism for Detecting Data Races in GPU Programs
    Zheng, Mai
    Ravi, Vignesh T.
    Qin, Feng
    Agrawal, Gagan
    ACM SIGPLAN NOTICES, 2011, 46 (08) : 135 - 145
  • [30] Leveraging the Dynamic Program Structure Tree to Detect Data Races in OpenMP Programs
    Yu, Lechen
    Jin, Feiyang
    Protze, Joachim
    Sarkar, Vivek
    2022 IEEE/ACM SIXTH INTERNATIONAL WORKSHOP ON SOFTWARE CORRECTNESS FOR HPC APPLICATIONS (CORRECTNESS), 2022, : 54 - 62