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 条
  • [31] HistLock: Efficient and Sound Hybrid Detection of Hidden Predictive Data Races with Functional Contexts
    Yang, Jialin
    Yang, Chunbai
    Chan, W. K.
    2016 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE QUALITY, RELIABILITY AND SECURITY (QRS 2016), 2016, : 13 - 24
  • [32] Detecting Data Races in Android Applications Based on Shared Variable Analysis and Constraint Solver
    Sun Q.
    Xu L.
    Xia X.-M.
    Zhang W.-F.
    Ruan Jian Xue Bao/Journal of Software, 2019, 30 (11): : 3281 - 3296
  • [33] GMRace: Detecting Data Races in GPU Programs via a Low-Overhead Scheme
    Zheng, Mai
    Ravi, Vignesh T.
    Qin, Feng
    Agrawal, Gagan
    IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, 2014, 25 (01) : 104 - 115
  • [34] Tracking repolarization dynamics in real-life data
    Shusterman, V
    Goldberg, A
    JOURNAL OF ELECTROCARDIOLOGY, 2004, 37 : 180 - 186
  • [35] An Empirical Study of Data Race Detector Tools
    Alowibdi, Jalal S.
    Stenneth, Leon
    2013 25TH CHINESE CONTROL AND DECISION CONFERENCE (CCDC), 2013, : 3951 - 3955
  • [36] The Energy Retrofit Impact in Public Buildings: A Numerical Cross-Check Supported by Real Consumption Data
    Ballerini, Vincenzo
    Lubowicka, Bernadetta
    Valdiserri, Paolo
    Krawczyk, Dorota Anna
    Sadowska, Beata
    Klopotowski, Maciej
    di Schio, Eugenia Rossi
    ENERGIES, 2023, 16 (23)
  • [37] AI-Driven Virtual Sensors for Real-Time Dynamic Analysis of Mechanisms: A Feasibility Study
    Fabiocchi, Davide
    Giulietti, Nicola
    Carnevale, Marco
    Giberti, Hermes
    MACHINES, 2024, 12 (04)
  • [38] A Study on the Efficiency Aspect of Data Race Detection: A Compiler Optimization Level Perspective
    Jia, Changjiang
    Chan, W. K.
    2013 13TH INTERNATIONAL CONFERENCE ON QUALITY SOFTWARE (QSIC), 2013, : 35 - 44
  • [39] Flattened Data in Convolutional Neural Networks: Using Malware Detection as Case Study
    Yeh, Chih-Wei
    Yeh, Wan-Ting
    Hung, Shih-Hao
    Lin, Chih-Ta
    2016 RESEARCH IN ADAPTIVE AND CONVERGENT SYSTEMS, 2016, : 130 - 135
  • [40] Comprehensive study of the Beijing Daanshan rockslide based on real-time videos, field investigations, and numerical modeling
    Zhou, Shu
    Ouyang, Chaojun
    An, Huicong
    Jiang, Tianhai
    Xu, Qingsong
    LANDSLIDES, 2020, 17 (05) : 1217 - 1231