Greptimedb Fuzz Ci Failure Investigation 标志

Greptimedb Fuzz Ci Failure Investigation

组织热门
GreptimeTeam
greptimedb-fuzz-ci-failure-investigation

调查 GreptimeDB 模糊测试 CI 目标失败:下载 GitHub Actions 作业日志和模糊测试产物(如 kind 日志、监控转储和 CSV 转储),再结合本地 GreptimeDB 源代码分析失败原因。用户提供失败的模糊测试 CI 目标/作业链接,或要求诊断 GreptimeDB 模糊测试 CI 故障时使用。

Add to TypingMind

概览

发布者GreptimeTeam
代码仓库greptimedb
技能名称greptimedb-fuzz-ci-failure-investigation
星标数
6.7K
复刻数
562
附带文件
仅含指令
许可协议Apache-2.0
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 指令自成一体

    模型所需的一切都包含在指令中,无需同步额外文件。

  • 开源

    由 GreptimeTeam 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Greptimedb Fuzz Ci Failure Investigation AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/GreptimeTeam/greptimedb/tree/main/.agents/skills/greptimedb-fuzz-ci-failure-investigation
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/GreptimeTeam/greptimedb.git /tmp/greptimedb
mkdir -p .claude/skills
cp -r /tmp/greptimedb/.agents/skills/greptimedb-fuzz-ci-failure-investigation .claude/skills/greptimedb-fuzz-ci-failure-investigation
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Greptimedb Fuzz Ci Failure Investigation,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Greptimedb Fuzz Ci Failure Investigation。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Greptimedb Fuzz Ci Failure Investigation 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

GreptimeDB Fuzz CI Failure Investigation

Investigate failed fuzz-test jobs for GreptimeTeam/greptimedb from a local checkout. The purpose is to download the failed job's CI output and fuzz artifacts, then explain the likely cause by correlating the evidence with GreptimeDB source.

Always pass --repo GreptimeTeam/greptimedb to gh; local remotes may point to forks. Keep the workflow read-only: do not rerun jobs, cancel workflows, push, comment on PRs, or delete artifacts unless the user explicitly asks.

Scope

Use this skill for fuzz CI only. In .github/workflows/integration.yml, fuzz failures are the CI jobs that use .github/actions/fuzz-test:

  • fuzztest — standalone fuzz targets.
  • unstable-fuzztest — unstable standalone fuzz target.
  • distributed-fuzztest — distributed cluster fuzz targets.
  • distributed-fuzztest-with-chaos — distributed fuzz targets with Chaos Mesh.

Each matrix job runs a semantic group of targets on one prepared environment. The group defaults to fail-fast: after the first target failure it captures that target's diagnostics and marks the remaining targets as skipped. The workflow strategy still uses fail-fast: false, so failures do not cancel other groups.

The reusable action .github/actions/fuzz-test/action.yaml delegates each target to .github/scripts/run-fuzz-targets.sh. CI passes FUZZ_BIN_DIR, so the script runs the prebuilt target executable:

bash
<prebuilt-fuzz-binary> -max_total_time=<seconds> \
  -artifact_prefix=<target-dir>/libfuzzer/

Without FUZZ_BIN_DIR, such as during local reproduction, the script falls back to cargo fuzz run <target> --fuzz-dir tests-fuzz -D -s none with the same libFuzzer arguments.

Failed jobs upload one group artifact. Its stable name identifies the job kind, mode, and group, for example:

text
fuzz-distributed-remote-wal-database-and-regular-table

The artifact contains manifest.json, summary.md, and one directory per target under targets/<target>/. A failed distributed target can include fuzz.log, libFuzzer reproducers, CSV/SQL traces, Kind logs, monitor dumps, and Kubernetes state. Setup failures use targets/setup/.

Inputs

The normal user input is a CI target link: a GitHub Actions job URL for one failed matrix target. Treat that URL as the primary source of truth. Example:

text
https://github.com/GreptimeTeam/greptimedb/actions/runs/29000666156/job/86062894741

