Skip to content

test_engine_core_proc's immediate-shutdown case is load-dependent: a FIXED 1000-frame budget racing an unbounded producer, and no issue names it #1052

Description

@localai-bot

tests/vllm/v1/test_engine_core_proc.cpp:481, in "EngineCoreProc: immediate
shutdown aborts in-flight requests":

bool abort_seen = false;
for (int i = 0; i < 1000 && !abort_seen; ++i) {
  EngineCoreOutputItem item;
  REQUIRE(client.proc().output_queue.try_get(item));
  ...
}
CHECK(abort_seen);

The request is created with max_tokens=100000 and the busy loop keeps producing
token-delta frames while client.shutdown() propagates. The budget for finding
the abort frame is a FIXED 1000 dequeues. Nothing bounds how many deltas the loop
emits before the shutdown lands, so the budget is a bet on scheduling, and the
bet loses under contention.

Measured on row/LTX25-T2A-ONE-STAGE at 37e680cab, same binary throughout,
CPU-only Release, 20 cores:

Regime Runs Failures
ctest -j4, full 492-test suite 3 2 (CHECK( abort_seen ) is NOT correct!)
the binary alone, idle box (load 3.34) 25 0
the binary alone, 20 spinning processes 25 0
ctest -R '^test_engine_core_proc$' 2 0, Passed 0.03 sec

So it is not reproducible by CPU pressure alone; it needs the -j4 harness, where
other suites contend for the same cores in a different pattern. The third -j4
run failed test_cpu_threadpool INSTEAD, which is on the same load-dependent
list, so the identity of the failing test rotates between runs of an unchanged
binary. Both pass alone with exit 0.

No issue names this test. The PR body of
#1032 attributes its flake to
#294, and #294 is a different
defect in a different test — "test_async_llm: reusing an aborted request id races
the core abort". A misattributed flake is worse than an untracked one: the next
reader who checks the citation finds an open issue about something else and stops
looking.

What would close it. Either drain the queue until it is empty rather than for
1000 frames, or bound the request so the producer cannot outrun the shutdown, or
make the abort frame discoverable regardless of how many deltas precede it. The
test asserts a real guarantee (an in-flight request gets a kAbort finish on
immediate shutdown); the budget is the part that is a guess.

Found while repairing the fresh review of
#1039 on that PR, whose branch
touches no file under tests/vllm/v1/ or src/vllm/v1/. Not fixed there because
it is unrelated engine code. Listed under ## Owed in
.agents/specs/ltx25-t2a-one-stage.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions