← Latest papers
💻 computer science

KernelDiag: Agent-Based Root Cause Diagnosis for Kernel Crashes

KernelDiag is an agent-based framework that automates Linux kernel root-cause diagnosis by aligning heterogeneous diagnostic artifacts with source code and employing specialized agents to construct structured Evidence Graphs, thereby significantly outperforming existing methods in accurately localizing faults and generating actionable explanations.

Original authors: Weijing Wang, Zan Wang, Dong Wang, Haichi Wang, Junjie Chen

Published 2026-07-21
📖 5 min read🧠 Deep dive

Original authors: Weijing Wang, Zan Wang, Dong Wang, Haichi Wang, Junjie Chen

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine the Linux kernel as the invisible, super-complex engine room of the entire digital world. It's the massive, ancient code that powers everything from your smartphone to the servers running the internet. Keeping this engine running smoothly is a nightmare for human engineers because it's so huge and intricate that when it breaks, the clues are scattered, confusing, and often hidden deep inside layers of machinery. This is the field of "root cause diagnosis"—the detective work of figuring out exactly why a system crashed and how the problem started. Usually, when a computer crashes, it leaves behind a messy pile of evidence: a scary error message, a log of what happened just before the crash, and a record of the commands that triggered it. For a human, piecing these together is like trying to solve a jigsaw puzzle where half the pieces are from a different box, written in a foreign language, and the picture on the box is missing.

Recently, scientists have started using "Large Language Models" (LLMs)—super-smart AI chatbots trained on mountains of text—to help solve these mysteries. Think of these AIs as brilliant detectives who can read millions of manuals and instantly spot patterns. However, most of these AI detectives are trained on simpler crimes, like why a website is slow or why a cloud service hiccuped. They aren't great at the Linux kernel's specific brand of chaos, where the clues are sparse, the language is low-level, and the cause of a crash might be miles away from where the crash actually happened. This paper introduces a new, specialized AI detective team called KernelDiag designed specifically to crack these tough kernel cases.

The researchers behind KernelDiag realized that the old way of doing things—just looking at the crash report and guessing—wasn't working well enough. They found that existing AI tools often get stuck because they don't know how to connect the dots between different types of clues. To fix this, they built a system where the AI doesn't just read; it acts. They created a team of specialized "agents," each with a specific job. One agent is a "Syscall Detective" who looks at the commands sent to the computer. Another is a "Log Analyst" who scans the messy runtime notes. A third is a "Crash Reporter" who studies the final error message. Instead of one big brain trying to do everything at once, these agents work together, talking to each other and digging into the actual source code of the Linux kernel to find the truth.

The magic of KernelDiag lies in how these agents talk. They don't just write a summary; they build a "Evidence Graph." Imagine this as a dynamic map where every clue is a dot, and the lines connecting them show how one problem led to another. If a command triggers a log entry, which then causes a code function to fail, the agents draw a line connecting them. This helps them trace the "fault propagation"—the path the error took as it traveled through the system. The system also uses special tools to translate the messy logs into exact lines of code, ensuring the AI isn't just guessing but is actually pointing to the specific function in the code that went wrong.

When the researchers tested KernelDiag on a real-world dataset of 279 Linux kernel crashes (a benchmark called KGYM), the results were impressive. In the hardest cases, where the crash report gave no obvious hints about what went wrong, KernelDiag was a game-changer. It managed to find the correct file causing the crash 31.43% of the time on the very first try, while the next best methods failed completely (0%). When looking for the specific line of code (the method), KernelDiag found the culprit in the top 10 guesses 34.78% of the time, which was nearly double the performance of the previous best tools. Even in easier cases where hints were available, KernelDiag still outperformed everyone else, getting the file right 65.95% of the time on the first try.

Beyond just finding the bug, the team checked if the AI could explain why it was a bug. They asked both human experts and another AI to grade the explanations. KernelDiag consistently scored higher than the competition, providing explanations that were not only accurate but also actionable—meaning a human developer could actually use the explanation to fix the problem. The researchers also tested the system on brand-new crashes that happened after the AI was trained, proving that it wasn't just memorizing old answers but was actually learning how to reason through new problems.

The paper suggests that this approach of using specialized agents to build structured maps of evidence is the key to unlocking automated diagnosis for complex systems like the Linux kernel. While the system isn't perfect—it still struggles with some very rare, complex memory errors—it represents a significant step forward. The authors show that by breaking the problem down into smaller, specialized tasks and forcing the AI to build a logical map of cause-and-effect, we can move from "guessing" to "knowing" when our digital engines break. This work lays the foundation for a future where computers can help us debug their own deepest, most complex failures, saving engineers countless hours of frustration.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →