Skip to content

test_openai_api_server crashes on Windows with STATUS_STACK_BUFFER_OVERRUN (0xC0000409), unmasked by the #512 fix #584

Description

@localai-bot

Unmasked by the #512 fix (PR #583). Until #583, Invoke-Checked in
scripts/build-windows-release.ps1 rejected the empty argument list before
starting any process, so test_openai_api_server.exe was never executed on
Windows. With that binding defect fixed, the executable runs — and crashes.

Evidence: https://github.com/mudler/vllm.cpp/actions/runs/31667619558/job/94345459323

Exception: D:\a\vllm.cpp\vllm.cpp\scripts\build-windows-release.ps1:31
  31 |          throw "$Program exited with status $exitCode"
     | D:\a\vllm.cpp\vllm.cpp\build-pr-windows-cpu\tests\Release\test_openai_api_server.exe exited with status
     | -1073740791

-1073740791 is 0xC0000409, STATUS_STACK_BUFFER_OVERRUN — the MSVC
/GS security-check / __fastfail path, not an ordinary nonzero test exit.

The process dies before doctest prints a summary. The whole doctest output
in the job is:

[doctest] doctest version is "2.5.2"
[doctest] run with "--help" for options

There is no Status: line and no assertions: line, so this is a hard crash
during or just after the run, not a reported assertion failure. Note that a
green-looking assertions: grep would not have caught it either.

The last request logged before the crash is the oversize-prompt rejection path:

INFO Received request chatcmpl-0 endpoint=/v1/chat/completions model=test-model stream=0 max_tokens=3 msgs=1 tools=0 prompt_chars=220 ...
INFO ERROR request - endpoint=/v1/chat/completions what=The decoder prompt (length 40) is longer than the maximum model length of 32. ...

followed by one more normal request that finishes cleanly, then the crash.
That error path is the most likely place to start, but the ordering is not
proof — the fault may land at process teardown.

This is a Release/NDEBUG build, so an assert would be compiled out; a Debug
Windows arm may localize it faster.

Why this is not a regression from #583

PR #583 changes only scripts/build-windows-release.ps1 — no src/,
include/, or tests/ file is touched. The test binary is built from
unchanged sources. #512 was hiding this crash by preventing the launch.

Scope

windows-msvc-cpu cannot go green until this is fixed. It is distinct from
#512 (PowerShell empty-array binding, fixed in #583) and from #514 (POSIX
setenv/unsetenv C3861, fixed in #578, which fails windows-msvc-vulkan).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions