Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#2399·slime

[Bug] Fully-async worker failures never reach the training consumer

Author: heyxingxingCreated Sep 22, 2026Updated Sep 22, 2026

Bug description

At 5bae5bb7928d65906e24e99f5b5d3f99a4daaf93, a fully-async producer failure is logged but not reported to the training-side consumer. _make_done_cb() drops exceptions from generate_and_rm_group(), and _loop() logs data-source exceptions and retries indefinitely. Errors while requeuing an ABORTED group are also swallowed.

The input group has already been consumed. If insufficient valid groups remain, _generate_rollout_async() keeps waiting for rollout_batch_size indefinitely. If other groups succeed, the failed group can instead be silently skipped. An invalid custom-generate/reward configuration therefore does not reliably fail the training job.

Minimal reproduction

In a slime environment, this isolates the real callback and consumer without starting a model or Ray cluster:

python
from types import SimpleNamespace
from unittest.mock import patch
from slime.rollout.fully_async_rollout import AsyncRolloutWorker

with patch("slime.rollout.fully_async_rollout.GenerateState",
           return_value=SimpleNamespace(sampling_params={})):
    worker = AsyncRolloutWorker(SimpleNamespace(n_samples_per_prompt=1),
                                SimpleNamespace(), concurrency=1)

def failed_generation():
    raise ValueError("reward backend failed")

worker._make_done_cb(0)(SimpleNamespace(result=failed_generation))
print(worker.get_completed_groups())  # []: no error reaches the consumer
print(worker.running)                 # True

Expected: the consumer raises with the producer failure as its cause, and the failed worker stops accepting work. Explicitly returned Sample.Status.ABORTED groups should retain their existing retry behavior.

Validation

CPU regression tests using the real worker thread and consumer reproduced timeouts for generation errors, data-source errors, invalid result types, and requeue errors. An additional test reproduced silent replacement of a failed global worker. The initial regression subset on unmodified production code yielded 5 failed, 1 passed; these were assertion/timeout failures, not import failures.

Test environment: macOS arm64, Python 3.12.13, PyTorch 2.14.0, pytest 9.1.1. Producer errors were deliberately injected; no GPU training, live reward service or SGLang server was used. Tests follow the existing CPU suite's import stubs.

Proposed fix

Preserve the first fatal producer error and propagate it from the consumer, stop scheduling additional work, cancel remaining in-flight generations, and avoid silently replacing a failed global worker. Treat intentional shutdown cancellation separately from unexpected task cancellation.

I read CONTRIBUTING.md and searched existing issues/PRs for fully-async exceptions, errors, hangs and aborted groups. The queue/backpressure fix in #2238 and partial-rollout policy discussion in #2092 address different failure paths.

Source: THUDM/slime

View original on GitHubView discussion on GitHub