Who goes first? detecting go concurrency bugs via message reordering

Who goes first? detecting go concurrency bugs via message reordering
复制标题

DOI:
10.1145/3503222.3507753
复制
发表时间:
2022-02
期刊:
Proceedings of the 27th ACM International Conference on Architectural Support for Programming Languages and Operating Systems
影响因子:
--
通讯作者:
Ziheng Liu;Shi-Xiong Xia;Yu Liang;Linhai Song;Hong Hu
Ziheng Liu;Shi-Xiong Xia;Yu Liang;Linhai Song;Hong Hu
中科院分区:
其他
文献类型:
--
作者:
Ziheng Liu;Shi-Xiong Xia;Yu Liang;Linhai Song;Hong Hu

文献摘要

相似文献

GO是一种年轻的编程语言,该语言旨在构建安全有效的并发程序。它提供了goroutines,作为轻巧的线程和通道,用于互通信。鼓励程序员明确地通过渠道传递消息以连接Goroutines,以减少犯错错误并引入并发错误的机会。 GO是最受欢迎的编程语言之一,已经被用来在数据中心环境中构建许多关键的基础架构软件系统。但是,最近的一项研究表明,与渠道相关的并发错误在GO程序中仍然很常见,严重损害了程序的可靠性。本文介绍了GFUZZ,这是一种动态检测器,可以通过突变并发消息的处理顺序来有效地指出与通道相关的并发错误。我们分为三个步骤构建GFUZZ。我们首先采用有效的方法来识别并发消息,并转换程序以任何给定的顺序处理这些消息。然后,我们采用一种模糊的方法来生成新的处理订单,通过突变行使的订单并依靠执行反馈来优先考虑触发错误的订单。最后,我们设计了一个运行时消毒剂,以捕获GO运行时错过的触发错误。我们在包括Docker,Kubernetes和Grpc在内的七个流行的GO软件系统上评估了GFUZZ。 Gfuzz找到了184个以前未知的错误,并报告了数量可忽略的误报。程序员已经根据我们的报告确认了124个报告为真正的错误,其中67个已确认了67个报告。仔细检查GRPC检测到的并发错误显示了GFUZZ每个组件的有效性,并确认了组件的合理性。
Go is a young programming language invented to build safe and efficient concurrent programs. It provides goroutines as lightweight threads and channels for inter-goroutine communication. Programmers are encouraged to explicitly pass messages through channels to connect goroutines, with the purpose of reducing the chance of making programming mistakes and introducing concurrency bugs. Go is one of the most beloved programming languages and has already been used to build many critical infrastructure software systems in the data-center environment. However, a recent study shows that channel-related concurrency bugs are still common in Go programs, severely hurting the reliability of the programs. This paper presents GFuzz, a dynamic detector that can effectively pinpoint channel-related concurrency bugs by mutating the processing orders of concurrent messages. We build GFuzz in three steps. We first adopt an effective approach to identify concurrent messages and transform a program to process those messages in any given order. We then take a fuzzing approach to generate new processing orders by mutating exercised ones and rely on execution feedback to prioritize orders close to triggering bugs. Finally, we design a runtime sanitizer to capture triggered bugs that are missed by the Go runtime. We evaluate GFuzz on seven popular Go software systems, including Docker, Kubernetes, and gRPC. GFuzz finds 184 previously unknown bugs and reports a negligible number of false positives. Programmers have already confirmed 124 reports as real bugs and fixed 67 of them based on our reporting. A careful inspection of the detected concurrency bugs from gRPC shows the effectiveness of each component of GFuzz and confirms the components' rationality.