arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~

KernelDiag:基于代理的内核崩溃根本原因诊断

KernelDiag: Agent-Based Root Cause Diagnosis for Kernel Crashes

Weijing Wang, Zan Wang, Dong Wang, Haichi Wang, Junjie Chen

arXiv 2607.17722首次发表:更新:

AI 中文总结

针对Linux内核崩溃根本原因诊断难的问题,提出KernelDiag框架,通过日志到代码映射及专门代理进行结构化因果推理,在KGYM基准测试中表现出色,优于现有方法,为自动内核根本原因诊断奠定基础。

AI 中文摘要

Linux内核是最复杂的软件系统之一,自动模糊测试不断暴露出数千次崩溃,但根本原因诊断仍是手动且耗时的瓶颈。现有的基于大语言模型的根本原因分析(RCA)技术不适用于内核调试。为此提出KernelDiag,通过结构化因果推理进行内核根本原因诊断。先通过日志到代码映射对齐异构诊断工件,再用专门代理迭代推理源级程序语义和特定崩溃的内核配置,将因果依赖组织成证据图,实现故障方法定位和因果解释。在KGYM基准测试中,KernelDiag在文件和方法级别均优于现有方法,能生成准确、连贯且可操作的诊断解释,为自动内核根本原因诊断奠定基础。

英文摘要

The Linux kernel is one of the most complex software systems, where automated fuzzing continuously exposes thousands of crashes, yet root-cause diagnosis remains a manual and time-consuming bottleneck. Existing LLM-based root cause analysis (RCA) techniques, effective for distributed systems, do not readily generalize to kernel debugging due to sparse low-level artifacts, heterogeneous diagnostic evidence (e.g., syscalls, logs, and crash reports), and complex non-linear fault propagation that demands fine-grained method-level reasoning. To address these challenges, we propose KernelDiag, an agent-based framework for kernel root-cause diagnosis via structured causal reasoning. KernelDiag first aligns heterogeneous diagnostic artifacts through log-to-code mapping, and then employs artifact-specialized agents to iteratively reason over source-level program semantics and crash-specific kernel configurations. The inferred causal dependencies are incrementally organized into structured Evidence Graphs, enabling accurate faulty-method localization and causal explanations. We evaluate KernelDiag on the real-world KGYM benchmark. KernelDiag consistently outperforms state-of-the-art localization approaches at both file and method levels, achieving significant improvements in Top@k accuracy, including up to 4x and 2x gains in challenging settings without explicit hints. Furthermore, both human and LLM-assisted evaluations show that KernelDiag generates accurate, coherent, and actionable diagnostic explanations. Overall, this work lays the foundation for automated kernel root-cause diagnosis by bridging low-level diagnostic evidence with source-level causal reasoning.

论文原文

arXiv 摘要页 · PDF 原文 · HTML 原文

↑