- Blog Author: Krishnamurthy Mayya, Aria Networks
- Project team: Krishnamurthy Mayya and Sudharshan Suresh, Aria Networks
- 2026 SONiC Hackathon winning category: AI + Debugging & Root-Causing Test Failures
The 2026 SONiC Hackathon brought together 32 teams from 13 organizations. Krishnamurthy Mayya and Sudharshan Suresh of Aria Networks won the AI + Debugging & Root-Causing Test Failures category with sonic-rca, a tool that helps engineers pinpoint where a failure occurred using evidence from a SONiC techsupport dump.
Introduction
Every SONiC operator knows the moment: a switch misbehaves, the only artifact anyone can hand you is a techsupport.tar.gz, and the clock is running. Inside that archive are redis snapshots, syslog, daemon logs and SAI recordings that together describe exactly what went wrong, but reading them well takes a rare combination of SONiC internals knowledge and patience, and the engineers who have both are already oversubscribed. The result is that root-cause analysis of techsupport dumps remains slow, manual and dependent on a handful of people.
During the 2026 SONiC Hackathon we built sonic-rca, an open, fully offline toolchain that turns a saved techsupport.tar.gz into a root-cause verdict in which every conclusion cites the exact redis key, log line or SAI record that supports it.
The tool works in two layers. A deterministic engine indexes the archive, walks SONiC’s state pipeline (CONFIG_DB → APPL_DB → ASIC_DB → SAI, plus the FRR/BGP leg) with a set of YAML playbooks, and emits a machine-readable divergence report. On top of that, an optional MCP server lets any MCP-capable language model interpret the report, under one rule: no claim without an evidence id. You can use the CLI with no AI at all, or plug in whichever model you prefer and swap it later with a one-line configuration change.
Why it matters for the community: SONiC debugging knowledge today lives in a small number of experienced heads. sonic-rca encodes that walk as reviewable playbooks that anyone can read, extend and contribute to, and it was validated end to end on real captures from a live leaf-spine testbed rather than on synthetic data alone.
To see why an evidence trail matters, consider what an engineer has to reconstruct from a techsupport archive today.
The Problem We’re Solving
When a SONiC switch misbehaves, what you usually get is not access to the box but a techsupport tarball: redis database snapshots, syslog, daemon logs, sairedis.rec recordings and dozens of show outputs, all in one archive. Turning that archive into a root cause means answering a single question, where did operator intent stop matching reality?, and answering it means walking four layers by hand.
| Layer | What it holds | Who writes it |
|---|---|---|
| CONFIG_DB | Operator intent | config load, CLI, orchestration |
| APPL_DB | Processed intent | *mgrd daemons (portmgrd, vlanmgrd, …) and fpmsyncd for routes |
| ASIC_DB | What was asked of the hardware | orchagent → syncd |
| SAI / sairedis.rec | What the ASIC actually accepted | syncd via the SAI layer |
An expert finds the layer where an object is missing or wrong, then explains why from syslog, the SAI recording and container health. That walk is slow, undocumented outside people’s heads, and queues up on the same few engineers for three different workloads at once: operator triage, CI failure analysis and support escalations. Expertise does not scale.
The obvious shortcut, pasting the logs into a chatbot, fails for two reasons. The model has no structured view of the switch, so it cannot tell CONFIG_DB intent from ASIC_DB reality. And it has no obligation to cite evidence, so what comes back is a confident guess that an engineer then has to verify from scratch, which is the work they were trying to avoid. In our baseline benchmark, two capable models given the raw archive scored 1.25 and 1.50 out of 5 (see Impact and Benefits).
That gap shaped our design. We wanted the tool to follow the same trail an experienced engineer would and make each finding easy to verify.
Our Hackathon Solution
sonic-rca does the deterministic work first and lets the AI, if you use one at all, only interpret. The archive is the sole input: no switch access, no network, no telemetry. Four steps take it from tarball to verdict.
- Index the evidence. archive.py safely extracts the tarball, loads the DB snapshots and sweeps the gzipped logs; captures.py parses the vtysh text outputs into FRR_BGP, FRR_RIB and FRR_NHT tables; index.py gives every DB key, log line and SAI record a resolvable ev: id and records container health from docker.ps.
- Walk the pipeline. Thirteen YAML playbooks compare intent to reality layer by layer: CONFIG → APPL → ASIC, plus the FRR → APPL route leg. Fourteen key maps describe how one object (a port, a VLAN member, a route, a MAC, a BGP peer) is spelled at each layer, so a check can follow it across databases.
- Emit a divergence report. Each finding names the object, the expected and observed values, a suspected stage (the daemon where the trail breaks, such as portmgrd, bgp/frr or zebra/fpmsyncd) and the evidence ids behind it, as JSON and as a human-readable summary.
- Consume it your way. Read it with the CLI and no AI, or let a model explain it through the MCP server.

