BinGo:通过二进制分析精确定位Go中的并发错误
BinGo: Pinpointing Concurrency Bugs in Go via Binary Analysis
摘要:
Golang(也简称Go)在分布式系统中构建并发程序方面已经变得很流行。作为Go语言独有的特性,Go语言使用轻量级的Goroutines来支持用户空间的高度并行性。此外,Go利用通道来实现线程之间的显式通信。然而,最近的研究表明,并发错误在Go应用程序中并不罕见。在真正的Go应用程序中精确定位这些并发错误既重要又具有挑战性。现有的方法大多是基于编译器辅助的静态或动态分析,这有两个局限性。首先,现有的方法需要源代码的可用性和重新编译,这在测试而不是生产环境中工作得很好,没有源代码可用于应用程序和外部库。其次,现有的方法只能在纯Go代码库上工作,而不是与Go和其他语言混合的程序。为了解决这些限制,我们开发了BinGo,这是第一个通过动态二进制分析来识别Go应用程序中并发错误的工具。BinGo将二进制执行与Go语义相关联,并采用新的错误检测算法。BinGo是一个端到端的工具,可以在生产环境中部署,无需修改Go生态系统中的源代码,编译器和运行时。我们的实验表明,BinGo对并发错误的覆盖率很高,没有误报。我们能够使用BinGo来识别实际应用程序中的并发错误,开销适中。
英文摘要:
Golang (also known as Go for short) has become popular in building concurrency programs in distributed systems. As the unique features, Go employs lightweight Goroutines to support highly parallelism in user space. Moreover, Go leverages channels to enable explicit communication among threads. However, recent studies show that concurrency bugs are not uncommon in Go applications. Pinpointing these concurrency bugs in real Go applications is both important and challenging. Existing approaches are mostly based on compiler-aided static or dynamic analysis, which have two limitations. First, existing approaches require the availability and recompilation of the source code, which work well on testing rather than production environments with no source code available for both applications and external libraries. Second, existing approaches work on pure Go code bases only, not programs mixed with Go and other languages. To address these limitations, we develop BinGo, the first tool to identify concurrency bugs in Go applications via dynamic binary analysis. BinGo correlates binary execution with Go semantics and employs novel bug detection algorithms. BinGo is an end-to-end tool that is ready for deployment in the production environment with no modification on source code, compilers, and runtimes in the Go eco-system. Our experiments show that BinGo has a high coverage of concurrency bugs with no false positives. We are able to use BinGo to identify concurrency bugs in real applications with moderate overhead.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。