Also accept these fallback inputs:

  • A workflow run URL, e.g. https://github.com/GreptimeTeam/greptimedb/actions/runs/29000666156.
  • A run id plus a fuzz target, mode name, artifact name, PR, branch, or commit SHA.

Parse ids from URLs:

bash
REPO=GreptimeTeam/greptimedb
RUN_ID=29000666156
JOB_ID=86062894741

When the input is a job URL, do not ask for the target name first. Use the job id to fetch metadata, then derive the group and mode from the job name. A distributed fuzz job name usually contains the CI group tuple:

text
Fuzz Test (Distributed, <mode>, <group>)
Fuzz Test with Chaos (Distributed, <mode>, <group>)

If only a run URL is provided, list failed jobs and choose the fuzz job matching the group/mode. Ask only when multiple fuzz jobs are plausible and there is no group, mode, artifact, or job-url clue.

Prerequisites

  • gh must be installed and authenticated (gh auth status). Actions logs and artifacts commonly require authentication even for a public repo.
  • jq, unzip, and standard shell tools are useful for reducing logs.
  • Use the local GreptimeDB checkout for source analysis. If the run's head SHA is not the current checkout, inspect the code at the run's SHA before making claims.
  • Use a scratch directory outside the source tree, such as /tmp/greptimedb-fuzz-ci.

1. Capture run and job metadata

Create a scratch directory:

bash
mkdir -p /tmp/greptimedb-fuzz-ci/$RUN_ID
cd /tmp/greptimedb-fuzz-ci/$RUN_ID

Fetch run metadata:

bash
gh run view "$RUN_ID" --repo "$REPO" \
  --json databaseId,name,displayTitle,event,headBranch,headSha,status,conclusion,createdAt,updatedAt,url,workflowName \
  > run.json

Fetch all jobs through the REST API:

bash
gh api "repos/$REPO/actions/runs/$RUN_ID/jobs?per_page=100" \
  --paginate --jq '.jobs[]' \
  | jq -s '{jobs: .}' > jobs.json

List failed fuzz-like jobs:

bash
jq -r '
  .jobs[]
  | select(.conclusion != null and .conclusion != "success")
  | select(.name | test("Fuzz Test|fuzz"; "i"))
  | [.id, .name, .status, .conclusion, .html_url] | @tsv
' jobs.json

For a known JOB_ID, capture job name and step outcomes:

bash
jq -r --arg id "$JOB_ID" '
  .jobs[] | select((.id | tostring) == $id) |
  "job=\(.name) conclusion=\(.conclusion) url=\(.html_url)",
  (.steps[]? | [.number, .name, .status, .conclusion, .started_at, .completed_at] | @tsv)
' jobs.json > job-summary.txt

Record the fuzz job kind, matrix mode, group, failed step, event type, branch, and head SHA. Do not assume main for PR or merge-queue runs. The failed target is authoritative in the downloaded artifact's manifest.json; do not guess it from the group name.

2. Download CI output for the failed job

Download the selected job's log; this is the authoritative target CI output for the cargo fuzz run command:

bash
gh run view "$RUN_ID" --repo "$REPO" --job "$JOB_ID" --log > job-$JOB_ID.log

Download the full workflow log only when setup/build context matters:

bash
gh run view "$RUN_ID" --repo "$REPO" --log > run-$RUN_ID.log

Fallback if gh run view --log is incomplete. The job logs endpoint returns a plain text stream, while the full run logs endpoint returns a zip archive:

bash
gh api "repos/$REPO/actions/jobs/$JOB_ID/logs" > job-$JOB_ID.log
gh api "repos/$REPO/actions/runs/$RUN_ID/logs" > run-$RUN_ID-logs.zip
unzip -oq run-$RUN_ID-logs.zip -d run-logs

In the job log, inspect the Run Fuzz Test step first. Capture:

  • exact target name;
  • max_total_time;
  • panic/assertion/backtrace or libFuzzer crash output;
  • generated crash/reproducer path if printed;
  • timeout or resource symptoms.

3. Find and download fuzz artifacts

List artifacts:

bash
gh api "repos/$REPO/actions/runs/$RUN_ID/artifacts?per_page=100" \
  --paginate --jq '.artifacts[]' \
  | jq -s '{artifacts: .}' > artifacts.json
