xcrdapi: cancel reads already taken off the queue, and say why a read failed #365
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/365"
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?
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-28T04:00:18Z.
Fault.
CancelRequestsWithTagonly marked requests still waiting in the queue. The storage worker takes up to 256 consecutive reads off the queue at a time, so cancelling a read that was already running had no effect. If its destination was then freed, it failed and reported the failure. The GDK says "A cancelled request is not counted as a failure."Change
TUXBOX_XCRD_LOG=1, the per-option counters also count cancelled reads.Why now. The first ProjectScarlett run with
TUXBOX_XCRD_LOG=1(RTX 5090, after #345) showed most failures in one burst:Those requests were small (about 12–13 KB each). Our decoders inflate all 73,828 small zlib chunks from the title's texture pools to their listed size, and the request layout matches the GDK. So whether this cancellation bug explains the burst isn't shown yet. The new reason lines will settle it in the next run.
Tests
main("a read cancelled while running is not a failure") and passes 5 of 5 with the change. The receipt is nowcancellation=2.python tuxbox.py check --no-gpu: passed.python tuxbox.py verify --only xcrdapi: passed on an AMD Raphael iGPU (1002:13c0, RADV) and an RTX 5090 (10de:2b85, 620.70.10), GE-Proton11-14. xcrdapi has no GPU code, so no other suite is affected.🤖 Generated with Claude Code