Figure 1. Deterministic analysis first; the AI only interprets. Both consumers read the same divergence report, and the contract everywhere is: no claim without an evidence id.
Once the archive is indexed, engineers can zoom in on an individual object or log entry, or start with a report across all the checks.
The toolbox: one archive, five ways in
| Command | What it does |
|---|---|
| sonic-rca report <tarball> | Runs all 13 checks and prints the cited verdict |
| sonic-rca trace <tarball> <key> | Follows one object layer by layer and shows exactly where it stops existing |
| sonic-rca logs <tarball> <regex> | Searches syslog and daemon logs; every hit carries an evidence id |
| sonic-rca serve | Starts the MCP server: 10 read-only tools for any MCP-capable model |
| sonic-rca bench <corpus> | Runs the scored tools-vs-baseline benchmark over a fault corpus |
In the demo, we use report to spot a mismatch and trace to see where it first appears in the pipeline.
What the demo shows
The demo video runs three reports and one trace against real captures. On the healthy capture the report is clean: No divergence found by enabled playbooks, 0 findings over 147 indexed evidence items. On a capture where the BGP peer was configured with the wrong ASN, the bgp.session check reports expected Established, observed Idle, suspects stage bgp/frr, and cites the CONFIG_DB intent, the FRR session state and the BGP OPEN receipt failed line in bgpd.log.

Figure 2. Terminal output from the demo (paths shortened). The healthy capture reports zero findings over 147 evidence items. The wrong-ASN capture reports one high-severity finding, pinned to bgp/frr, with seven evidence ids an engineer can resolve.
The third case is the one that shows why trace exists. The report on an MTU capture finds expected mtu 1500, observed 9100 and suspects portmgrd. Tracing PORT|Ethernet33 then walks the layers: CONFIG_DB holds 1500, APPL_DB already holds 9100. To an engineer who knows the SWSS code, that one screen points at the port manager rather than at orchagent or the ASIC. Finally, report –json emits the same findings as structured JSON, which is what the MCP tools hand to a model.

Figure 3. The MTU capture: one finding, expected 1500 and observed 9100, suspected stage portmgrd.

Figure 4. Confirming it with trace: CONFIG_DB holds mtu 1500, APPL_DB already holds 9100. The value changed between the two layers that portmgrd sits between.
The structured output shown in the demo also gives a model access to the same findings and evidence an engineer sees in the CLI.
The AI layer is a plug, not a dependency
The MCP server exposes ten read-only tools over the same divergence report and evidence index. Any MCP-capable model can use them, strictly interpret-only, and the contract is enforced in the benchmark scorer: a transcript that cites an evidence id that does not exist forfeits its honesty point. Swapping models is configuration, not code:
{“mcpServers”: {“sonic-rca”: {“command”: “sonic-rca”, “args”: [“serve”]}}}
We had sketched out the report format and model interface before the hackathon. The event gave us a chance to see how that design held up against real captures.
What was built during the hackathon window
In line with the event rules we declared what existed before the window: the project design (report schema, playbook format, MCP tool surface), a baseline toolchain, seed playbooks with an 11-test synthetic fixture suite, and drafts of the fault taxonomy and capture driver. During the window we built what real data demanded:
- Parsers hardened on real archives: safe extraction, the flat log layout, capture-window correlation.
- FRR capture parsers (BGP summary, RIB, NHT) and nine new checks: BGP session, FRR → APPL routes, static → RIB, FDB, neighbor, interface subnet, ACL and queued APPL writes.
- Service-down attribution from docker.ps, and a richer cross-layer trace.
- Virtual leaf-spine testbed bring-up, 12 fault captures plus a healthy baseline, and the full validation run. The test suite grew from 11 to 26 tests.
The commit history and RUNLOG.md in the results package record the split change by change.
With those captures in hand, we tested how reliably the checks localized faults and how much the structured evidence helped the models.
Impact and Benefits
Everything in this section was measured on a virtual leaf-spine testbed with a real FRR peer and 50 learned prefixes. We injected 12 faults from a pre-registered taxonomy, captured a techsupport archive for each plus one healthy baseline, and sealed the ground truth (root cause and stage) before any analysis ran.
We started by running the checks on the fault captures and the healthy baseline to see where the engine pinpointed failures and whether it flagged healthy behavior.
Measured: the deterministic layer
| Metric | Result |
|---|---|
| Faults localized to the ground-truth stage | 12 of 12 |
| False positives on the healthy capture | 0 |
| Evidence items indexed on the healthy capture | 147 |
| Automated tests passing | 26 of 26 |
The same downstream symptom gets different verdicts depending on where the evidence trail breaks: a wrong peer ASN is pinned to bgp/frr, prefixes selected in the FRR RIB that never reach APPL_DB are pinned to zebra/fpmsyncd, and an MTU that changes between CONFIG_DB and APPL_DB is pinned to portmgrd.
With the engine’s results in hand, we compared what the same models could infer from a raw archive and what they could explain with access to the report and evidence index.
Measured: the same model, with and without sonic-rca
We ran two models from one vendor over the 12 captures in two arms: raw archive only, and with the sonic-rca MCP tools. A mechanical 0–5 rubric scored each transcript: root cause (2), stage (1), valid evidence (1) and no fabricated evidence (1, forfeited on any hallucinated id).
| Model | Raw archive | With sonic-rca tools |
|---|---|---|
| Model A (Sonnet) | 1.25 / 5 | 5.00 / 5 |
| Model B (Haiku) | 1.50 / 5 | 4.75 / 5 |
Across all 48 transcripts, both arms and both models, there were 0 fabricated evidence ids. In the tools arm 23 of 24 verdicts were stage-correct; Model B’s single miss (an swss-down case) is in the published transcripts.

