一句话:COCA 从代码中抽取诊断线索并结合历史问题报告构造提示,让 LLM 在缺乏监控数据时也能定位与总结根因。
现代分布式系统运行期故障频发,用户通常通过 GitHub、JIRA 等平台提交问题报告请求协助,自动定位根因对保障可靠性与可用性至关重要。然而现有自动根因分析(RCA)方法高度依赖完整的运行时监控数据,而问题平台往往并不具备这些数据;近期基于大语言模型(LLM)的方法虽能直接分析问题报告,却受限于用户描述的不完整与歧义。本文提出 COCA,一种代码知识增强的根因分析方法:它以问题报告中的数据为线索,智能抽取相关代码片段并重建执行路径,从而补全执行上下文;随后将历史问题报告与剖析得到的代码知识组合成提示,驱动 LLM 生成详细的根因总结并定位责任组件。作者在来自五个真实分布式系统的数据集上评估,COCA 显著优于已有方法,根因定位提升 28.3%,根因总结提升 22.0%,且在不同 LLM 上表现一致,显示出良好的泛化能力。
Runtime failures are commonplace in modern distributed systems. When such issues arise, users often turn to platforms such as Github or JIRA to report them and request assistance. Automatically identifying the root cause of these failures is critical for ensuring high reliability and availability. However, prevailing automatic root cause analysis (RCA) approaches rely significantly on comprehensive runtime monitoring data, which is often not fully available in issue platforms. Recent methods leverage large language models (LLMs) to analyze issue reports, but their effectiveness is limited by incomplete or ambiguous user-provided information. To obtain more accurate and comprehensive RCA results, the core idea of this work is to extract additional diagnostic clues from code to supplement data-limited issue reports. Specifically, we propose COCA, a code knowledge enhanced root cause analysis approach for issue reports. Based on the data within issue reports, COCA intelligently extracts relevant code snippets and reconstructs execution paths, providing a comprehensive execution context for further RCA. Subsequently, COCA constructs a prompt combining historical issue reports along with profiled code knowledge, enabling the LLMs to generate detailed root cause summaries and localize responsible components. Our evaluation on datasets from five real-world distributed systems demonstrates that COCA significantly outperforms existing methods, achieving a$\mathbf{2 8. 3 \%}$improvement in root cause localization and a 22.0 % improvement in root cause summarization. Furthermore, COCA's performance consistency across various LLMs underscores its robust generalizability.
DOI 原文 ·
@inproceedings{paperbot8848,
title = {COCA: Generative Root Cause Analysis for Distributed Systems with Code Knowledge},
author = {Yichen Li and Yulun Wu and Jinyang Liu and Zhihan Jiang and Zhuangbin Chen and Guangba Yu and Michael R. Lyu},
booktitle = {ICSE},
year = {2025},
doi = {10.1109/icse55347.2025.00234}
}