SWE-Lego-RL

Troubleshooting

Symptom-indexed fixes for the issues that actually block RL training

Failure modes that recur when operating SWE-Lego-RL, distilled to symptom → root cause → fix. The pages here cover the ones you are most likely to hit; the full index at the bottom lists every incident write-up in the repo, including the ones too situational to promote to a page.

Most config-level problems never get this far

PREFLIGHT_ONLY=1 catches the mistakes that would otherwise cost a multi-hour run — parser mismatch, topology that doesn't add up, R3 without the new verl tree, no reachable image source. Run it first; see Preflight.

Quick index by symptom

The run won't start, or dies on step 0

SymptomPage
response_mask must contain at least one valid token on the first stepTool-call parser mismatch
import torch / import vllm costs ~9 s on every launchvenv on a network FS
Every trial fails env_setup with empty trajectoriesPreflight §6
Pods end in ImagePullBackOff on a fresh clusterImage source

Training runs, but learns nothing

SymptomPage
Every reward is 0.0 though the grader clearly runsReward always zero
Pod startup creeps 30 s → 100 s+ over hours; throughput tankscgroup / memcg leak
First validation hangs forever; no traceback, no dead nodeFully-async val deadlock
Reward flat while grad_norm is a fraction of baselinetraining_env/fully-async-veomni-reward-flat-three-causes.md

val / eval numbers look wrong

SymptomPage
num_turns is 0 across the whole val passLow val scores §3
Only ~170 of 500 val tasks get scored each timeLow val scores §1
Offline eval disagrees with the reported val numberLow val scores §4
Standalone val_only eval emits garbled output, even for the base modelOffline eval garbled output

Cluster and sandbox

SymptomPage
Remote Docker won't start (FlashInfer / Ray env / docker SDK / compose)Remote Docker pitfalls
nvme at 100% util with no pods being created; load 30+Kyverno I/O storm
Pods stuck ContainerCreating; uv installs storm the diskPod-startup disk bottleneck

Pages by area

Full write-up index

Every incident write-up lives under troubleshooting/ in the repo, filed by the subsystem that owned the bug. Pages above are distillations; these are the originals, with the raw evidence.

training_env/ — trainer, proxy, scaffold

FileWhat it covers
tool-call-parser-mismatch.mdresponse_mask all-zero crash from a parser that doesn't match the model
local-venv-cache.mdcaching the venv on local NVMe to kill the cold-import tax
litellm-rollout-replica-discovery-race.mdhalf the rollout GPUs idle because replica discovery stopped at the first gap (legacy LiteLLM path)
fully-async-val-deadlock-doValidate-blocks-eventloop.mdfirst val hangs forever; do_validate blocks the event loop
fully-async-veomni-reward-flat-three-causes.mdreward won't move: lr=0, gradient starvation, seq-TIS collapse
221-node-oom-disconnect-fullyasync-deadlock.mdnode OOM from unbounded env pods → permanently deadlocked async run
eval-zero-garbage-output-colocated-vllm-moe.mdcolocated vLLM dummy+sleep/wake mis-maps fused MoE weights
reward_drop_analysis_v6_20260612.mdthe v6 reward-drop investigation (trajectory filter, sequence drift)
veomni-engine-setup-and-run-20260610.mdVeOmni engine install + run runbook for qwen3_5_moe
r3-rollout-routing-replay-fsdp-20260608.mdR3 (rollout routing replay) for Qwen3.5-MoE on FSDP
r3-multiturn-routing-loss-20260608.mdrouting values lost across multi-turn replay
r3-routing-coverage-rootcause-fix-20260610.mdrouting-coverage root cause and fix
r3-fsdp-v0.8.0-validated-20260610.mdR3 on verl v0.8.0 FSDP, validated end to end
r3-fsdp-on-v0.8.0-port-handoff-20260610.mdthe port/handoff notes for that migration
r3-fsdp-qwen3moe-enablement-20260616.mdenabling R3 for qwen3_moe on the FSDP engine
r3-dev-shm-sigbus-exhaustion-20260616.mdrouted-experts buffers exhaust /dev/shm → SIGBUS at vLLM startup
ohsdk-agent-name-vs-import-path-20260613.mdOH-SDK all-dummy smoke: agent_name vs import_path
anthropic-proxy-token-fidelity.mdthe token-fidelity rework behind the in-process proxy
cc-fidelity-debug-20260604.mdClaude Code token-fidelity debugging log
cc-prefix-mismatch-subagent-routing-20260605.mdprefix mismatch, sub-agent session collisions, three-layer fix
cc-context-overflow-retry-storm-20260608.md128k context overflow → SDK retry storm; 500 → 400 fast-fail
openhands-ai-qwen3coder-description-param-20260615.mdmodel emits a parameter's description as an argument
pangu92b-vs-qwen35a3b-reward-trend-20260721.mdsystematic comparison of a flat vs rising reward curve

harbor/ — task execution, verifier, grading

FileWhat it covers
swe-rebench-v2-reward-zero.mdbuild-time git clone fails in an egress-less pod → all-zero reward
swerebench-v2-passed-match-grading.mdpassed_match exact grading: a correct fix still scores 0
val-false-zero-diagnosis-and-offline-regrade.mdthe four val fake-zero causes + the offline regrade procedure
val-failures-pythonsafepath-test-sqlite-20260717.mdPYTHONSAFEPATHtest_sqlite side effects; cross-run comparison method
reward-hacking-git-history-leak-and-fix.mdagents recovering the fix from git history; the single-commit rebuild fix
harbor-env-setup-slowdown.mdenv_setup time growing linearly (the cgroup/memcg leak)

k8s/ — cluster and admission

FileWhat it covers
kyverno-webhook-oom-pod-stuck-val-collapse.mdadmission-controller OOM blocks pod creation → fake val collapse
kyverno-reports-controller-issue.mdreports-controller I/O storm hammering etcd
k8s-sandbox-disk-fix.mduv-cache write storm; tmpfs mutation policy
k8s-health-check-indicators.mdthe health baseline to check first
k8s-inline-build-for-selfmade-tasks.mdinline build for self-made SWE tasks
egress-sidecar-netadmin-bash-bug-20260717.mdthe egress-isolation sidecar silently no-oped (no bash in the image)
k8s-1.32-multi-node-setup.mdmulti-node cluster deployment guide
k8s_upgrade_to_1_31.mdsingle-node upgrade record

nydus/ — image distribution

FileWhat it covers
nydus-local-mirror-deploy.mdfull local mirror-registry deployment SOP
nydus-image-cache-on-cpfs.mdcross-node image cache on CPFS
shared-registry-insecure-trust-and-gotchas.mdinsecure trust, probing, autostart — the shared-registry gotchas

docker/ — the Docker backend

FileWhat it covers
remote-docker-backend-setup.mdusing a remote Docker daemon instead of K8s
remote-docker-troubleshooting-20260527.mdthe four startup gotchas, in order

data_collection/ — datasets and inference

FileWhat it covers
openswe-golden-patch-leak-in-verifier.mdinstances that apply the golden patch inside the verifier → reward always 1, zero gradient
openswe_infer_gpu_idle_longtail_barrier.mdinference GPU idling from a batch barrier plus env-start long tail
swerebench_filtered_eval_train_plan.mdthe filtered eval/train selection plan

webui/

FileWhat it covers
dashboard-deployment.mddeploying the dashboard, including the Cloudflare Pages path

Adding a write-up

File it under the subsystem that owned the bug, name it <symptom>-<date>.md, and lead with symptom → root cause → fix. Add a row here; if it recurs across runs or clusters, promote it to a page in this section.

On this page