一句话:提出利用垃圾回收标记阶段动态检测并自动恢复消息传递程序中的部分死锁,以缓解内存泄漏。
并发消息传递程序中的部分死锁会导致长期运行系统内存泄漏,Go 因支持消息传递且易于创建轻量并发而尤其易受影响。论文提出一种动态技术:在垃圾回收器的标记阶段可靠地近似程序活性,从而检测部分死锁,并自动修复、减轻其对内存的影响。作者将该方法实现为 Go 运行时垃圾回收器扩展 GOLF,并在微基准、大规模工业代码库测试套件与 Uber 真实服务上评估。初步结果显示,该方法在微基准和大规模工业代码库测试套件中分别检测出 94% 与 50% 的部分死锁;在 Uber 服务 24 小时部署中检测到 252 个由三个编程错误导致的部分死锁。
A challenge of writing concurrent message-passing programs is ensuring the absence of partial deadlocks, which can cause severe memory leaks in long-running systems. The Go programming language is particularly susceptible to this problem due to its support of message passing and ease of lightweight concurrency creation. We propose a novel dynamic technique to detect partial deadlocks by soundly approximating liveness using the garbage collector's marking phase. The approach allows systems to not only detect, but also automatically redress partial deadlocks and alleviate their impact on memory. We implement the approach in the tool GOLF, as an extension to the garbage collector of the Go runtime system and evaluate its effectiveness in a series of experiments. Preliminary results show that the approach is effective at detecting 94% and 50% of partial deadlocks in a series of microbenchmarks and the test suites of a large-scale industrial codebase, respectively. Furthermore, we deployed golf on a real service used by Uber, and over a period of 24 hours, effectively detected 252 partial deadlocks caused by three programming errors.
@inproceedings{SaiocLMC25,
title = {Dynamic Partial Deadlock Detection and Recovery via Garbage Collection},
author = {Georgian-Vlad Saioc and I-Ting Angelina Lee and Anders Møller and Milind Chabbi},
booktitle = {ASPLOS},
year = {2025},
doi = {10.1145/3676641.3715990}
}