jq -r '.artifacts[] | [.id, .name, .expired, .size_in_bytes] | @tsv' artifacts.json

Match the one group artifact by job kind, mode slug, and group slug. If the display name does not make the slug obvious, list the run artifacts and choose the unique fuzz-* artifact whose suffix matches the group. Do not search for separate Kind, monitor, or CSV artifacts; these are target subdirectories in the group artifact.

Download exact artifacts when possible:

bash
ARTIFACT='fuzz-distributed-remote-wal-database-and-regular-table'
gh run download "$RUN_ID" --repo "$REPO" --name "$ARTIFACT" --dir artifacts/"$ARTIFACT"

Fallback by artifact id:

bash
ARTIFACT_ID=$(jq -r --arg name "$ARTIFACT" '.artifacts[] | select(.name == $name and (.expired | not)) | .id' artifacts.json | head -n 1)
if [ -z "$ARTIFACT_ID" ]; then
  echo "Artifact not found or expired: $ARTIFACT"
  exit 1
fi
gh api "repos/$REPO/actions/artifacts/$ARTIFACT_ID/zip" > artifact-$ARTIFACT_ID.zip
mkdir -p artifacts/"$ARTIFACT"
unzip -oq artifact-$ARTIFACT_ID.zip -d artifacts/"$ARTIFACT"

After download, read the manifest before the bulk logs:

bash
jq -r '.[] | [.target, .status, .exit_code, .after_prior_failure, .artifact_collection] | @tsv' \
  artifacts/"$ARTIFACT"/manifest.json

Select the first failure entry as the primary target. Entries with skipped_after_failure did not run; entries with after_prior_failure=true ran against a potentially contaminated shared environment. Note expired or missing artifacts explicitly; retention is currently short (retention-days: 3).

4. Understand artifact contents

Evidence for target <target> is rooted at artifacts/$ARTIFACT/targets/<target>/. result.json records timestamps, status, exit code, fuzz budget, prior-failure provenance, and artifact collection status. fuzz.log is the complete libFuzzer output from the prebuilt target executable in CI; local fallback runs it through cargo fuzz run.

Kind logs under targets/<target>/kind/ come from an immediate failure snapshot and usually include Kubernetes state plus container logs. Prioritize:

  • GreptimeDB component logs: frontend, datanode, metasrv, flownode, monitor.
  • Kubernetes pod descriptions/events: restarts, OOMKilled, scheduling, image pull, volume, DNS, and network issues.
  • External service logs: etcd, Kafka, Minio, Chaos Mesh, Kafka WAL helper.

Monitor dumps under targets/<target>/monitor/ are collected by .github/scripts/collect-fuzz-monitor-artifacts.sh. They may include:

  • state.log, sql.log, copy.log, port-forward.log;
  • *.show_create_table.sql for _gt_logs and OpenTelemetry trace tables;
  • parquet dumps for _gt_logs, opentelemetry_traces, opentelemetry_traces_operations, and opentelemetry_traces_services.

CSV and SQL traces are under targets/<target>/csv/. LibFuzzer crash or timeout reproducers are under targets/<target>/libfuzzer/. Kubernetes descriptions and events are under targets/<target>/kubernetes/. Standalone service logs are under targets/<target>/service/ when available.

5. Build a layered diagnosis model

Before drilling into a specific error string, build a small macro-level model of the failure. This prevents overfitting on the loudest symptom, such as libFuzzer: deadly signal, Internal error, or a cleanup warning.

5.1 Create a failure timeline

Record the key timestamps in order:

  • job start and setup steps;
  • external dependencies ready, such as etcd, Kafka, Minio, and Chaos Mesh;
  • GreptimeDB cluster ready;
  • fuzz binary starts;
  • first generated operation or SQL visible in the target log;
  • first suspicious component log line;
  • user-visible fuzz failure or panic;
  • artifact collection and cleanup.

Use the timeline to classify the failure phase: setup, workload execution, storage/WAL/write path, query path, cleanup, or runner infrastructure.

5.2 Trace the error propagation chain

