D3D12.X: preserve a replacement PSO blob when an older read is rejected #2601
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl#2601
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@KOLESNiii on GitHub · 2026-11-26 01:18 UTC · original
Part of #2508 (Pipeline Rebuild). Reviewed on
mainatb49be1836844fe0b0cdb3211dce3cb7fb4e21ac7.The runtime reads a driver blob, calls native PSO creation, and on refusal removes the cache filename. The removal is tied to the path. Another caller can replace that path after the read and before the refusal, so the delayed refusal can delete the replacement. This can leave later creates without the blob that was just published. Compute caller · Disk read, delete and publish helpers
An extracted-helper Linux probe reproduced
read A → publish B at the same path → reject A → B gone. The probe simulates the driver refusal. Add a deterministic regression test that preserves B after rejection of A and still invalidates A if the file has not changed. Account for concurrent processes because offline warming and the runtime can share the cache directory. Check both the runtime invalidation helper and the offline over-cap removal. Offline removal · Original umbrella comment#2426 covers which HRESULTs count as refusal. This issue concerns what happens after a refusal has been established. Windows reproduction, race frequency and timing remain unmeasured.
AI use was OpenAI Codex (GPT-6, exact serving variant unavailable) for static review the Linux probe, and drafting.
@mokkamokacaffe on GitHub · 2026-11-26 02:26 UTC · original
I independently prepared a fix for #2601 before noticing this PR had opened concurrently, so I will not open a competing PR.
One generation-identity edge remains in
invalidate_if_unchanged: byte equality does not prove that the pathname still names the generation that was read. If replacement B is byte-for-byte identical to A, rejection of A still deletes B. The protection also depends on every writer using the new.lockprotocol, which mixed XCL versions do not guarantee.An alternative is to retain the exact file handle used to read A through PSO creation, opened with delete access and
FILE_SHARE_DELETE, then invalidate that file object withFileDispositionInfoExand POSIX delete semantics. This remains correct for identical replacements and non-cooperating writers and does not add persistent lock files.I have an unsubmitted reference implementation and an identical-byte cross-process regression here:
github.com/mokkamokacaffe/xcl@06d08685e6That branch has only passed Windows-target compilation from Linux, whereas this PR has real Windows/AMD execution, so I am offering it as a design/test contribution rather than claiming it is better validated.
AI-assisted review: OpenAI Codex (GPT-6.2 Astra, Ultra reasoning).