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.
翻译:同步编程文献丰富了用于数据种族探测的工具和技术。然而,在本文中,我们以工业代码库为例,展示了Go的开发者们喜欢同流合污、行业规模部署、经验和数据种族的洞察力。Golang(短短短)是一种现代编程语言,使高地成为一流公民。Go既提供传递信息的信息,又提供共享记忆的记忆,供同时线之间的交流。Go在现代微观服务系统中越来越受欢迎。Go的数据竞赛在面对其新兴的受欢迎程度时站立起来。在本文中,我们以工业代码库为例,展示了Go的开发者们喜欢共4 600万条Go 代码库,并展示了与语言的异质和细微点和细微点之间的大量调使Go方案极易受数据竞赛的影响。Google的配送船与基于TreadSreadSanitizer的内动态数据竞赛探测器。但是,动态种族探测器在现代系统上提出了各种软件工程交换权取价交换。我们在2000年的7月7级数据竞赛和1100多级数据库之间,在1 000个不同的数据库上,我们提交了一套不同的数据竞赛调查。