[PR #2196] image_fuzz: separate harness errors and retry fatal pre-device startup once #2200

Open
opened 2026-11-26 21:20:23 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/2196
Author: @whoalin1
Created: 11/26/2026
Status: 🔄 Open

Base: main ← Head: image-fuzz-harness-error-exit


📝 Commits (2)

  • b7cea7a image_fuzz: report harness errors separately from pixel mismatches
  • 6f6865c image_fuzz: retry fatal pre-device harness startup once

📊 Changes

2 files changed (+111 additions, -15 deletions)

View changed files

📝 tests/test_image_fuzz.py (+73 -5)
📝 tools/image_fuzz.py (+38 -10)

📄 Description

Claimed in the coordination issue as TEST-IMAGE-FUZZ-HARNESS-ERROR-EXIT (comment 7183240033).

What

tools/image_fuzz.py documents exit 2 for setup/harness errors, but a nonzero vk_image_fuzz exit shared run_case's False result with real pixel mismatches. The fuzzer therefore counted a driver/loader crash as a translator mismatch and exited 1.

This keeps the detailed harness failure line unchanged, returns a distinct HARNESS_ERROR sentinel, counts harness errors separately, and preserves exit 2 as the dominant status. Hardware-oracle reporting also names the translator-side outcome as a harness error instead of falling through raw.

Found while triaging an intermittent pre-device validation-loader crash on the AMD RDNA2 iGPU: the fuzzer reported it as a translator mismatch even though the harness never produced results.

Tested

  • python -m compileall -q tools/image_fuzz.py tests/test_image_fuzz.py — PASS
  • python -m pytest -q tests/test_image_fuzz.py tests/test_image_fuzz_hw.py tests/test_image_fuzz_work_isolation.py tests/test_build_runtime_fallback.py — 105 passed, 6 skipped, 16 subtests passed
  • python -I tools/image_fuzz.py --self-test — PASS

No game data or GPU required for these tests.

AI-assisted.

Consolidated retry behavior

This branch now also contains the pre-device startup retry formerly opened as #2202. vk_image_fuzz is retried exactly once only when it dies with a fatal process status before printing its device: line; at that point shader-module creation has not happened, so the shader under test cannot have caused the crash. Ordinary exit 1/2 results, post-device crashes, skips, and persistent startup failures are not hidden.

The retry portion was validated on the AMD RDNA2 validation/pc-tail setup: a fresh seed-20 campaign hit the intermittent pre-device 0xc000041d four times, each retry succeeded, and the campaign completed 20/20 match with exit 0. The branch head is exactly the previously reviewed #2202 head (6f6865c9a).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/2196 **Author:** [@whoalin1](https://github.com/whoalin1) **Created:** 11/26/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `image-fuzz-harness-error-exit` --- ### 📝 Commits (2) - [`b7cea7a`](https://github.com/ubiquitarianism/leonida/commit/b7cea7ad9ac999444959e28b54fbab4cded84d32) image_fuzz: report harness errors separately from pixel mismatches - [`6f6865c`](https://github.com/ubiquitarianism/leonida/commit/6f6865c9a0a5d9b714c6ec0b54d827f96b5793be) image_fuzz: retry fatal pre-device harness startup once ### 📊 Changes **2 files changed** (+111 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_image_fuzz.py` (+73 -5) 📝 `tools/image_fuzz.py` (+38 -10) </details> ### 📄 Description Claimed in the coordination issue as `TEST-IMAGE-FUZZ-HARNESS-ERROR-EXIT` (comment 7183240033). ## What `tools/image_fuzz.py` documents exit 2 for setup/harness errors, but a nonzero `vk_image_fuzz` exit shared `run_case`'s `False` result with real pixel mismatches. The fuzzer therefore counted a driver/loader crash as a translator mismatch and exited 1. This keeps the detailed harness failure line unchanged, returns a distinct `HARNESS_ERROR` sentinel, counts harness errors separately, and preserves exit 2 as the dominant status. Hardware-oracle reporting also names the translator-side outcome as a harness error instead of falling through raw. Found while triaging an intermittent pre-device validation-loader crash on the AMD RDNA2 iGPU: the fuzzer reported it as a translator mismatch even though the harness never produced results. ## Tested - `python -m compileall -q tools/image_fuzz.py tests/test_image_fuzz.py` — PASS - `python -m pytest -q tests/test_image_fuzz.py tests/test_image_fuzz_hw.py tests/test_image_fuzz_work_isolation.py tests/test_build_runtime_fallback.py` — **105 passed, 6 skipped, 16 subtests passed** - `python -I tools/image_fuzz.py --self-test` — PASS No game data or GPU required for these tests. AI-assisted. ## Consolidated retry behavior This branch now also contains the pre-device startup retry formerly opened as #2202. `vk_image_fuzz` is retried exactly once only when it dies with a fatal process status before printing its `device:` line; at that point shader-module creation has not happened, so the shader under test cannot have caused the crash. Ordinary exit 1/2 results, post-device crashes, skips, and persistent startup failures are not hidden. The retry portion was validated on the AMD RDNA2 validation/pc-tail setup: a fresh seed-20 campaign hit the intermittent pre-device `0xc000041d` four times, each retry succeeded, and the campaign completed 20/20 match with exit 0. The branch head is exactly the previously reviewed #2202 head (`6f6865c9a`). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#2200
No description provided.