For distributed fuzz failures, identify the chain from outer symptom to inner cause candidate. Prefer this shape:

text
fuzz panic/assertion
  -> client-visible SQL/gRPC/HTTP error
  -> frontend or monitor error
  -> meta/datanode/flownode component error
  -> storage/WAL/object-store/Kafka/etcd/k8s dependency error

At each boundary, decide whether that layer produced the error or merely wrapped and forwarded a downstream error. Do not stop at wrapper errors unless there is no deeper evidence.

5.3 Investigate by component boundary

For distributed targets, scan evidence in this order unless the timeline points elsewhere:

  1. fuzz target and generated operations;
  2. frontend request handling and SQL/error response;
  3. metasrv metadata/procedure/routing;
  4. datanode/mito2/metric-engine region execution;
  5. WAL, Kafka, object store, Minio, etcd, or other dependencies;
  6. Kubernetes pod state, restarts, scheduling, DNS, network, and runner resource signals.

For each layer, answer two questions: "is this the first causal error?" and "is this layer producing or propagating the failure?"

5.4 Verify intended config against runtime behavior

When a failure appears configuration-related, compare all three levels before claiming a config did or did not take effect:

  1. the workflow/action/Helm/YAML config at the tested SHA;
  2. the actual pod/container runtime config or startup logs, if available;
  3. the source path that consumes the config, including hard-coded defaults and library retry/backoff settings.

If a logged value differs from the expected config, explicitly state whether the config was not applied, was overridden by another layer, or refers to a different kind of timeout/retry/deadline.

5.5 Keep competing hypotheses until evidence rules them out

Before final classification, list at least two plausible causes and the evidence that supports or weakens each, for example:

  • product bug;
  • fuzz/test invalid assumption or missing wait;
  • config not applied or overridden;
  • dependency/infra flake;
  • timeout, retry, or resource pressure.

Then choose the most likely cause and keep the confidence scoped. It is often valid to have high confidence in the observed error chain but only medium confidence in the ultimate cause category.

5.6 State what would disprove the diagnosis

Include one or two falsifiable checks, such as a same-SHA rerun, a fixed reproducer, a cross-target pattern in the same dependency mode, or one missing artifact/log that would change the conclusion.

6. Reduce evidence before reading source

Extract high-signal lines from job logs and artifacts:

bash
grep -RInE '(^|[^[:alpha:]])(ERROR|Error|WARN|panic|panicked|FAILED|failure|timeout|Timeout|assert|backtrace|SIG[A-Z]+|OOMKilled|CrashLoopBackOff|ImagePullBackOff|libFuzzer|AddressSanitizer|UndefinedBehaviorSanitizer)' \
  job-$JOB_ID.log run-$RUN_ID.log job-logs run-logs artifacts 2>/dev/null > signals.txt

Then identify the first causal failure, not the last cleanup error. A typical order:

  1. cargo fuzz run output in job-$JOB_ID.log.
  2. GreptimeDB component logs around the same timestamp.
  3. Kubernetes events/restarts/OOMs.
  4. Monitor/CSV dumps that show the generated SQL or cluster state.

Avoid common mistakes:

  • Do not blame cleanup errors after the fuzz failure.
  • Do not treat expected retry warnings as root cause unless they align with the assertion, crash, or timeout.
  • Do not assume an artifact is relevant only because it contains fuzz; match mode and target.
  • Do not diagnose from current local main if the run used a different SHA.

7. Inspect the tested source revision

Read the tested SHA:

bash
HEAD_SHA=$(jq -r '.headSha // empty' run.json)
if [ -z "$HEAD_SHA" ]; then
  echo "Error: HEAD_SHA is empty or null"
  exit 1
fi

UPSTREAM_REMOTE=$(git remote -v \
  | awk '/GreptimeTeam\/greptimedb(\.git)?\/?([[:space:]])/ { print $1; exit }')
UPSTREAM_REMOTE=${UPSTREAM_REMOTE:-origin}

git rev-parse --verify "$HEAD_SHA^{commit}" >/dev/null 2>&1 \
  || git fetch "$UPSTREAM_REMOTE" "$HEAD_SHA"

