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.
翻译:戈兰格( 简称Go for short) 在建立分布式系统中的货币方案时已变得流行。 作为独特的特征, Go 使用轻量的Goroutine 支持用户空间的高度平行化。 此外, Go 利用渠道使线条之间能够进行明确沟通。 但是, 最近的研究显示, Go 应用程序中, 共通错误并不罕见。 在真实的 Go 应用程序中点出这些共通货币错误既重要又具有挑战性。 现有方法大多基于编译者辅助的静态或动态分析, 具有两个限制。 首先, 现有方法需要源码的可用性和再校准, 而源码在测试而不是生产环境中运行良好, 没有为应用程序和外部图书馆提供源码。 其次, 现有方法只用于纯的 Go 代码基础, 而不是与 Go 和其他语言混合的程序。 为了解决这些限制, 我们开发BinGo, 第一个工具在 Go 应用程序中识别共通错误, 与 Go Semal 运行一个在实际生产环境中运行的自动修正 。