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.
Written by Google and published in google/skills under the Apache-2.0 license. Treq shows it unchanged except for heading levels and links to files on GitHub.
Use this skill to systematically diagnose and prevent vbar_control_agent
segfaults and Out-Of-Memory (OOM) errors on TPU v6e nodes.
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read Usage Attribution. 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.
gcloud or equivalent tool.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).{issue_time} is provided,
calculate the query time window as [{issue_time} - 30m] to
[{issue_time} + 30m].
{start_time} = {issue_time} - 30m{end_time} = {issue_time} + 30mvbar_control_agent OOMsLook for specific out of memory messages from vbar_control_agent in serial
console logs (serialconsole.googleapis.com%2fserial_port_1_output).
query_logs (for live diagnostics)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}"
Memory cgroup out of memory messages related to
vbar_control_agent. Stack traces pointing to
libtpu::tpunetd::VBARControlHelper::MetricsReadFromVBAR are a strong
indicator.references/failure_signatures.md for example log
patterns.tpu-device-plugin Metrics Fetch Failures [Low Risk]Check if tpu-device-plugin is reporting metric fetch failures.
query_logsresource.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}"
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 get pods -A -o jsonpath='{range .items[*]}{.metadata.namespace}{"/"}{.metadata.name}{"\t"}{.spec.containers[*].image}{"\n"}{end}'
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.
If a custom metrics collection agent is identified, recommend disabling it.
vbar_control_agent Resiliency Update [Low Risk]Advise that a permanent fix will be available in a future GKE version.
[{start_time}, {end_time}] window.vbar_control_agent segfaults and OOMs using query_logs.tpu-device-plugin failures using query_logs.Claude Code and Codex keep each installed skill's name and description in context. When a request matches the description, the agent loads the full SKILL.md. You can also run it yourself: type /gke-ai-troubleshooting-tpu-vbar-oom in Claude Code or $gke-ai-troubleshooting-tpu-vbar-oom in Codex.
The description says when to use it:
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.
Copy the gke-ai-troubleshooting-tpu-vbar-oom folder into .claude/skills/ in your project. To use it in every project, copy it into ~/.claude/skills/ instead.
git clone --depth 1 https://github.com/google/skills.git /tmp/google-skills
mkdir -p .claude/skills
cp -r /tmp/google-skills/skills/cloud/gke-ai-troubleshooting-tpu-vbar-oom .claude/skills/
Codex reads skills from .agents/skills/ in your repository, and from ~/.agents/skills/ for every repository. It detects new skills on its own. Restart Codex if gke-ai-troubleshooting-tpu-vbar-oom does not appear.
git clone --depth 1 https://github.com/google/skills.git /tmp/google-skills
mkdir -p .agents/skills
cp -r /tmp/google-skills/skills/cloud/gke-ai-troubleshooting-tpu-vbar-oom .agents/skills/
Open Settings and select the Skills tab. The tab appears when Skills installation is on under Settings → Feature Preview. Search for gke-ai-troubleshooting-tpu-vbar-oom and choose Install….
Install for repository writes the skill under .treq/skills/ in the current repository. Install for application makes it available to every repository on this machine. Each new workspace gets a copy in .claude/skills/ and .agents/skills/, so Claude Code and Codex both find it. See Installing Skills from the Library.
gke-ai-troubleshooting-tpu-vbar-oom ships 4 files, 10.9 KB in total. Select a file to load it from GitHub.