If local HEAD differs, inspect files at that SHA or create a temporary worktree:

bash
git worktree add --detach /tmp/greptimedb-fuzz-ci/$RUN_ID/source "$HEAD_SHA"

Remove temporary worktrees after investigation with git worktree remove <path>. Never overwrite the user's current branch.

8. Map logs to GreptimeDB code

Start from concrete strings: fuzz target name, panic text, assertion message, error variant, SQL statement, or log message. Search/read the matching source at the run SHA.

Useful entry points:

  • tests-fuzz/ — fuzz targets, operation generators, checkers, dump paths.
  • .github/actions/fuzz-test/action.yaml — exact CI fuzz runner configuration.
  • .github/workflows/integration.yml — fuzz matrix and artifact upload names.
  • .github/scripts/collect-fuzz-monitor-artifacts.sh — monitor dump contents.
  • src/mito2/AGENTS.md — storage/WAL/region failures.
  • src/metric-engine/AGENTS.md — metric/logical table failures.
  • src/frontend/AGENTS.md — SQL/protocol/query orchestration failures.
  • src/meta-srv/AGENTS.md — metadata/procedure/routing failures.
  • src/flow/AGENTS.md — flow failures.

When reporting code evidence, cite the file/function/line and quote the log line that reaches it. Separate confirmed facts from hypotheses.

9. Classify the cause

Use this taxonomy:

  • Product bug: GreptimeDB panics, returns wrong results, loses data, or violates invariants under generated fuzz operations.
  • Fuzz/test bug: the fuzz target/generator/checker makes an invalid assumption or fails to wait for an asynchronous condition it requires.
  • Flake/race: timing/order/resource issue, usually supported by timeouts, retries, pod restarts, or prior similar failures.
  • Environment/infra: runner disk/OOM, Docker/kind, network, dependency install, Kafka/Minio/etcd startup, or GitHub service issue.
  • Unknown: logs/artifacts are expired or evidence conflicts.

10. Final response format

Use this structure:

markdown
## Summary
- Likely cause: <one sentence>
- Confidence: high|medium|low
- Classification: product bug|fuzz/test bug|flake/race|environment/infra|unknown
- Confidence basis: <which parts are confirmed vs inferred>

## Evidence
- `<job log or artifact path>`: quoted line(s)
- `<source-file:line>`: relevant code path

## Reasoning
<short chain from fuzz target -> CI output -> artifact logs -> source code>

## Alternative hypotheses
- <hypothesis>: <supporting and weakening evidence>
- <hypothesis>: <supporting and weakening evidence>

## Next steps
1. <minimal fix, reproduction command, or verification command>
2. <rerun command or extra log needed, if any>

## What would disprove this
- <specific rerun, artifact, log line, or reproducer result that would change the diagnosis>

If logs or artifacts cannot be downloaded because gh is not authenticated or the artifacts expired, say so directly and include the exact command/error.

常见问题

Greptimedb Fuzz Ci Failure Investigation AI 技能有什么作用?

调查 GreptimeDB 模糊测试 CI 目标失败:下载 GitHub Actions 作业日志和模糊测试产物(如 kind 日志、监控转储和 CSV 转储),再结合本地 GreptimeDB 源代码分析失败原因。用户提供失败的模糊测试 CI 目标/作业链接,或要求诊断 GreptimeDB 模糊测试 CI 故障时使用。

为什么在 TypingMind 中使用 Greptimedb Fuzz Ci Failure Investigation?

因为您只需安装一次,就能搭配任何模型使用。Greptimedb Fuzz Ci Failure Investigation 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Greptimedb Fuzz Ci Failure Investigation?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/GreptimeTeam/greptimedb/tree/main/.agents/skills/greptimedb-fuzz-ci-failure-investigation。TypingMind 会读取其中的 SKILL.md,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Greptimedb Fuzz Ci Failure Investigation?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Greptimedb Fuzz Ci Failure Investigation 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Greptimedb Fuzz Ci Failure Investigation 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Greptimedb Fuzz Ci Failure Investigation AI 技能免费吗?

是的。GreptimeTeam 已在 GitHub 上根据 Apache-2.0 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