Skip to content
Development
Skill

/gke-ai-troubleshooting-tpu-vbar-oom

Diagnoses and prevents vbar_control_agent segfaults, out-of-memory (OOM) errors, and TPU device initialization failures on TPU v6e nodes in GKE caused by race conditions during TPU device resets or high-frequency metrics polling. Use when troubleshooting vbar_control_agent

From plugin
skills
22k178 skills1 MCP

Claude Code

$ npx -y skills add google/skills --skill gke-ai-troubleshooting-tpu-vbar-oom --agent claude-code

SKILL.md

gke-ai-troubleshooting-tpu-vbar-oom.SKILL.md
name: gke-ai-troubleshooting-tpu-vbar-oom
description: >-
  Diagnoses and prevents vbar_control_agent segfaults, out-of-memory (OOM) errors,
  and TPU device initialization failures on TPU v6e nodes in GKE caused by race
  conditions during TPU device resets or high-frequency metrics polling. Use when
  troubleshooting vbar_control_agent crashes, memory cgroup OOMs in serial console
  logs, tpu-device-plugin metrics checksum corruption errors, or custom TPU metrics
  collection conflicts on GKE TPU v6e nodes. Don't use for general non-TPU container
  OOM troubleshooting or standard GKE node lifecycle operations.
metadata:
  version: "1.0.1"
  category: CloudObservabilityAndMonitoring

TPU Connection Failure and VBAR OOM Troubleshooting

Use this skill to systematically diagnose and prevent `vbar_control_agent` segfaults and Out-Of-Memory (OOM) errors on TPU v6e nodes.

Attribution

**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you MUST read [Usage Attribution](references/attribution.md). For commands executed directly in the terminal (never in generated scripts, Terraform, or user code), prefix `gcloud` with `CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:gke-ai-troubleshooting-tpu-vbar-oom)"` and append `agent-skills/1.0 (skill:gke-ai-troubleshooting-tpu-vbar-oom)` to `User-Agent` headers.

⚠️ Prerequisites

  • Cloud Logging must be enabled for the project.
  • Access to the project and cluster via `gcloud` or equivalent tool.

🔍 Diagnostic Workflow

Step 0: Context Acquisition & Time Window Definition

Independently gather required context using available GCP/GKE tools or use the provided `{variable}` placeholders:

  • `{project_id}`: The GCP Project ID (e.g., `customer-ai-project-123`).
  • `{cluster_name}`: The GKE Cluster Name (e.g., `tpu-cluster-prod`).
  • `{node_name}`: The Node Name or Instance ID (e.g., `tpu-node-1`).
  • `{workload_name}`: The Workload Name / JobSet Name (e.g.,

`my-training-job-456`).

  • `{namespace}`: The Workload Namespace.
  • `{issue_time}`: The timestamp of the issue (e.g., `2026-04-14T20:00:00Z`).

Time Handling & Execution Rules

1. **Window Calculation**: If an issue timestamp `{issue_time}` is provided, calculate the query time window as `[{issue_time} - 30m]` to `[{issue_time} + 30m]`.

  • Let `{start_time}` = `{issue_time} - 30m`
  • Let `{end_time}` = `{issue_time} + 30m`

2. **Informational vs. Live Execution**: If the user request is informational or query-formulation (e.g. "How can I check...", "How do I determine..."), or if live GCP project resources are not actively targetable, directly output the calculated time window, log names, and Cloud Logging filter templates without attempting live log execution commands.

Step 1: Check for `vbar_control_agent` OOMs

Look for specific `out of memory` messages from `vbar_control_agent` in serial console logs (`serialconsole.googleapis.com%2fserial_port_1_output`).

  • **Tool to use**: `query_logs` (for live diagnostics)
  • **Filter Templates**:

**Serial Console Logs (OOMs):**