Figure 5. The results slide from the presentation, caveats included.
Caveats we disclose with the numbers. Two of the twelve ground truths were relabelled from the raw artifacts after capture, so the strict score against the pre-registered taxonomy is 10 of 12. The checks were refined on these same captures, so this is validation, not a held-out test. Two models from one vendor is a narrow sample. The MCP tool functions are covered by tests, but a live end-to-end MCP client session was not part of the validation runs. All transcripts are published for audit.
The testbed results give us a starting point for evaluating sonic-rca in day-to-day support and engineering workflows.
Expected benefits that still need validation
- Support escalations and post-mortems. The incident is gone but the archive is not; analysing the customer’s dump offline, with nothing leaving the machine, is the workflow we designed for. Not yet measured against real escalation tickets.
- CI triage. A failed run’s techsupport artifact can be analysed automatically. We have not yet wired this into a CI pipeline.
- Air-gapped and production networks. Nothing to connect, so nothing to approve. Expected, not yet deployed in such an environment.
- Time saved per investigation. We have no before-and-after timing data from practising engineers yet; that is the first study we want to run.
Working with real captures also changed what we looked for in a useful verdict, from the way we handled benign differences to how we pointed engineers to the daemon involved.
Lessons Learned
Synthetic fixtures lie by omission. Our pre-window toolchain passed all 11 synthetic tests and then broke on the first real archive. Real techsupport dumps have a flat log layout our adapter did not expect, gzipped logs that had to be swept rather than opened by name, and show outputs whose timestamps had to be correlated with the capture window before any comparison was meaningful. Most of the hackathon window went into parsers, not into new checks, and every fix is now pinned by a test built from a real-format archive. If you are building anything on techsupport data, get one real archive from a running switch on day one.
“Intent minus reality” produces benign noise unless you model the daemons. A naive diff between CONFIG_DB and APPL_DB flags things that are correct SONiC behaviour: a BGP neighbour that was never reached is not a pipeline divergence, and a queued APPL write is not a missing one. We added a benign-notes stage and a refine-to-reality-drift pass so the healthy capture reports zero findings. Getting false positives to zero on the healthy baseline mattered more than adding one more check; a tool that cries wolf gets ignored.
The stage, not just the object, is the verdict. Early reports said what diverged. Engineers wanted to know which daemon to look at. Attaching a suspected stage to each finding, and adding service-down attribution from docker.ps, changed the report from a list of symptoms into a starting point for a fix.
Evidence ids are what make the AI layer safe. Forcing every claim to resolve to an ev: id did two things: it made the model’s output auditable, and it made fabrication measurable. Zero fabricated ids across 48 transcripts is not a property of the models; it is a property of giving them structured tools and a scorer that punishes invention.
Measure against a baseline you would be embarrassed to lose to. Running the same model on the raw archive, with no tools, was the single most convincing part of our results. It separates “the model is smart” from “the tool adds something”.
Seal the ground truth before you look. We pre-registered the fault taxonomy and sealed expected stages before analysis. Two of twelve still had to be relabelled from the raw artifacts, and reporting that openly (10 of 12 strict, 12 of 12 as relabelled) cost us nothing and made the rest of the numbers credible.
Those lessons shape the next round of work, starting with fresh fault captures and eventually measuring how much time engineers save on real tickets.
Next Steps
The toolchain and its 13 checks are complete and tested, and the hackathon validation is done. What follows is planned work, not demonstrated results.
- A held-out validation. The checks were refined on the same 12 captures they were scored on. The next run uses a fresh fault set, captured after the checks are frozen, ideally on a second platform.
- Broader coverage. The current playbooks cover ports, VLANs, FDB, neighbours, interface subnets, ACLs, static and learned routes, and the BGP session. Natural next candidates: LAG/PortChannel, VRF, ECMP next-hop groups, QoS/buffer, and the *_STATE_DB legs.
- Timing study. Before-and-after measurement with engineers on real escalation tickets, which is the benefit we have claimed but not measured.
- Model breadth. Repeat the benchmark with models from other vendors and with a local model, to back the “no vendor lock-in” claim with numbers.
- CI integration. A sonic-rca report –json step on the techsupport artifact of a failed sonic-mgmt run, with the findings attached to the job.
- Upstream path. We would welcome a discussion with the community on the playbook format and the evidence-id convention, and on whether checks like these belong alongside sonic-utilities or as a standalone community project.
The repository README covers installation, environment setup and running the playbooks; docs/DESIGN.md holds the design and docs/DEMO.md the demo transcript. We would value feedback most on two things: playbooks you would add for failures you see in production, and captures of real faults we can add to the corpus. Please feel free to contact us or explore the codebase.
Project repository: https://github.com/kmmayya-aria/Hackathon2026-sonic-rca
Get involved: open an issue