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 条
  • [41] Performance Evaluation of Data Race Detection Based on Thread Sharing Analysis With Different Granularities: An Empirical Study
    Bo, Lili
    Jiang, Shujuan
    Qian, Junyan
    Wang, Rongcun
    Yao, Yafei
    IEEE ACCESS, 2019, 7 : 73819 - 73829
  • [42] Real time RBS study of Cu-Sn alloy thermal oxidation by means of a 4He2+ external micro-beam
    Mathis, F
    Salomon, J
    Moignard, B
    Pichon, L
    Aucouturier, M
    Dran, JC
    NUCLEAR INSTRUMENTS & METHODS IN PHYSICS RESEARCH SECTION B-BEAM INTERACTIONS WITH MATERIALS AND ATOMS, 2004, 226 (1-2) : 147 - 152
  • [43] Data-Based RC Dynamic Modelling Incorporating Physical Criteria to Obtain the HLC of In-Use Buildings: Application to a Case Study
    Paola Diaz-Hernandez, Heidi
    Rene Torres-Hernandez, Pablo
    Maria Aguilar-Castro, Karla
    Vicente Macias-Melo, Edgar
    Jose Jimenez, Maria
    ENERGIES, 2020, 13 (02)
  • [44] Strategies for processing mega-pixel X-ray fluorescence hyperspectral data: a case study on a version of Caravaggio's painting Supper at Emmaus
    Alfeld, Matthias
    Janssens, Koen
    JOURNAL OF ANALYTICAL ATOMIC SPECTROMETRY, 2015, 30 (03) : 777 - 789