Understanding and Evaluating Dynamic Race Detection with Go
Abstract
With the prevalence of concurrent software and the difficulties that come with properly synchronizing threads, it is easy to introduce data races into programs. A data race is a software bug which occurs when at least two threads simultaneously access shared memory, with at least one of them performing a write. Because of the indeterministic nature of thread scheduling, data races lead to undefined behavior which may only manifest in rare thread schedules. The difficulty lies in detecting hidden data races based on observed program executions. Go (Golang) is a modern, open source programming language designed for simplicity, efficiency, and reliability. With the introduction of Goroutines and other primitives, Go enables quick development of highly concurrent software. However, this model makes it necessary to apply race detection to programs written in Go. We present an in-depth study of the Go race detector, a dynamic analysis tool developed by Google. The Go race detector traces program events and provides detailed information regarding detected races. Furthermore, we evaluate the race detector on Kubernetes, the most popular open source project written in Go.
Subject
Data Race DetectionDynamic Analysis
Go
Golang
ThreadSanitizer
Concurrency
Redundancy
Compiler Instrumentation
Citation
Chin, Andrew H (2020). Understanding and Evaluating Dynamic Race Detection with Go. Undergraduate Research Scholars Program. Available electronically from https : / /hdl .handle .net /1969 .1 /188457.