verl icon indicating copy to clipboard operation
verl copied to clipboard

[Bug][fully_async] Rollouter generation failures can be reported as successful training completion

Open anzhsoft opened this issue 6 months ago • 1 comments

System Info

  • Repository: verl-project/verl
  • Observed on current upstream main
  • Date checked: 2026-05-18
  • Affected code path: verl/experimental/fully_async_policy
  • Affected mode: fully async PPO training
  • Environment specificity: this appears to be an async control-flow and queue-sentinel bug, not a hardware-specific issue.

Information

  • [x] The official example scripts
  • [x] My own modified scripts

Tasks

  • [x] An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • [ ] My own task or dataset (give details below)

Reproduction

A minimal reproduction can be created by injecting a rollout-side failure:

  1. Use a fully async PPO config.
  2. Temporarily make _streaming_generation_main() or _process_single_sample_streaming() raise after startup:
raise RuntimeError("injected rollout failure")
  1. Start training through verl/experimental/fully_async_policy/fully_async_main.py.

Current behavior:

  • _streaming_generation_main() logs the rollout exception.
  • The cleanup path still puts sample=None into the message queue.
  • FullyAsyncRollouter.fit() ignores the exception returned by asyncio.gather(..., return_exceptions=True).
  • FullyAsyncRollouter.fit() returns normally and prints Rollouter fit completed.
  • FullyAsyncTrainer treats sample=None as normal termination.
  • FullyAsyncTaskRunner can print component success.

This is a training-completeness and orchestration correctness issue, not only a logging issue.

If rollout generation fails midway because of a model server crash, agent loop exception, serialization error, data corruption, network issue, or another per-sample processing failure, the job can:

  • stop collecting new rollout samples,
  • stop training earlier than configured,
  • run normal shutdown or validation paths,
  • save or expose a final checkpoint as if training completed normally,
  • return success to Ray / job orchestration,
  • hide infrastructure or rollout-quality failures from automation.

The business value of fixing this is that fully async training becomes fail-closed. Users and schedulers can trust that a successful job status actually means rollout generation and training completed normally, rather than silently accepting incomplete training artifacts.

For long-running distributed RL jobs, this is important because a false successful completion can waste GPU time, produce misleading checkpoints, and pollute downstream evaluation or deployment pipelines.

Expected behavior

  • The rollout failure should propagate through rollouter.fit.remote().
  • The task runner should observe the Ray future failure.
  • The trainer should not treat an abnormal rollout shutdown as normal queue EOF.
  • The whole training job should be marked failed.

anzhsoft avatar May 18 '26 07:05 anzhsoft

Thank you for reporting this async control flow bug.

Root cause analysis:

The sentinel/queue bug you described in is a known issue with the async generation pipeline. When a rollouter fails to generate (e.g., vLLM OOM, decode error), the sentinel value is still placed in the queue, which the trainer interprets as a valid completion.

Immediate workaround:

Until this is fixed in main, you can add a validation step in your training loop to check for sentinel values:

The fix would need to:

  1. Add error handling in the rollouter → queue path
  2. Propagate generation failures as explicit errors rather than silent sentinel
  3. Add a health-check in the trainer to detect and skip failed rollouts

Would you be interested in submitting a PR to fix this? The fix should add proper error propagation in .

Kirrito-k423 avatar May 18 '26 12:05 Kirrito-k423