[GH-ISSUE #1150] GPU test: runtime ctest under Wine 10.0 on Linux (GTX 1050 Ti, NVIDIA 555.58, Parrot/Debian 13) — 92% pass at 3aa97542, 3 hangs classified #27

Open
opened 2026-11-26 20:14:02 +01:00 by 4ld0 · 5 comments
Owner

Originally created by @PierreEbele on GitHub (Nov 24, 2026).
Original GitHub issue: https://github.com/ubiquitarianism/leonida/issues/1150

Setup: Parrot Linux (Debian 13 base), real Plasma X11 session, Intel UHD 630 + GTX 1050 Ti (NVIDIA 555.58; the layer picks the 1050 Ti), Wine 10.0 (10.0~repack-6), WINEPREFIX dedicated, cross-build clang-cl 21.1.8 + lld-link 21 + SDK 10.0.26100 (xwin 0.10.0). No game files at any point. AI-assisted runs; commands below are byte-for-byte what I ran.

Two full baselines, one day apart

main tests verdict
5d74c272 272 217 passed / 14 failed / 3 timeouts / 38 skipped — 94% (984 s)
3aa97542 304 239 passed / 19 failed / 5 timeouts / 40 skipped / 1 disabled — 92% (1111 s)

The 5d74c272..3aa97542 wave added 32 tests and: fixed xdxr_build_check (was hanging, now passes), turned d3d12_dxr_validation_khr into a skip, and healed d3d12_depth_resolve — but brought 10 new failures on this rig (root_sig, xmem, bcrypt_rng + bcrypt_rng_seeded, dstorage, vk_device_filter_tools, d3d12_existing_heap, d3d12_xmem_placed, dxgi_host_parity, dxgi_waitable_latency).

Run: WINEPREFIX="$HOME/.local/share/leonida-wine" ctest --test-dir runtime/build/windows --timeout 120 (the --timeout valve matters — see the hangs).

The 24 failures at 3aa97542, classified

Runtime bugs (our code), reproduced twice (5d74c272 and 3aa97542):

  • d3d12_buffer_tiles, d3d12_texture_tiles — hang: the layer refuses the first UpdateTileMappings ("sparse residency unavailable") while the standalone probe device_sparse_buffer_tiles() accepts, EXPECT fails, and teardown deadlocks on the still-blocked queue (queue->Wait(gate, 1)). Filed on #14.
  • dxgi_host_parity, dxgi_waitable_latency — page fault on write to 0x0 in our 64-bit code; under Wine the attached winedbg turns the crash into a hang. HKCU\Software\Wine\WineDbg ShowCrashDialog=0 in the prefix converts them to clean ~5 s failures. Filed on #14.
  • root_sig — FAIL shim deserializer accepts an all-zero-checksum Xbox blob with the high byte cleared; new test in the wave; a Windows cross-check would confirm it is ours (likely) vs host-serialization chained.

Wine host limits (Windows semantics our tests expect, Wine's host DLLs don't provide):

  • xmem — 5/217 checks, all Windows virtual-memory semantics (protection windows, page charging, read-only faults). New test.
  • file_system — host ReadFile into uncommitted pages doesn't fail ERROR_NO_ACCESS under Wine.
  • bcrypt_rng, bcrypt_rng_seeded — unknown-algorithm probe expects STATUS_NOT_FOUND; the shim delegates to Wine's bcrypt, which answers differently.
  • d3d12_clear, d3d12_clear_formats — "WARP reference unavailable: differential test cannot run" → fail rather than skip; no WARP under Wine/Proton (the dxgi answers hardware instead — the documented Proton caveat).

Host-comparison family (the documented Wine/Proton one; compared against Wine's vkd3d/dxgi here):

  • d3d12_vulkan_device, d3d12_fence_timing, d3d12_residency, d3d12_heap_properties (MISMATCH ours 0xc0 host 0x0), dxgi_swapchain (CreateSwapChainForHwnd … ours 0x887a0001, host 0x00000000), d3d12_subresource_copy, d3d12_r9g9b9e5_uav, d3d12_indirect_dispatch_count.

Test tooling on Linux/Wine:

  • vk_device_filter_tools — runtime/test/check_device_filter_tools.py runs as host python and launches vk_descriptor_bench.exe directly → OSError: [Errno 8] Exec format error; it never goes through Wine. Filed on #14.
  • run_startup_cmdline — the native startup command line fails (tiny_startup_cmdline: FAIL); the known Wine init-message issue (the pre-migration PR that fixed it did not survive the repo move).
  • dstorage — timeout with no further output after the OpenFile: null or empty path probe; not yet classified (needs a targeted WINEDEBUG session).
  • d3d12_existing_heap, d3d12_xmem_placed — new tests in the wave; E_INVALIDARG/heap-placement related, not yet classified.

Reproduction budget

Build ~13 min (cmake + cmake --build --parallel 8), full suite ~16-19 min with --timeout 120 (about 3 extra minutes consumed by the five hangs at 120 s each; halve the ctest --timeout to cut that).

Happy to run any targeted follow-up (WINEDEBUG on dstorage, a -R subset, the winedbg registry tweak) — comment here or on #14.

Originally created by @PierreEbele on GitHub (Nov 24, 2026). Original GitHub issue: https://github.com/ubiquitarianism/leonida/issues/1150 Setup: Parrot Linux (Debian 13 base), real Plasma X11 session, Intel UHD 630 + **GTX 1050 Ti** (NVIDIA 555.58; the layer picks the 1050 Ti), **Wine 10.0** (`10.0~repack-6`), `WINEPREFIX` dedicated, cross-build clang-cl 21.1.8 + lld-link 21 + SDK 10.0.26100 (xwin 0.10.0). No game files at any point. AI-assisted runs; commands below are byte-for-byte what I ran. ## Two full baselines, one day apart | main | tests | verdict | |---|---|---| | `5d74c272` | 272 | 217 passed / 14 failed / 3 timeouts / 38 skipped — 94% (984 s) | | `3aa97542` | 304 | 239 passed / 19 failed / 5 timeouts / 40 skipped / 1 disabled — 92% (1111 s) | The `5d74c272..3aa97542` wave added 32 tests and: fixed `xdxr_build_check` (was hanging, now passes), turned `d3d12_dxr_validation_khr` into a skip, and healed `d3d12_depth_resolve` — but brought 10 new failures on this rig (root_sig, xmem, bcrypt_rng + bcrypt_rng_seeded, dstorage, vk_device_filter_tools, d3d12_existing_heap, d3d12_xmem_placed, dxgi_host_parity, dxgi_waitable_latency). Run: `WINEPREFIX="$HOME/.local/share/leonida-wine" ctest --test-dir runtime/build/windows --timeout 120` (the `--timeout` valve matters — see the hangs). ## The 24 failures at `3aa97542`, classified **Runtime bugs (our code), reproduced twice (5d74c272 and 3aa97542):** - `d3d12_buffer_tiles`, `d3d12_texture_tiles` — hang: the layer refuses the first `UpdateTileMappings` ("sparse residency unavailable") while the standalone probe `device_sparse_buffer_tiles()` accepts, EXPECT fails, and teardown deadlocks on the still-blocked queue (`queue->Wait(gate, 1)`). Filed on #14. - `dxgi_host_parity`, `dxgi_waitable_latency` — page fault on write to 0x0 in our 64-bit code; under Wine the attached winedbg turns the crash into a hang. `HKCU\Software\Wine\WineDbg` `ShowCrashDialog=0` in the prefix converts them to clean ~5 s failures. Filed on #14. - `root_sig` — `FAIL shim deserializer accepts an all-zero-checksum Xbox blob with the high byte cleared`; new test in the wave; a Windows cross-check would confirm it is ours (likely) vs host-serialization chained. **Wine host limits (Windows semantics our tests expect, Wine's host DLLs don't provide):** - `xmem` — 5/217 checks, all Windows virtual-memory semantics (protection windows, page charging, read-only faults). New test. - `file_system` — host `ReadFile` into uncommitted pages doesn't fail `ERROR_NO_ACCESS` under Wine. - `bcrypt_rng`, `bcrypt_rng_seeded` — unknown-algorithm probe expects `STATUS_NOT_FOUND`; the shim delegates to Wine's bcrypt, which answers differently. - `d3d12_clear`, `d3d12_clear_formats` — "WARP reference unavailable: differential test cannot run" → fail rather than skip; no WARP under Wine/Proton (the dxgi answers hardware instead — the documented Proton caveat). **Host-comparison family (the documented Wine/Proton one; compared against Wine's vkd3d/dxgi here):** - `d3d12_vulkan_device`, `d3d12_fence_timing`, `d3d12_residency`, `d3d12_heap_properties` (`MISMATCH ours 0xc0 host 0x0`), `dxgi_swapchain` (`CreateSwapChainForHwnd … ours 0x887a0001, host 0x00000000`), `d3d12_subresource_copy`, `d3d12_r9g9b9e5_uav`, `d3d12_indirect_dispatch_count`. **Test tooling on Linux/Wine:** - `vk_device_filter_tools` — `runtime/test/check_device_filter_tools.py` runs as host python and launches `vk_descriptor_bench.exe` directly → `OSError: [Errno 8] Exec format error`; it never goes through Wine. Filed on #14. - `run_startup_cmdline` — the native startup command line fails (`tiny_startup_cmdline: FAIL`); the known Wine init-message issue (the pre-migration PR that fixed it did not survive the repo move). - `dstorage` — timeout with no further output after the `OpenFile: null or empty path` probe; not yet classified (needs a targeted WINEDEBUG session). - `d3d12_existing_heap`, `d3d12_xmem_placed` — new tests in the wave; E_INVALIDARG/heap-placement related, not yet classified. ## Reproduction budget Build ~13 min (cmake + `cmake --build --parallel 8`), full suite ~16-19 min with `--timeout 120` (about 3 extra minutes consumed by the five hangs at 120 s each; halve the ctest `--timeout` to cut that). Happy to run any targeted follow-up (WINEDEBUG on dstorage, a `-R` subset, the winedbg registry tweak) — comment here or on #14.
Author
Owner

@NinsonD commented on GitHub (Nov 24, 2026):

Thanks @PierreEbele for the detailed testing report and for separating runtime bugs from Wine compatibility issues.

One actionable item that caught my attention is vk_device_filter_tools, where the Python test helper attempts to execute a Windows .exe directly on Linux.

Would it make sense to update the test helper to detect the target executable format and invoke it through Wine when appropriate, while preserving native execution on Windows?

I could help investigate this as a focused cross-platform CI/test-runner improvement, without requiring game assets.

Before starting, I’d like to confirm whether anyone is already working on this particular issue to avoid duplicate efforts.

<!-- gh-comment-id:7143515688 --> @NinsonD commented on GitHub (Nov 24, 2026): Thanks @PierreEbele for the detailed testing report and for separating runtime bugs from Wine compatibility issues. One actionable item that caught my attention is vk_device_filter_tools, where the Python test helper attempts to execute a Windows .exe directly on Linux. Would it make sense to update the test helper to detect the target executable format and invoke it through Wine when appropriate, while preserving native execution on Windows? I could help investigate this as a focused cross-platform CI/test-runner improvement, without requiring game assets. Before starting, I’d like to confirm whether anyone is already working on this particular issue to avoid duplicate efforts.
Author
Owner

@robot00f commented on GitHub (Nov 24, 2026):

Native Windows 10 cross-check on the same GPU model, to separate our bugs from Wine's host limits.

Rig: Windows 10 Pro 19045 (no Wine), Intel i7-2600 + NVIDIA GPU (Pascal class, 4 GB), driver 582.28, Vulkan device 1.4.312. MSVC 19.44/x64, cmake --build --parallel 4, ctest --timeout 120, commit 58be9cdf (main today). 308 tests configured, 307 run, 1 disabled. Nothing of the game at any point.

Result: 279 passed, 47 skipped, 11 failed — 96%, 452 s. No ctest hang at all.

19 of your 24 failures pass natively

They are host limits, not our code: xmem, file_system, bcrypt_rng, bcrypt_rng_seeded, d3d12_clear, d3d12_clear_formats, dxgi_swapchain, dstorage, run_startup_cmdline, vk_device_filter_tools, root_sig, d3d12_residency, d3d12_fence_timing, d3d12_indirect_dispatch_count, d3d12_xmem_placed, and the four hangs d3d12_buffer_tiles, d3d12_texture_tiles, dxgi_host_parity, dxgi_waitable_latency.

So root_sig was Wine's chained serialization, as you guessed; dstorage was not our timeout; the WARP-family failing instead of skipping and the sparse-residency deadlock do not reproduce.

5 do reproduce without Wine (ours)

d3d12_vulkan_device, d3d12_subresource_copy, d3d12_heap_properties (ours 0x8007000e vs host 0x0), d3d12_existing_heap (placed resource in an existing heap unsupported), d3d12_r9g9b9e5_uav (falls back to R32_UINT, then GetResourceAllocationInfo does not know the format).

5 that only fail here, all deterministic 3/3

  • d3d12_subgroup — SEGFAULT, 1.4 s, after device slot 16 (CreateRootSignature).
  • d3d12_set_descriptor_heaps — CHECK failed: !blob.empty() (line 341).
  • d3d12_close_parity — steps differ from the host from the third case on.
  • d3d12_pso_validation — a run of depth-stencil formats logged "not supported" (9999, 39, 53, 44, 19, 28, 41).
  • xdxr_build_check — not a hang: it passes in 212 s with --timeout 400. The 120 s valve is just too short for a DXR build on a 4 GB Pascal card; you passed it under Wine because the path there differs.

The first three were reproduced three times each with --repeat until-fail:3.

Happy to take any of the five on. d3d12_subgroup's crash is the cheapest to chase and would be a hard failure the one-second tests never hit.

<!-- gh-comment-id:7143567952 --> @robot00f commented on GitHub (Nov 24, 2026): Native Windows 10 cross-check on the same GPU model, to separate our bugs from Wine's host limits. **Rig:** Windows 10 Pro 19045 (no Wine), Intel i7-2600 + NVIDIA GPU (Pascal class, 4 GB), driver 582.28, Vulkan device 1.4.312. MSVC 19.44/x64, `cmake --build --parallel 4`, `ctest --timeout 120`, commit `58be9cdf` (main today). 308 tests configured, 307 run, 1 disabled. Nothing of the game at any point. **Result: 279 passed, 47 skipped, 11 failed — 96%, 452 s.** No ctest hang at all. ## 19 of your 24 failures pass natively They are host limits, not our code: `xmem`, `file_system`, `bcrypt_rng`, `bcrypt_rng_seeded`, `d3d12_clear`, `d3d12_clear_formats`, `dxgi_swapchain`, `dstorage`, `run_startup_cmdline`, `vk_device_filter_tools`, `root_sig`, `d3d12_residency`, `d3d12_fence_timing`, `d3d12_indirect_dispatch_count`, `d3d12_xmem_placed`, and the four hangs `d3d12_buffer_tiles`, `d3d12_texture_tiles`, `dxgi_host_parity`, `dxgi_waitable_latency`. So `root_sig` was Wine's chained serialization, as you guessed; `dstorage` was not our timeout; the WARP-family failing instead of skipping and the sparse-residency deadlock do not reproduce. ## 5 do reproduce without Wine (ours) `d3d12_vulkan_device`, `d3d12_subresource_copy`, `d3d12_heap_properties` (ours `0x8007000e` vs host `0x0`), `d3d12_existing_heap` (placed resource in an existing heap unsupported), `d3d12_r9g9b9e5_uav` (falls back to R32_UINT, then `GetResourceAllocationInfo` does not know the format). ## 5 that only fail here, all deterministic 3/3 - `d3d12_subgroup` — **SEGFAULT**, 1.4 s, after `device slot 16 (CreateRootSignature)`. - `d3d12_set_descriptor_heaps` — `CHECK failed: !blob.empty()` (line 341). - `d3d12_close_parity` — steps differ from the host from the third case on. - `d3d12_pso_validation` — a run of depth-stencil formats logged "not supported" (9999, 39, 53, 44, 19, 28, 41). - `xdxr_build_check` — not a hang: it passes in **212 s** with `--timeout 400`. The 120 s valve is just too short for a DXR build on a 4 GB Pascal card; you passed it under Wine because the path there differs. The first three were reproduced three times each with `--repeat until-fail:3`. Happy to take any of the five on. `d3d12_subgroup`'s crash is the cheapest to chase and would be a hard failure the one-second tests never hit.
Author
Owner

@robot00f commented on GitHub (Nov 24, 2026):

Yes to the shape you describe, and nobody has it: I just claimed it as VK-DEVICE-FILTER-WINE in #14.

What I will do, since the split matters more than the detection: runtime/test/check_device_filter_tools.py gets one helper that returns the prefix to run a tool with -- [] on Windows and for a non-PE, wine when the target starts with MZ on a non-Windows host (LEONIDA_WINE overrides the binary name). If the host is not Windows and wine is not installed, the script exits 77 with wine not found instead of pretending the tool failed. Native Windows behaviour is unchanged.

A unit test covers the choice itself with a fake MZ file and a stubbed lookup, so the branch is exercised on Windows CI too, where no wine exists.

One data point for the priority: this test passes on native Windows 10, so it is purely a runner bug, not a tool bug -- the tools are right to be Windows executables.

<!-- gh-comment-id:7143617716 --> @robot00f commented on GitHub (Nov 24, 2026): Yes to the shape you describe, and nobody has it: I just claimed it as `VK-DEVICE-FILTER-WINE` in #14. What I will do, since the split matters more than the detection: `runtime/test/check_device_filter_tools.py` gets one helper that returns the prefix to run a tool with -- `[]` on Windows and for a non-PE, `wine` when the target starts with `MZ` on a non-Windows host (`LEONIDA_WINE` overrides the binary name). If the host is not Windows and wine is not installed, the script exits 77 with `wine not found` instead of pretending the tool failed. Native Windows behaviour is unchanged. A unit test covers the choice itself with a fake `MZ` file and a stubbed lookup, so the branch is exercised on Windows CI too, where no wine exists. One data point for the priority: this test passes on native Windows 10, so it is purely a runner bug, not a tool bug -- the tools are right to be Windows executables.
Author
Owner

@robot00f commented on GitHub (Nov 24, 2026):

Implemented as #1219, in the shape you proposed: launcher() returns []\ on Windows (and for a non-PE), \wine\ for a PE on any other host, LEONIDA_WINE to name another loader. Two tools, not just the devicer that lists, and 77 with \SKIP: ... is not on PATH\ when there is no loader, so a Linux run without wine stops being a failure. Seven unit tests, native behaviour verified unchanged against both real tools.

<!-- gh-comment-id:7143642644 --> @robot00f commented on GitHub (Nov 24, 2026): Implemented as #1219, in the shape you proposed: launcher() returns \[]\ on Windows (and for a non-PE), \wine\ for a PE on any other host, LEONIDA_WINE to name another loader. Two tools, not just the devicer that lists, and 77 with \SKIP: ... is not on PATH\ when there is no loader, so a Linux run without wine stops being a failure. Seven unit tests, native behaviour verified unchanged against both real tools.
Author
Owner

@NinsonD commented on GitHub (Nov 24, 2026):

Nice, that was quick! The launcher approach makes sense, especially handling missing Wine as a skip instead of a test failure.

I noticed the actual Wine run is still untested. Happy to help review that side or check for any Linux edge cases if needed. Thanks for picking this up!

<!-- gh-comment-id:7143742984 --> @NinsonD commented on GitHub (Nov 24, 2026): Nice, that was quick! The launcher approach makes sense, especially handling missing Wine as a skip instead of a test failure. I noticed the actual Wine run is still untested. Happy to help review that side or check for any Linux edge cases if needed. Thanks for picking this up!
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#27
No description provided.