Skip to content

diag(B): test OpenMP-ON hypothesis for the MSVC barrier deadlock #5

diag(B): test OpenMP-ON hypothesis for the MSVC barrier deadlock

diag(B): test OpenMP-ON hypothesis for the MSVC barrier deadlock #5

Workflow file for this run

name: diag-b
# One-off diagnostic for known-issues.md "B": the Windows/MSVC integer
# divide-by-zero (STATUS_INTEGER_DIVIDE_BY_ZERO, 0xC0000094) that faults ANY
# whisper run on Windows (not just a cancelled one). Builds the C++ whisper
# e2e test in the SAME codegen as the failing cargo build — CMAKE_BUILD_TYPE=
# Release (the -sys build.rs pins cfg.profile("Release")) — plus /Z7 embedded
# CodeView and a linker /DEBUG so the exe carries a PDB, then runs a PLAIN
# transcription (no cancel) two ways:
# 1. in-process: TRANSCRIBE_DIAG_FAULT_TRACE=1 installs a vectored exception
# handler that symbolizes the faulting IP + stack via DbgHelp. Needs no
# external debugger on the runner.
# 2. under cdb if the Windows SDK debugger is present (belt-and-suspenders).
#
# Push-triggered (workflow_dispatch won't fire from a non-default branch) and
# path-scoped so it only runs when the diagnostic itself changes.
#
# DELETE this workflow, the dbghelp link, and the TRANSCRIBE_DIAG_FAULT_TRACE
# block in tests/whisper_e2e_smoke.cpp once "B" is fixed.
on:
push:
branches: [rust-bindings]
paths:
- ".github/workflows/diag-b.yml"
- "tests/whisper_e2e_smoke.cpp"
- "tests/CMakeLists.txt"
- "src/arch/whisper/**"
- "src/transcribe-mel.cpp"
- "src/transcribe.cpp"
- "include/transcribe.h"
concurrency:
group: diag-b-${{ github.ref }}
cancel-in-progress: true
jobs:
diag:
name: diag-b (windows)
runs-on: blacksmith-2vcpu-windows-2025
timeout-minutes: 40
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v8.2.0
- name: Set up MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Install build deps
shell: pwsh
run: |
choco install ninja --no-progress -y
vcpkg install zlib:x64-windows-static-md
$zlibPrefix = "$env:VCPKG_INSTALLATION_ROOT/installed/x64-windows-static-md" -replace '\\','/'
Add-Content $env:GITHUB_ENV "CMAKE_PREFIX_PATH=$zlibPrefix"
- uses: ./.github/actions/fetch-canary
with:
hf-token: ${{ secrets.HF_TOKEN }}
- name: Configure + build the e2e test (Release codegen + /Z7 symbols)
# pwsh, not bash: Git Bash's MSYS layer rewrites leading-slash args like
# /Z7 and /DEBUG into Windows paths (C:/Program Files/Git/Z7), which
# breaks the compiler/linker flags. PowerShell passes them verbatim.
shell: pwsh
run: |
# Release == the failing cargo build's native codegen. /Z7 embeds
# CodeView in each .obj (Ninja-safe, no /Zi PDB contention); /DEBUG
# makes the linker emit a merged exe PDB so file:line resolves for
# both transcribe and ggml frames. advapi32 for ggml-cpu's registry
# CPU probe (the static consumer must pull it; F is fixed so the
# header no longer forces dllimport).
# HYPOTHESIS TEST: OpenMP ON -> ggml uses `#pragma omp barrier` instead
# of its custom spin-barrier (which deadlocks under MSVC). MSVC
# auto-links vcomp, so the GNU/Clang -fopenmp propagation issue that
# forced OpenMP off (f35e899) does not apply here.
cmake -B build-diag -G Ninja `
-DCMAKE_BUILD_TYPE=Release `
"-DCMAKE_C_FLAGS=/Z7" "-DCMAKE_CXX_FLAGS=/Z7" `
"-DCMAKE_EXE_LINKER_FLAGS=/DEBUG advapi32.lib" `
-DTRANSCRIBE_BUILD_REAL_MODEL_TESTS=ON `
-DTRANSCRIBE_USE_OPENMP=ON
if ($LASTEXITCODE -ne 0) { throw "cmake configure failed" }
cmake --build build-diag --target transcribe_whisper_e2e_smoke -j
if ($LASTEXITCODE -ne 0) { throw "cmake build failed" }
- name: Run with watchdog (÷0 trace + hang thread-dump; cdb absent on runner)
shell: pwsh
run: |
$env:TRANSCRIBE_WHISPER_MODEL = $env:TRANSCRIBE_SMOKE_MODEL
# Fault trace catches any int-÷0 (now fixed); the watchdog dumps every
# thread's stack after 60 s so the post-fix Windows hang is localized.
$env:TRANSCRIBE_DIAG_FAULT_TRACE = "1"
$env:TRANSCRIBE_DIAG_WATCHDOG_SEC = "60"
$exe = (Get-ChildItem -Recurse -Filter transcribe_whisper_e2e_smoke.exe build-diag | Select-Object -First 1).FullName
Write-Host "exe: $exe"
Write-Host "model: $env:TRANSCRIBE_WHISPER_MODEL"
Write-Host "===== run (60s watchdog) ====="
& $exe
Write-Host "exit code: $LASTEXITCODE (0 completed | 94 int-÷0 | 95 watchdog hang-dump)"
exit 0