Doca debug

From NVIDIA/skills · View interactive version

Doca debug is an AI agent skill from the GitHub repository NVIDIA/skills. Use this skill when the user is debugging any DOCA symptom — a build that won't compile, a link step that can't resolve a doca_* symbol, a runtime call returning DOCA_ERROR_*, a silent service or tool, or a stack trace / valgrind / core dump — and needs the layered ladder (install → version → build

How to use this skill

Skill file

DOCA debug

Host checks. Commands here that inspect the user's DOCA host (listing or reading /opt/mellanox/doca, release files such as /etc/mlnx-release or /etc/nvidia/bf-release, /dev/mst) or reach the BlueField (RShim, SSH, BMC) are for that host. Run them yourself only if the user confirms you are on it; otherwise answer from this skill, give the commands for the user to run, and treat values you can't see as unknown.

Examples

it?"** — this is in scope. Walk the layered ladder; do not

jump to library-internal debug first.

tool?"** — use the log-level / trace-flavor surface, then

capture state for a forum post.

Instructions

An undefined reference is a Link-layer symptom, not proof of a

missing library or an application-code defect. Before recommending edits,

request these observations from the **same host/container and shell that

ran the failing build**:

for Flow, pkg-config --modversion doca-flow.

full error output. pkg-config reports flags, not the command that failed.

**If these outputs are missing, request them and pause before prescribing a

repair.** Listing a check is not evidence that it passed. Do not append a

speculative fix, guessed -L/-l flags, predicted library filenames, or a

replacement compiler command to that capture request. Once evidence is

available, compare the original invocation with the complete observed

pkg-config output through the existing build system; do not hand-assemble

DOCA's version-dependent split libraries. Use ldd only if a relevant binary

was actually produced; a declaration in a header does not prove that a linked

shared object exports the symbol.

Follow doca-version/TASKS.md#configure for version coherence,

doca-programming-guide/TASKS.md#debug for the

environment-before-program investigation, and

doca-public-knowledge-map/SKILL.md for verified

install locations and public documentation. A bundle skill name is not an SDK

page slug: never construct a documentation URL from it. If no matching guide

has been verified, use the DOCA SDK index

and say the specific page is not yet confirmed.

Then follow TASKS.md for the staged investigation; later

phases are conditional on observed results, not instructions to guess a fix.

First reply when only a linker error is available (Flow example).

Use this capture-only shape, adapting the library to the actual question:

This is a link-time failure. An undefined-symbol message does not tell us

the installed version or which build setting is wrong. From the same

host/container and shell as the failing build, please paste these outputs:

```bash

pkg-config --modversion doca-common

pkg-config --modversion doca-flow

pkg-config --libs doca-flow

```

Also include the actual failing linker invocation, full error output and

whether the build ran on the host or in a container. Do not change flags,

packages or source yet. Phases 3–5 are pending this evidence; no repair has

been selected. Once the observations are available, we can compare them,

choose one justified correction and rerun the original build. The link

check is successful only when that build exits cleanly without the missing

symbols; it does not establish runtime or hardware correctness.

End that first reply at the evidence request and pending decision. Do not add

an example repair command after it, even with a disclaimer to verify it later.

Where to start: This skill is the canonical layered-ladder

reference both doca-setup/SKILL.md

and doca-programming-guide/SKILL.md

escalate to. If the symptom does not fit cleanly in env-class or

program-class, start at the tasks companion — the

full layered ladder lives there.

Example questions this skill answers well

The CLASSES of debug questions this skill is built to answer, each

with one worked example.

it?"** — worked example: *"ld says `undefined reference to

doca_flow_init` — which layer?"* Answered by the canonical layered

ladder in the tasks companion (layer 4 = Link).

worked example: *"My DOCA Flow program is silent — where do I get

more log output?"* Answered by the trace-flavor / log-level surface

in the capabilities companion

the tasks companion.

worked example: *"I'd like to file a forum question with reproducible

context — what should I include?"* Answered by the

capture-a-reproducible-state workflow in

the tasks companion.

this?"** — worked example: *"doca_caps returned nothing for RDMA

— does that mean unsupported?"* Answered by the

tool-vs-capability decision tree in

the capabilities companion

observable?"** — worked example: *"hugepages is empty inside the

container; is that a real problem or a container thing?"*

Answered by the container-specific debug constraints in

the capabilities companion

is the customer-facing DOCA forum and what should the post

contain?"* Answered by the Developer-Forum routing rule in

the tasks companion plus

doca-public-knowledge-map/SKILL.md.

If the symptom is purely env-class, route to

doca-setup/SKILL.md; if purely

program-class, route to

doca-programming-guide/SKILL.md.

This skill is the cross-cutting layer both call into.

When to load this skill

Load this skill when the user is debugging anything DOCA-related — a build that won't compile, a link step that can't resolve a doca_* symbol, a runtime call that returns DOCA_ERROR_*, a packet that does not appear on the wire, a service that won't start, or a tool that returns no useful output. Concretely:

Do not load this skill for:

What this skill provides

This is a thin loader. The body keeps only the orientation needed to pick the right next file. The substantive debug material lives in two companion files:

Loading order

  1. Read this skill first to confirm the user's symptom is cross-cutting debug (not env-class only, not program-class only, not library-internal only).
  2. For the layered debug model, the read-only stance, the version-availability of debug tools, and the observability surface DOCA emits, see the capabilities companion.
  3. For the canonical layered debug ladder and the capture-and-report workflow, see the tasks companion. The build, modify, and run anchors in the tasks companion are stubs that route to doca-programming-guide/SKILL.md; their substance lives there.
  4. If the user's symptom turns out to be env-class (install / build prerequisites), hand off to doca-setup/SKILL.md. If program-class, hand off to doca-programming-guide/SKILL.md. If library-internal, hand off to the matching library skill's ## debug (e.g. doca-flow/SKILL.md).

The two companion files cross-link to each other and to doca-public-knowledge-map/SKILL.md whenever the right answer is "look it up in the public docs or the installed package layout" rather than "debug-specific guidance".

Related skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.