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 条
  • [1] AdaptiveLock: Efficient Hybrid Data Race Detection Based on Real-World Locking Patterns
    Yu, Misun
    Lee, Joon-Sang
    Bae, Doo-Hwan
    INTERNATIONAL JOURNAL OF PARALLEL PROGRAMMING, 2019, 47 (5-6) : 805 - 837
  • [2] AdaptiveLock: Efficient Hybrid Data Race Detection Based on Real-World Locking Patterns
    Misun Yu
    Joon-Sang Lee
    Doo-Hwan Bae
    International Journal of Parallel Programming, 2019, 47 : 805 - 837
  • [3] DroidScreening: a practical framework for real-world Android malware analysis
    Yu, Junfeng
    Huang, Qingfeng
    Yian, CheeHoo
    SECURITY AND COMMUNICATION NETWORKS, 2016, 9 (11) : 1435 - 1449
  • [4] CITRUS: Automated Unit Testing Tool for Real-world C plus plus Programs
    Herlim, Robert Sebastian
    Kim, Yunho
    Kim, Moonzoo
    2022 IEEE 15TH INTERNATIONAL CONFERENCE ON SOFTWARE TESTING, VERIFICATION AND VALIDATION (ICST 2022), 2022, : 400 - 410
  • [5] Large-Scale Analysis on Anti-Analysis Techniques in Real-World Malware
    Kim, Minho
    Cho, Haehyun
    Yi, Jeong Hyun
    IEEE ACCESS, 2022, 10 : 75802 - 75815
  • [6] RaceChecker: Efficient Identification of Harmful Data Races
    Lu, Kai
    Wu, Zhendong
    Wang, Xiaoping
    Chen, Chen
    Zhou, Xu
    23RD EUROMICRO INTERNATIONAL CONFERENCE ON PARALLEL, DISTRIBUTED, AND NETWORK-BASED PROCESSING (PDP 2015), 2015, : 78 - 85
  • [7] RaceTracker:Effective and Efficient Detection of Data Races
    Yang, Zhen
    Yu, Zhen
    Su, Xiaohong
    Ma, Peijun
    2016 17TH IEEE/ACIS INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, ARTIFICIAL INTELLIGENCE, NETWORKING AND PARALLEL/DISTRIBUTED COMPUTING (SNPD), 2016, : 293 - 300
  • [8] ACCULOCK: accurate and efficient detection of data races
    Xie, Xinwei
    Xue, Jingling
    Zhang, Jie
    SOFTWARE-PRACTICE & EXPERIENCE, 2013, 43 (05) : 543 - 576
  • [9] JBench: A Dataset of Data Races for Concurrency Testing
    Cao, Jian
    Yang, Xin
    Jiang, Yu
    Liu, Han
    Ying, Weiliang
    Zhang, Xian
    2018 IEEE/ACM 15TH INTERNATIONAL CONFERENCE ON MINING SOFTWARE REPOSITORIES (MSR), 2018, : 6 - 9
  • [10] Predicting and Witnessing Data Races Using CSP
    Carril, Luis M.
    Tichy, Walter F.
    NASA FORMAL METHODS (NFM 2015), 2015, 9058 : 400 - 407