Skip to content

test(agc): agc_driver_pipelined_dispatch_item fails in about 1 of 70 Windows runs when VirtualAlloc puts its two targets in different 4 GiB regions #9680

Closed

Description

@gdols

What happens

agc_driver_pipelined_dispatch_item sometimes stops before it submits anything: pipelined dispatch: the two targets do not share their high address dword.

Title, test or build step

agc_driver_pipelined_dispatch_item (agc_driver_pipelined_dispatch_tests.exe)

AnyPS5 commit

main d6eafa5

System

Windows 11 Pro 26300, GeForce RTX 3080 (NVIDIA 616.92), WinLibs GCC 15.2.0 r7, Release

Steps to reproduce

Run the test on its own many times, each run in its own ctest call (under a second each):

$env:ANYPS5_REQUIRE_VULKAN = "1"; $env:ANYPS5_NO_SHADER_CACHE = "1"
foreach ($i in 1..100) { ctest --test-dir build -R "^agc_driver_pipelined_dispatch_item$" --output-on-failure }

Log

pipelined dispatch: the two targets do not share their high address dword

What was checked

  • On main d6eafa5 it failed 2 of 100 runs, and 1 of 40 in another batch, always with this message. It also failed once in a parallel ^agc_ run with fix(agc): round 16-bit float image stores toward zero #8998 applied (1 of 20 in isolation there); that PR touches neither this test nor its allocations.
  • NewBlock reserves each 64 KiB block with its own VirtualAlloc. The table rounds alternate between TargetA and TargetB, and TableFills switches the table's buffer descriptor by rewriting only its low dword, so the test needs both targets in the same 4 GiB region and checks that at PipelinedDispatch.cpp:176.
  • With a local fprintf of the six block addresses (not committed), 3 of 279 runs failed. In each, TargetB lands in the next 4 GiB region after a gap, not next to TargetA:
    TargetA=000001bce8dd0000 TargetB=000001bd2b1e0000
    TargetA=000001f5e7280000 TargetB=000001f63d040000
    TargetA=0000024cea1f0000 TargetB=0000024d2c600000
    
    In the three passing runs I printed, the six blocks are consecutive, for example Input=000001d792500000 to TargetB=000001d792550000.
  • No other test has this check (git grep); it came with perf(agc): dispatch-cache recipe hits as ordered commit items #1747.
  • One way out: take both targets from a single VirtualAlloc of three blocks and use two neighbours that don't cross a 4 GiB boundary.
  • Not tried: Linux, where NewBlock uses aligned_alloc.

AI-assisted: yes

Activity

  1. MarcZX10 commented on Oct 22, 2026

    @MarcZX10
    Contributor

    The proposed fix is in open PR #9696. It reserves one contiguous three-block target region, selects an adjacent pair that stays within one 4 GiB address window, and now includes Windows libc linkage plus unwind configuration for the helper test target. The PR author reports Linux coverage; an independent Windows forced-boundary reproduction passed after the change, but the helper target’s MinGW/DWARF link and unwind issue was found in review and is now addressed. I also ran the helper executable locally with GCC 12.2 (-Wall -Wextra -Werror); it passed. I could not run the Vulkan runtime test on this host. Please keep the issue open until the PR’s updated checks and Windows validation complete and the fix reaches main.

  2. MarcZX10 commented on Oct 22, 2026

    @MarcZX10
    Contributor

    I updated #9696 to add the Windows test PATH modification for $<TARGET_FILE_DIR:libc>, matching neighboring libc-linked AGC tests, and merged current upstream main into the branch. New head: f24743f75078980bee1b8b0cc4ac03c8d1903520. I reran the standalone address-window helper test on this head (target address window test passed), plus diff-check and conventions; the full Vulkan dispatch runtime test is not available in this host environment. The PR conventions and labels checks are queued. I attempted the repository’s documented manual build workflow, but GitHub returned HTTP 403 because this account lacks repository admin rights, so no hosted Windows run was dispatched. Please keep the issue open until the Windows CI/test path succeeds and the fix is merged.

  3. MarcZX10 commented on Oct 23, 2026

    @MarcZX10
    Contributor

    The updated #9696 head f24743f75078980bee1b8b0cc4ac03c8d1903520 now has a reported forced-boundary red-to-green run on RTX 3070 and lavapipe, in addition to the focused address-window helper checks. It also adds the Windows libc test PATH setup identified in review. The focused hosted conventions/intake/labels/report checks pass; product jobs are skipped by repository policy. I have not run the Vulkan test locally. Keeping this issue open until the fix merges is still appropriate.

  4. MarcZX10 commented on Oct 23, 2026

    @MarcZX10
    Contributor

    The PR now has independent Windows 11 / MinGW / RTX 3050 results on the updated f24743f750 head: the focused pipelined dispatch test passed 1,000/1,000 on both main and main+PR, and the new address-window helper builds and passes on Windows. This validates the runtime test path but did not reproduce the intermittent failure in the main control, so the forced-boundary Linux red/green remains the direct regression reproduction. #9696 is still open; keeping this issue open until the fix merges is appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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