logName="projects/{project_id}/logs/serialconsole.googleapis.com%2fserial_port_1_output"
AND labels."compute.googleapis.com/resource_name"="{node_name}"
AND SEARCH(text_payload, "Memory cgroup out of memory: Killed process .* (vbar_control_ag)")
AND timestamp >= "{start_time}"
AND timestamp <= "{end_time}"
  • **Logic**: Presence of `Memory cgroup out of memory` messages related to

`vbar_control_agent`. Stack traces pointing to `libtpu::tpunetd::VBARControlHelper::MetricsReadFromVBAR` are a strong indicator.

  • **Automation**: Proceed to next step automatically after reporting findings.
  • **Reference**: See `references/failure_signatures.md` for example log

patterns.

Step 2: Investigate `tpu-device-plugin` Metrics Fetch Failures [Low Risk]

Check if `tpu-device-plugin` is reporting metric fetch failures.

  • **Tool to use**: `query_logs`
  • **Filter Template**:
resource.type="k8s_container"
AND resource.labels.project_id="{project_id}"
AND resource.labels.cluster_name="{cluster_name}"
AND resource.labels.container_name="tpu-device-plugin"
AND severity=ERROR
AND textPayload:"metrics fetch failed for .* deviceID and .* device path with error: checksum didn't match with the metrics data. Corrupt data found"
AND timestamp >= "{start_time}"
AND timestamp <= "{end_time}"
  • **Logic**: Errors indicating "metrics fetch failed" with "checksum didn't

match" suggest vBAR memory corruption.

  • **Automation**: Proceed to next step automatically after reporting findings.

Step 3: Check for Custom Metrics Collection Usage [Low Risk]

Inspect cluster configurations, workloads, or container specs to determine if custom TPU metrics collection mechanisms are deployed.

  • **Action**: Check if custom scripts or agents (e.g., using

`libtpu.sdk.tpumonitoring`) are deployed that frequently query `GetHostMetrics` from `vBAR Control Agent`.

  • **Verification Commands**:
  • **Kubectl Search (Inspect workload env/specs)**:
    kubectl get pods -A -o jsonpath='{range .items[*]}{.metadata.namespace}{"/"}{.metadata.name}{"\t"}{.spec.containers[*].image}{"\n"}{end}'
  • **Log Search Filter (`query_logs`)**:
    resource.type="k8s_container"
    AND resource.labels.project_id="{project_id}"
    AND resource.labels.cluster_name="{cluster_name}"
    AND textPayload:"libtpu.sdk.tpumonitoring"
    AND timestamp >= "{start_time}"
    AND timestamp <= "{end_time}"
  • **Logic**: Confirmation of custom metrics collection helps confirm the race

condition hypothesis.

🛠️ Resolution Workflow

Resolution 1: Temporarily Disable Custom Metrics Collection [High Risk]

If a custom metrics collection agent is identified, recommend disabling it.

  • **Action**: Recommend disabling the custom metrics collector.
  • **Justificatio
Read more
@google
Ships withskills

This repository contains Agent Skills for Google products and technologies, including Google Cloud.

22k178 skills1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
21.7k
Star history of google/skills on GitHub, a chart by star-history.com

Other skills on skills.

finding-google-skills

finding-google-skills

Google platform decision and setup guidance, loaded on demand from Google's skill catalog. Use when a developer is choosing or…

@google@googleInstall Skill
gcloud

gcloud

Provides safety-critical validation, guardrails, and data reduction for gcloud CLI operations across Google Cloud Platform (GCP)…

@google@googleInstall Skill
google-cloud-recipe-auth

google-cloud-recipe-au…

Provides expert guidance on Identity and Access Management (IAM) and authenticating and authorizing to Google Cloud services and…

@google@googleInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about gke-ai-troubleshooting-tpu-vbar-oom.

Which coding agents can use gke-ai-troubleshooting-tpu-vbar-oom?
gke-ai-troubleshooting-tpu-vbar-oom installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.