startup-runtime: loading-phase DirectStorage requests read past a file end and at non-zlib data #1191

Open
opened 2026-11-24 03:29:31 +00:00 by denn0x · 38 comments
denn0x commented 2026-11-24 03:29:31 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by denn0x on 2026-11-24T03:29:31Z.


During heavy loading, a console executable starts sending DirectStorage requests whose source ranges do not hold zlib data. They fail by the thousand, and the run ends a few minutes later.

Observed (local build of the #1135 stand-ins with a per-request trace; 284 s run, Windows 11 26300):

  • 71,000 requests in total. The first 43,200 all succeed (plain reads, zlib, multi-page zlib pieces, BCPack zero-filled per #1139).
  • The first failure is a file request whose offset equals the file's size exactly, and whose source size is not plausible (0x98cabbec in one run, 0xd508a3ec in another). The same request, at the same offset, comes first in every run; only the size differs. A size that varies between runs suggests the executable read it from memory that was never written.
  • After it, about 19,000 zlib requests (options 0x200001) on four texture archives fail. Each request's offset plus its size, rounded up to 0x100, is the next request's offset, so the index the executable uses agrees with itself. But the bytes at those offsets are not a zlib stream. The nearest valid stream is several KiB away, and no other file the executable opened has a zlib stream at the same position.
  • Good and bad requests have the same request shape. Fields +0x14, +0x1c and +0x34 to +0x47 are all zero in both groups.
  • Every "inflated (short)" request (a zlib stream that ends before the destination size) has the same source layout: one zlib stream, zero padding up to a 0x100 boundary, then further streams. The stand-in stops after the first stream and leaves the rest of the destination unwritten. If the executable expects all of it, that would explain an index that is uninitialised by the time it is read.

Hypotheses, in order

  1. Short requests should inflate every 0x100-aligned stream in the source into the destination (multi-stream), not just the first. Not yet consistent: some short requests reach a non-zlib block partway through, and some decode to more than the destination size.
  2. Something earlier in the queue (multi-page piece slicing, or the BCPack zero-fill) gives the executable the wrong bytes for an index block.

Done when a source-built fixture pins the multi-stream layout (or rules it out), and a run past the loading screen shows no requests reading beyond the end of a file.

Related: #1144 (multi-page zlib), #1139 (BCPack), #1136.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6573963274 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198). Originally posted by [denn0x](https://github.com/denn0x) on 2026-11-24T03:29:31Z. --- During heavy loading, a console executable starts sending DirectStorage requests whose source ranges do not hold zlib data. They fail by the thousand, and the run ends a few minutes later. **Observed** (local build of the #1135 stand-ins with a per-request trace; 284 s run, Windows 11 26300): - 71,000 requests in total. The first 43,200 all succeed (plain reads, zlib, multi-page zlib pieces, BCPack zero-filled per #1139). - The first failure is a file request whose offset equals the file's size exactly, and whose source size is not plausible (0x98cabbec in one run, 0xd508a3ec in another). The same request, at the same offset, comes first in every run; only the size differs. A size that varies between runs suggests the executable read it from memory that was never written. - After it, about 19,000 zlib requests (options `0x200001`) on four texture archives fail. Each request's offset plus its size, rounded up to 0x100, is the next request's offset, so the index the executable uses agrees with itself. But the bytes at those offsets are not a zlib stream. The nearest valid stream is several KiB away, and no other file the executable opened has a zlib stream at the same position. - Good and bad requests have the same request shape. Fields +0x14, +0x1c and +0x34 to +0x47 are all zero in both groups. - Every "inflated (short)" request (a zlib stream that ends before the destination size) has the same source layout: one zlib stream, zero padding up to a 0x100 boundary, then further streams. The stand-in stops after the first stream and leaves the rest of the destination unwritten. If the executable expects all of it, that would explain an index that is uninitialised by the time it is read. **Hypotheses, in order** 1. Short requests should inflate every 0x100-aligned stream in the source into the destination (multi-stream), not just the first. Not yet consistent: some short requests reach a non-zlib block partway through, and some decode to more than the destination size. 2. Something earlier in the queue (multi-page piece slicing, or the BCPack zero-fill) gives the executable the wrong bytes for an index block. **Done when** a source-built fixture pins the multi-stream layout (or rules it out), and a run past the loading screen shows no requests reading beyond the end of a file. Related: #1144 (multi-page zlib), #1139 (BCPack), #1136. AI-assisted (Claude Code).
denn0x commented 2026-11-24 06:50:18 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by denn0x on 2026-11-24T04:19:30Z.


Measured cause of almost all of the failing zlib requests: the request offset is a multiple of 64 KiB past a valid stream.

Method: with a per-request trace (full 0x48-byte request and outcome), each zlib request on an RDS5 archive was matched against the archive's own boundary table. That table gives each interval's stored offset, stored size, trailing-byte count, decoded size and codec. A request matches an interval when source size == stored size - trailing bytes and offset - interval start is 4 KiB aligned.

One run, about 30k zlib requests on RDS5 archives:

outcome offset − interval start destination size == interval decoded size requests
failed 14 × 64 KiB yes 19,393
inflated 0 yes 9,153
inflated (stream piece) 0 … 3 × 64 KiB no (one 64 KiB piece of a 256 KiB stream) ~1,040
failed 1 … 13 × 64 KiB mixed ~40
  • All 19,393 shifted failures come from one family of four archives. Those archives also have about 140 requests each at shift 0 that succeed, including inside the offset ranges where the shifted ones fall. So the shift belongs to particular requests, not to the file layout.
  • At the shifted offset the bytes are not zlib, in this or in any other archive of the package (checked at every failing offset).
  • At offset − 14 × 64 KiB there is a stream of exactly the source size, with a valid Adler-32, that inflates to exactly the destination size.
  • The "stream piece" requests (one stream fetched as several destination-sized pieces) are the same pattern with small k. Pieces 2 and 3 failed only when the stream was no longer in the stand-in's 16-entry cache.

Why the executable adds the shift is not known. The request fields at +0x10, +0x34, +0x38 and +0x40 do not carry it. A local experiment resolves such requests by looking back in 64 KiB steps for a stream that verifies and has the right decoded size. That is a workaround, not a fix: it is not proposed for merge. The useful next step is finding where the executable computes the offset for these requests.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7121913815 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7121913815). Originally posted by [denn0x](https://github.com/denn0x) on 2026-11-24T04:19:30Z. --- Measured cause of almost all of the failing zlib requests: **the request offset is a multiple of 64 KiB past a valid stream.** Method: with a per-request trace (full 0x48-byte request and outcome), each zlib request on an RDS5 archive was matched against the archive's own boundary table. That table gives each interval's stored offset, stored size, trailing-byte count, decoded size and codec. A request matches an interval when `source size == stored size - trailing bytes` and `offset - interval start` is 4 KiB aligned. One run, about 30k zlib requests on RDS5 archives: | outcome | offset − interval start | destination size == interval decoded size | requests | |---|---|---|---| | failed | 14 × 64 KiB | yes | 19,393 | | inflated | 0 | yes | 9,153 | | inflated (stream piece) | 0 … 3 × 64 KiB | no (one 64 KiB piece of a 256 KiB stream) | ~1,040 | | failed | 1 … 13 × 64 KiB | mixed | ~40 | - All 19,393 shifted failures come from one family of four archives. Those archives also have about 140 requests each at shift 0 that succeed, including inside the offset ranges where the shifted ones fall. So the shift belongs to particular requests, not to the file layout. - At the shifted offset the bytes are not zlib, in this or in any other archive of the package (checked at every failing offset). - At `offset − 14 × 64 KiB` there is a stream of exactly the source size, with a valid Adler-32, that inflates to exactly the destination size. - The "stream piece" requests (one stream fetched as several destination-sized pieces) are the same pattern with small k. Pieces 2 and 3 failed only when the stream was no longer in the stand-in's 16-entry cache. Why the executable adds the shift is not known. The request fields at +0x10, +0x34, +0x38 and +0x40 do not carry it. A local experiment resolves such requests by looking back in 64 KiB steps for a stream that verifies and has the right decoded size. That is a workaround, not a fix: it is not proposed for merge. The useful next step is finding where the executable computes the offset for these requests.
R0Y00 commented 2026-11-24 06:50:26 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T05:23:10Z.


The chunked-stream and destination-capacity fixes are on main via #1214 (0fa43ad6). The source-built test checks short final slices, bad zlib checksums and two queued submissions with matching offsets. The unrelated second submission fails and leaves its destination unchanged. This covers the known continuation shape.

For the remaining report, please retry from 0fa43ad6 or later with the same configuration and record the first failed request category, whether it still begins at EOF, and totals grouped by EOF, decode failure and capacity rejection. A new trace is needed to tell whether the aligned multi-stream layout still occurs. Please keep raw inputs and traces local.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7122897734 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7122897734). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T05:23:10Z. --- The chunked-stream and destination-capacity fixes are on main via #1214 (0fa43ad6). The source-built test checks short final slices, bad zlib checksums and two queued submissions with matching offsets. The unrelated second submission fails and leaves its destination unchanged. This covers the known continuation shape. For the remaining report, please retry from 0fa43ad6 or later with the same configuration and record the first failed request category, whether it still begins at EOF, and totals grouped by EOF, decode failure and capacity rejection. A new trace is needed to tell whether the aligned multi-stream layout still occurs. Please keep raw inputs and traces local.
R0Y00 commented 2026-11-24 07:00:46 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T06:56:32Z.


Independent Windows retest of the 14-page shift reported above. At the start of each of eight affected queues, the first request of a new submission already carried the extra 896 KiB. All eight requested a 1 MiB destination at page offset zero. Later source offsets advanced by the preceding compressed length rounded to 256 bytes. The same four file objects also served ordinary unshifted reads. This narrows the trace target to the construction of the first request in a batch.

Independent retest welcome: compare one ordinary batch and one affected batch. Record the source offset before enqueue and at execution, destination page offset, compressed length, and whether the range matches the container directory. Please report the build and aggregate result only. The main development session is tracing the first offset producer. #1285 addresses the separate allocation before a read past EOF.

Source-built layout comparison on Windows, PR #1311, commit 976540cc. For the 1024 x 1024 nine-mip BC7 fixture in 64 KiB standard mode, the old slot 10 implementation reported the first three mip starts at 4 KiB page indices 0, 256, 320. The candidate returns 96, 32, 16, with the packed tail at page 0. Both cover 352 pages. At 1024 x 512 the total changes from 176 to 192 pages. Neither fixture result produces the anomalous page count 0xFFC0 on its own. The loading observations above used a modified local diagnostic executable. The relationship between the layout change and a loading outcome remains unverified.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7124449287 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7124449287). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T06:56:32Z. --- Independent Windows retest of the 14-page shift reported above. At the start of each of eight affected queues, the first request of a new submission already carried the extra 896 KiB. All eight requested a 1 MiB destination at page offset zero. Later source offsets advanced by the preceding compressed length rounded to 256 bytes. The same four file objects also served ordinary unshifted reads. This narrows the trace target to the construction of the first request in a batch. Independent retest welcome: compare one ordinary batch and one affected batch. Record the source offset before enqueue and at execution, destination page offset, compressed length, and whether the range matches the container directory. Please report the build and aggregate result only. The main development session is tracing the first offset producer. #1285 addresses the separate allocation before a read past EOF. Source-built layout comparison on Windows, [PR #1311](https://github.com/R0Y00/Xbox2Windows/pull/1311), commit `976540cc`. For the 1024 x 1024 nine-mip BC7 fixture in 64 KiB standard mode, the old slot 10 implementation reported the first three mip starts at 4 KiB page indices 0, 256, 320. The candidate returns 96, 32, 16, with the packed tail at page 0. Both cover 352 pages. At 1024 x 512 the total changes from 176 to 192 pages. Neither fixture result produces the anomalous page count 0xFFC0 on its own. The loading observations above used a modified local diagnostic executable. The relationship between the layout change and a loading outcome remains unverified.
R0Y00 commented 2026-11-24 09:04:43 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T08:08:08Z.


Two saved diagnostic runs contain 88,678 and 86,734 requests. Across all 175,412, the source offset, compressed length and destination capacity agree between enqueue and worker execution. Each run had eight affected batches whose first request already carried the offset discrepancy. Successful first requests also use the same enqueue call stack. The closest successful control matches the failing request's destination size, page offset and options, but uses a different file.

The next useful observation is upstream of enqueue. For the first two entries in an affected batch and an ordinary batch, correlate the selected file/directory entry, its absolute physical offset, the batch base and entry delta (including units), and the resulting byte offset. A same-file control would let us test file selection as well as arithmetic. The existing traces record only the final offset. These observations come from modified diagnostic builds.

PR #1323 supplies a source-built Windows queue control: the shifted request can select a different valid compressed stream and still report success. Please retain the byte comparison when reproducing. An aggregate result is sufficient.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7125766563 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7125766563). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T08:08:08Z. --- Two saved diagnostic runs contain 88,678 and 86,734 requests. Across all 175,412, the source offset, compressed length and destination capacity agree between enqueue and worker execution. Each run had eight affected batches whose first request already carried the offset discrepancy. Successful first requests also use the same enqueue call stack. The closest successful control matches the failing request's destination size, page offset and options, but uses a different file. The next useful observation is upstream of enqueue. For the first two entries in an affected batch and an ordinary batch, correlate the selected file/directory entry, its absolute physical offset, the batch base and entry delta (including units), and the resulting byte offset. A same-file control would let us test file selection as well as arithmetic. The existing traces record only the final offset. These observations come from modified diagnostic builds. [PR #1323](https://github.com/R0Y00/Xbox2Windows/pull/1323) supplies a source-built Windows queue control: the shifted request can select a different valid compressed stream and still report success. Please retain the byte comparison when reproducing. An aggregate result is sufficient.
R0Y00 commented 2026-11-24 09:04:43 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T08:09:16Z.


#1323 is now on main at e3193607. I independently reran the two Windows Release storage tests, including both generated archive sizes. A shifted first offset can read a different valid page and return S_OK; the shifted request past EOF fails without modifying its destination, and the following correct request still succeeds. The remaining question is which caller first supplies an offset different from the archive directory, so #1198 stays open.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7125789412 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7125789412). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T08:09:16Z. --- #1323 is now on main at e3193607. I independently reran the two Windows Release storage tests, including both generated archive sizes. A shifted first offset can read a different valid page and return S_OK; the shifted request past EOF fails without modifying its destination, and the following correct request still succeeds. The remaining question is which caller first supplies an offset different from the archive directory, so #1198 stays open.
R0Y00 commented 2026-11-24 09:04:45 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T08:33:58Z.


#1331 is on main at 728e41db. On RTX 4060 Laptop and WARP, the native, mapped and AOT runners agreed on the two requested ranges, queue status, decoded pages and full synthetic BC7 output. Shifting just the first request changed 8,192 of 16,384 pixels with both requests still reporting success. The independent AOT-only mutation was also caught at the first request. This strengthens the offset differential; identifying the producer in the reported startup remains open here.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7126289520 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7126289520). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T08:33:58Z. --- #1331 is on main at 728e41db. On RTX 4060 Laptop and WARP, the native, mapped and AOT runners agreed on the two requested ranges, queue status, decoded pages and full synthetic BC7 output. Shifting just the first request changed 8,192 of 16,384 pixels with both requests still reporting success. The independent AOT-only mutation was also caught at the first request. This strengthens the offset differential; identifying the producer in the reported startup remains open here.
R0Y00 commented 2026-11-24 09:04:46 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T08:40:38Z.


We found same-file controls for entries after the batch head in both saved diagnostic traces. For each distinct failed zlib request, we searched the successful requests in that same run for the same volume, file ID, compressed length, destination capacity and options, with the source offset exactly 896 KiB lower. We also required a successful destination write and an inflated byte count equal to capacity.

This found 83 distinct matched ranges in one run and 77 in the other, spanning all four affected files in each. There are 63 ranges common to both runs. No failing batch head has such a match. These pairs provide observed successful reads for checking the producer's entry selection. They still do not identify the arithmetic that produced the first offset, or justify applying a constant correction to general reads.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7126425556 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7126425556). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T08:40:38Z. --- We found same-file controls for entries after the batch head in both saved diagnostic traces. For each distinct failed zlib request, we searched the successful requests in that same run for the same volume, file ID, compressed length, destination capacity and options, with the source offset exactly 896 KiB lower. We also required a successful destination write and an inflated byte count equal to capacity. This found 83 distinct matched ranges in one run and 77 in the other, spanning all four affected files in each. There are 63 ranges common to both runs. No failing batch head has such a match. These pairs provide observed successful reads for checking the producer's entry selection. They still do not identify the arithmetic that produced the first offset, or justify applying a constant correction to general reads.
R0Y00 commented 2026-11-24 10:02:39 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T09:15:44Z.


For contributors following the loading-to-menu work, please link an existing producer-side fix or a source-built reproduction here if you have one. The useful comparison is the directory entry chosen by the reader, the base and relative offset used to form the request, and the offset received by the queue. A synthetic archive with two distinguishable records is sufficient. Main-menu navigation retests are being coordinated in #870.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7127171968 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7127171968). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T09:15:44Z. --- For contributors following the loading-to-menu work, please link an existing producer-side fix or a source-built reproduction here if you have one. The useful comparison is the directory entry chosen by the reader, the base and relative offset used to form the request, and the offset received by the queue. A synthetic archive with two distinguishable records is sufficient. Main-menu navigation retests are being coordinated in #870.
R0Y00 commented 2026-11-24 10:02:40 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T09:28:18Z.


#1353 is on main at 4b166b7d. The source-built native, mapped and AOT readers now request and decompress a complete sixteen-page record, then select the page within it. The single-page and sixteen-page cases passed on RTX 4060 Laptop and WARP. This supplies a reusable producer-to-queue control for the reported loading failure. The actual failing producer and its offset/count remain open here.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7127458937 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7127458937). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T09:28:18Z. --- #1353 is on main at 4b166b7d. The source-built native, mapped and AOT readers now request and decompress a complete sixteen-page record, then select the page within it. The single-page and sixteen-page cases passed on RTX 4060 Laptop and WARP. This supplies a reusable producer-to-queue control for the reported loading failure. The actual failing producer and its offset/count remain open here.
mumba17 commented 2026-11-24 10:02:42 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by mumba17 on 2026-11-24T09:46:44Z.


Storage observations after confirming first-run setup, as asked on #870. Setup: RTX 3090, Ryzen 5 5600X, Windows 11 build 26300, release, the same launcher options as my #870 report. I applied one local diagnostic to xcrdapi.cpp with no behaviour change: a count of failed requests per outcome string, plus one line per "destination capacity exceeded" request recording its option bits and sizes. Only shapes and counts are below.

First failed request class after confirm: destination capacity exceeded. Cumulative failed requests by outcome:

Build While on the setup pages About 10 s after confirm Afterwards
e1316e1c (main) capacity exceeded 15, zlib failed 2 capacity exceeded 144, zlib failed 4 flat: 5 more requests in the next 40 s; frames keep presenting until stopped at 312 s, with no fault; 7 Device::slot70 unsupported memory SRV arguments lines, the path in triggered02's 09:37 report
4b166b7d + #1336 bcpack failed 13, capacity exceeded 15, zlib failed 2 bcpack failed 36→1,603, capacity exceeded 141→805, zlib failed 4→17,174 within 20 s: zlib failed 78,725, bcpack failed 5,699, read failed 156, zero page tokens at enqueue 28,142; then a fault

Shape of the capacity-exceeded requests (554 logged across both builds, the same in each):

  • every one has zlib set, no BCPack format, a page-token destination (bit 21) and a file source;
  • the field at +0x38 (read as the uncompressed size) is 0 in every one;
  • the destination size is a multiple of 4 KiB from 0x1000 to 0xF000;
  • the stream inflates to more than that: mostly 0x10000 or 0x20000, otherwise 0x8000, 0x3000, 0x40000 or 0x80000, which is 2 to 16 times the destination;
  • 395 of 400 source offsets are not 64 KiB-aligned;
  • they arrive in bursts of up to 169 per submission;
  • none was served by the chunked-stream cache from #1214. In each, the inflated stream was larger than the destination and no continuation request was found.

Read together, this looks like a request asking for a window of a larger compressed record. That would make it the same shape as the whole-record-then-select-a-page control in #1353, with the page offset carried somewhere the stand-in doesn't read yet. That's a hypothesis only. I didn't identify the field.

With #1336, most of the earlier BCPack blanks become decodes (blanks 191 → 14 at the same point), but rejections rise. The zlib-failure cascade that follows may be a consequence of the earlier failed loads rather than a separate cause.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7127875684 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7127875684). Originally posted by [mumba17](https://github.com/mumba17) on 2026-11-24T09:46:44Z. --- Storage observations after confirming first-run setup, as asked on #870. Setup: RTX 3090, Ryzen 5 5600X, Windows 11 build 26300, `release`, the same launcher options as [my #870 report](https://github.com/R0Y00/Xbox2Windows/issues/870#issuecomment-7127322075). I applied one local diagnostic to `xcrdapi.cpp` with no behaviour change: a count of failed requests per `outcome` string, plus one line per "destination capacity exceeded" request recording its option bits and sizes. Only shapes and counts are below. **First failed request class after confirm: `destination capacity exceeded`.** Cumulative failed requests by outcome: | Build | While on the setup pages | About 10 s after confirm | Afterwards | |---|---|---|---| | `e1316e1c` (main) | capacity exceeded 15, zlib failed 2 | capacity exceeded 144, zlib failed 4 | flat: 5 more requests in the next 40 s; frames keep presenting until stopped at 312 s, with no fault; 7 `Device::slot70 unsupported memory SRV arguments` lines, the path in triggered02's 09:37 report | | `4b166b7d` + #1336 | bcpack failed 13, capacity exceeded 15, zlib failed 2 | bcpack failed 36→1,603, capacity exceeded 141→805, zlib failed 4→17,174 | within 20 s: zlib failed 78,725, bcpack failed 5,699, read failed 156, zero page tokens at enqueue 28,142; then a fault | **Shape of the capacity-exceeded requests** (554 logged across both builds, the same in each): - every one has zlib set, no BCPack format, a page-token destination (bit 21) and a file source; - the field at `+0x38` (read as the uncompressed size) is 0 in every one; - the destination size is a multiple of 4 KiB from `0x1000` to `0xF000`; - the stream inflates to more than that: mostly `0x10000` or `0x20000`, otherwise `0x8000`, `0x3000`, `0x40000` or `0x80000`, which is 2 to 16 times the destination; - 395 of 400 source offsets are not 64 KiB-aligned; - they arrive in bursts of up to 169 per submission; - none was served by the chunked-stream cache from #1214. In each, the inflated stream was larger than the destination and no continuation request was found. Read together, this looks like a request asking for a window of a larger compressed record. That would make it the same shape as the whole-record-then-select-a-page control in #1353, with the page offset carried somewhere the stand-in doesn't read yet. That's a hypothesis only. I didn't identify the field. With #1336, most of the earlier BCPack blanks become decodes (blanks 191 → 14 at the same point), but rejections rise. The zlib-failure cascade that follows may be a consequence of the earlier failed loads rather than a separate cause. AI-assisted (Claude Code).
JohnConnorNPC commented 2026-11-24 13:00:54 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-24T12:40:05Z.


The first failure class, destination capacity exceeded, from a per-request trace. Short version: these are requests for the first part of a compressed chunk, and delivering that part instead of failing the request removes the class. It does not finish the load; what happens after is at the end.

Edited as asked below: the description of how the executable builds a request is removed, and what is left is request classes and counts as the stand-in sees them.

Setup. main at bb6c9a0c with #1429, #1415 and #1390 merged on top (two small conflicts in xcrdapi.cpp, resolved by keeping both sides), plus a local trace line per executed request. clang-cl build under Wine 11.0 with vkd3d-proton, RTX 4070 Ti SUPER, same scripted first-run input in every run; the confirm step lands at 165 s each time.

What the trace shows (225 s run, 44,266 requests, 293 failed):

Request class Count
all requests 44,266
failed 293
failed with destination capacity exceeded 205
of those, destination ends exactly on a 64 KiB page boundary (page offset + destination size is a multiple of 0x10000) 205
of those, carrying one page token 204
  • Typical: page offset 0xf000, destination 0x1000, stream inflates to 0x3000. Or page offset 0x1000, destination 0xf000, stream inflates to 0x10000, straight after a 0x1000-byte request on the same file that filled the start of the page.
  • In the five I followed by hand, no later request asks for the rest of the stream (nothing on that file at offset + destination size in the next 400 requests).

So the caller wants the bytes up to the end of its page and the stream is longer.

Experiment. Behind a local switch, a zlib request (no BCPack) whose stream inflates to more than the destination writes the first destination size bytes instead of failing:

Run Failed at 220 s Outcome
three PRs, no switch 20,290 C++ exception thrown inside the executable's BVH builder library at 241 s
with the switch, run 1 241 wave of zlib failed from 220 s (13,440 by 240 s), then a null write in the executable at 244 s
with the switch, run 2 40 330 s timeout, no further requests after about 205 s
with the switch, run 3 (traced) 41 262 s timeout, no further requests after about 205 s

With the switch the failures that remain before the wave are 37 bcpack failed and 3 or 4 zlib failed. The first bcpack failed requests have the same shape as above (one of them: page offset 0xc000, destination 0x4000), and a group of them steps its offset by 0x10000 with one unchanged source size. The BCPack decoder needs the full decoded size, which the request does not carry, so I have not tried those.

What this does not explain.

  • The large zlib failed wave. That one is followed up in a later comment and in #1554; the lookup I first proposed for it here was wrong and is withdrawn.
  • Why the same build and input sometimes goes on into the wave and sometimes stops requesting. In the run that went on, the heartbeat's page tokens 0 at enqueue climbed from 726 to 17,056 between 190 s and 230 s; in the two that stopped it stayed at 503.

This is one executable on a translation-layer host, three runs with the switch. It contradicts the rule from #1144 that a destination shorter than the stream must fail the request, for this request shape at least. The self-authored archive fixture asked for below (valid bounded output against malformed and truncated streams, with exact output, untouched destination bytes and completion status) comes before any change to that rule; I have not built it yet.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7131755844 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7131755844). Originally posted by [JohnConnorNPC](https://github.com/JohnConnorNPC) on 2026-11-24T12:40:05Z. --- The first failure class, `destination capacity exceeded`, from a per-request trace. Short version: these are requests for the first part of a compressed chunk, and delivering that part instead of failing the request removes the class. It does not finish the load; what happens after is at the end. *Edited as asked below: the description of how the executable builds a request is removed, and what is left is request classes and counts as the stand-in sees them.* **Setup.** `main` at `bb6c9a0c` with #1429, #1415 and #1390 merged on top (two small conflicts in `xcrdapi.cpp`, resolved by keeping both sides), plus a local trace line per executed request. clang-cl build under Wine 11.0 with vkd3d-proton, RTX 4070 Ti SUPER, same scripted first-run input in every run; the confirm step lands at 165 s each time. **What the trace shows** (225 s run, 44,266 requests, 293 failed): | Request class | Count | |---|---| | all requests | 44,266 | | failed | 293 | | failed with `destination capacity exceeded` | 205 | | of those, destination ends exactly on a 64 KiB page boundary (`page offset + destination size` is a multiple of 0x10000) | 205 | | of those, carrying one page token | 204 | - Typical: page offset 0xf000, destination 0x1000, stream inflates to 0x3000. Or page offset 0x1000, destination 0xf000, stream inflates to 0x10000, straight after a 0x1000-byte request on the same file that filled the start of the page. - In the five I followed by hand, no later request asks for the rest of the stream (nothing on that file at `offset + destination size` in the next 400 requests). So the caller wants the bytes up to the end of its page and the stream is longer. **Experiment.** Behind a local switch, a zlib request (no BCPack) whose stream inflates to more than the destination writes the first `destination size` bytes instead of failing: | Run | Failed at 220 s | Outcome | |---|---|---| | three PRs, no switch | 20,290 | C++ exception thrown inside the executable's BVH builder library at 241 s | | with the switch, run 1 | 241 | wave of `zlib failed` from 220 s (13,440 by 240 s), then a null write in the executable at 244 s | | with the switch, run 2 | 40 | 330 s timeout, no further requests after about 205 s | | with the switch, run 3 (traced) | 41 | 262 s timeout, no further requests after about 205 s | With the switch the failures that remain before the wave are 37 `bcpack failed` and 3 or 4 `zlib failed`. The first `bcpack failed` requests have the same shape as above (one of them: page offset 0xc000, destination 0x4000), and a group of them steps its offset by 0x10000 with one unchanged source size. The BCPack decoder needs the full decoded size, which the request does not carry, so I have not tried those. **What this does not explain.** - The large `zlib failed` wave. That one is followed up in a later comment and in #1554; the lookup I first proposed for it here was wrong and is withdrawn. - Why the same build and input sometimes goes on into the wave and sometimes stops requesting. In the run that went on, the heartbeat's `page tokens 0 at enqueue` climbed from 726 to 17,056 between 190 s and 230 s; in the two that stopped it stayed at 503. This is one executable on a translation-layer host, three runs with the switch. It contradicts the rule from #1144 that a destination shorter than the stream must fail the request, for this request shape at least. The self-authored archive fixture asked for below (valid bounded output against malformed and truncated streams, with exact output, untouched destination bytes and completion status) comes before any change to that rule; I have not built it yet.
R0Y00 commented 2026-11-24 14:03:22 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T13:05:02Z.


Thanks for isolating a request class. Keep the early range assertion, first capacity refusal, and later load failure as separate observations. Before changing the queue decompression contract, use a self-authored archive to compare a valid bounded output request with malformed and truncated compressed streams. Check exact output, untouched destination bytes, and completion status. Please reduce the private-reader field trace in the original comment to observable request classes and counts. Exact offsets and field layouts are useful in the self-authored fixture.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7132325033 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7132325033). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T13:05:02Z. --- Thanks for isolating a request class. Keep the early range assertion, first capacity refusal, and later load failure as separate observations. Before changing the queue decompression contract, use a self-authored archive to compare a valid bounded output request with malformed and truncated compressed streams. Check exact output, untouched destination bytes, and completion status. Please reduce the private-reader field trace in the original comment to observable request classes and counts. Exact offsets and field layouts are useful in the self-authored fixture.
JohnConnorNPC commented 2026-11-24 14:03:27 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-24T13:53:20Z.


Follow-up on the large zlib failed class, kept apart from the capacity class above. Two things: a retraction and a cause.

Retraction. The "window" lookup I described (step back from a request offset to a stream of the same compressed size) is wrong for this class. In the one traced run where it served requests, 43 of them were answered from an unrelated chunk. Please disregard it; I have removed it from my trial build.

What the failing requests are. Checked against the chunk tables of the two pool files that carried most of the class, parsed with boundary() from tools/texture_descriptors.py:

Observation Count
failing zlib failed requests on those two files 785
of those, compressed size and destination size both equal one table entry, at that entry's file offset plus a constant 724
constant 0xE0000 471
constant 0x3A0000 250
zlib chunks in those files that do not inflate on disk 0

Consecutive failing requests map to consecutive table entries with the same constant. So the data is plain zlib and intact; the requests are for valid chunks at a place shifted by a multiple of 64 KiB. My earlier guess of a second codec is also dropped.

Cause. Not the storage stand-in. The shift comes from the XG stand-in's slot-10 tiling answer, which a streaming executable uses to place each texture level in its pool. A desktop reserved resource orders the mips largest first; the pool files have them smallest first behind one shared tile. #1554 changes that answer for layout 0x10a and has the evidence (a rule that reproduces the level sizes of 39,283 texture records, a source-built test).

Same executable, same scripted input, with and without #1554:

without with
zlib failed by 250 s 11,377 2
chunk-table reads not starting at a chunk start 11,622 by 249 s 0 by 325 s
run stopped at 253 s 330 s timeout, still requesting

Still open, separately. The capacity class (your request for a self-authored archive fixture stands; I have not built it yet), bcpack failed on partial chunks (135 by 250 s), and a loading screen that draws blank.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7133486652 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7133486652). Originally posted by [JohnConnorNPC](https://github.com/JohnConnorNPC) on 2026-11-24T13:53:20Z. --- Follow-up on the large `zlib failed` class, kept apart from the capacity class above. Two things: a retraction and a cause. **Retraction.** The "window" lookup I described (step back from a request offset to a stream of the same compressed size) is wrong for this class. In the one traced run where it served requests, 43 of them were answered from an unrelated chunk. Please disregard it; I have removed it from my trial build. **What the failing requests are.** Checked against the chunk tables of the two pool files that carried most of the class, parsed with `boundary()` from `tools/texture_descriptors.py`: | Observation | Count | |---|---| | failing `zlib failed` requests on those two files | 785 | | of those, compressed size and destination size both equal one table entry, at that entry's file offset plus a constant | 724 | | constant `0xE0000` | 471 | | constant `0x3A0000` | 250 | | zlib chunks in those files that do not inflate on disk | 0 | Consecutive failing requests map to consecutive table entries with the same constant. So the data is plain zlib and intact; the requests are for valid chunks at a place shifted by a multiple of 64 KiB. My earlier guess of a second codec is also dropped. **Cause.** Not the storage stand-in. The shift comes from the XG stand-in's slot-10 tiling answer, which a streaming executable uses to place each texture level in its pool. A desktop reserved resource orders the mips largest first; the pool files have them smallest first behind one shared tile. #1554 changes that answer for layout `0x10a` and has the evidence (a rule that reproduces the level sizes of 39,283 texture records, a source-built test). Same executable, same scripted input, with and without #1554: | | without | with | |---|---|---| | `zlib failed` by 250 s | 11,377 | 2 | | chunk-table reads not starting at a chunk start | 11,622 by 249 s | 0 by 325 s | | run | stopped at 253 s | 330 s timeout, still requesting | **Still open, separately.** The capacity class (your request for a self-authored archive fixture stands; I have not built it yet), `bcpack failed` on partial chunks (135 by 250 s), and a loading screen that draws blank.
R0Y00 commented 2026-11-24 15:02:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T14:11:04Z.


Thanks for retracting the size-based fallback and for comparing the same scripted run with and without the slot-10 change. The chunk-start check makes the #1554 layout path the next one to verify on Windows. Please link the exact build in that follow-up and keep the remaining capacity, partial BCPack and blank-output observations separate. This issue stays open for the remaining storage failure cases.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7133970044 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7133970044). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T14:11:04Z. --- Thanks for retracting the size-based fallback and for comparing the same scripted run with and without the slot-10 change. The chunk-start check makes the #1554 layout path the next one to verify on Windows. Please link the exact build in that follow-up and keep the remaining capacity, partial BCPack and blank-output observations separate. This issue stays open for the remaining storage failure cases.
JohnConnorNPC commented 2026-11-24 15:02:22 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-24T14:26:42Z.


The build behind the "with" column of the table in my follow-up above:

github.com/JohnConnorNPC/Xbox2Windows@217caa3e14 (branch trial/1198-loading-runs on my fork; a trial tree, not proposed for merge)

It is made of:

  • main at bb6c9a0c;
  • #1429 (at efe1fe2d, an earlier head than the PR has now), #1415 and #1390 merged on top;
  • the slot-10 tile plan as later merged in #1554, with two differences in the trial copy: it also accepts layout 0x109, and its 32-bit format range includes format 89;
  • the local prefix switch (X2W_DSTORAGE_PREFIX=1) from my first comment;
  • a per-request trace and failure counts by outcome in the storage stand-in, a log line per distinct slot-10 query, and debugger-side diagnostics, including the probe that produced the chunk-start counts;
  • one local patch that keeps the output window on top under Wine.

The "without" build has no commit. It was the same working tree before the tile-plan branch was added to the slot-10 answer. It also still had the size-based lookup I retracted compiled in, switched off. I did not commit that state, so I cannot link it. If you want it, I can rebuild "without" from this commit with the tile-plan branch removed and rerun both sides.

Environment. clang-cl build under Wine 11.0 (Proton Experimental) with vkd3d-proton, RTX 4070 Ti SUPER (driver 550.163.01), same scripted first-run input in both runs. Not Windows.

Thanks for verifying #1554 on Windows. The capacity class, bcpack failed on partial chunks and the blank loading screen stay separate. This comment claims nothing new about them.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7134385139 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7134385139). Originally posted by [JohnConnorNPC](https://github.com/JohnConnorNPC) on 2026-11-24T14:26:42Z. --- The build behind the "with" column of the table in [my follow-up above](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7133486652): https://github.com/JohnConnorNPC/Xbox2Windows/commit/217caa3e14067ff2040ec8d8de9d5c9b7ba5cb18 (branch `trial/1198-loading-runs` on my fork; a trial tree, not proposed for merge) It is made of: - `main` at `bb6c9a0c`; - #1429 (at `efe1fe2d`, an earlier head than the PR has now), #1415 and #1390 merged on top; - the slot-10 tile plan as later merged in #1554, with two differences in the trial copy: it also accepts layout `0x109`, and its 32-bit format range includes format 89; - the local prefix switch (`X2W_DSTORAGE_PREFIX=1`) from my first comment; - a per-request trace and failure counts by outcome in the storage stand-in, a log line per distinct slot-10 query, and debugger-side diagnostics, including the probe that produced the chunk-start counts; - one local patch that keeps the output window on top under Wine. **The "without" build has no commit.** It was the same working tree before the tile-plan branch was added to the slot-10 answer. It also still had the size-based lookup I retracted compiled in, switched off. I did not commit that state, so I cannot link it. If you want it, I can rebuild "without" from this commit with the tile-plan branch removed and rerun both sides. **Environment.** clang-cl build under Wine 11.0 (Proton Experimental) with vkd3d-proton, RTX 4070 Ti SUPER (driver 550.163.01), same scripted first-run input in both runs. Not Windows. Thanks for verifying #1554 on Windows. The capacity class, `bcpack failed` on partial chunks and the blank loading screen stay separate. This comment claims nothing new about them.
R0Y00 commented 2026-11-24 15:02:23 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T14:38:26Z.


Thanks for pinning the trial build and listing the differences. Please rerun the pair with exactly the merged #1554 slot-10 branch enabled versus disabled, keeping the other trial changes fixed on both sides. In each run, report the same time window and count chunk-start misses and zlib failures separately. The existing result covers the trial variant, including the extra layout and format. The Windows synthetic slot-10 results separately cover the merged implementation.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7134706191 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7134706191). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T14:38:26Z. --- Thanks for pinning the trial build and listing the differences. Please rerun the pair with exactly the merged #1554 slot-10 branch enabled versus disabled, keeping the other trial changes fixed on both sides. In each run, report the same time window and count chunk-start misses and zlib failures separately. The existing result covers the trial variant, including the extra layout and format. The Windows synthetic slot-10 results separately cover the merged implementation.
SuperCraft3M commented 2026-11-24 15:02:24 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by SuperCraft3M on 2026-11-24T14:44:10Z.


I am checking the remaining loading failures on native Windows 11 (26300.9711), RTX 4070 (32.0.16.2114), MSVC 19.44 Debug. Local integration: main be484d0f plus #1390 and #1429, with the existing mapped/offline debugger integration. The public storage/tiling/BCPack-table checks pass 4/4 with an ASCII temporary directory.

In a private previous-run sample, four failed BCPack requests match exact archive chunk starts and stored sizes in the existing boundary-table reader. Their requested decoded spans are smaller than the chunks' declared logical spans (one quarter of the chunk in these samples). This supports checking bounded partial-output handling separately from format support; it does not establish the source-window semantics or justify a size-based backward lookup. I am collecting descriptor-binding diagnostics separately because the blank frame also has repeated unknown-token bindings.

I will report the native-Windows loading result with the build and request classes. Raw requests, filenames, offsets, decoded data and captures remain local.

AI-assisted (Codex).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7134862392 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7134862392). Originally posted by [SuperCraft3M](https://github.com/SuperCraft3M) on 2026-11-24T14:44:10Z. --- I am checking the remaining loading failures on native Windows 11 (26300.9711), RTX 4070 (32.0.16.2114), MSVC 19.44 Debug. Local integration: main be484d0f plus #1390 and #1429, with the existing mapped/offline debugger integration. The public storage/tiling/BCPack-table checks pass 4/4 with an ASCII temporary directory. In a private previous-run sample, four failed BCPack requests match exact archive chunk starts and stored sizes in the existing boundary-table reader. Their requested decoded spans are smaller than the chunks' declared logical spans (one quarter of the chunk in these samples). This supports checking bounded partial-output handling separately from format support; it does not establish the source-window semantics or justify a size-based backward lookup. I am collecting descriptor-binding diagnostics separately because the blank frame also has repeated unknown-token bindings. I will report the native-Windows loading result with the build and request classes. Raw requests, filenames, offsets, decoded data and captures remain local. AI-assisted (Codex).
R0Y00 commented 2026-11-24 17:02:08 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T16:28:53Z.


The BCPack request counters in #1622 are now on main at 4b84235f. The Windows Release source-built consumer reported requests 1:2, 6:1, 7:4, with only format 6 counted as zero-filled. For the next loading repro, include the aggregate BCPack summary if the process exits normally, alongside the first failing request category. Keep past-EOF, zlib and capacity failures separate. The counters leave the storage behavior unchanged.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7137732457 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7137732457). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T16:28:53Z. --- The BCPack request counters in #1622 are now on main at 4b84235f. The Windows Release source-built consumer reported requests 1:2, 6:1, 7:4, with only format 6 counted as zero-filled. For the next loading repro, include the aggregate BCPack summary if the process exits normally, alongside the first failing request category. Keep past-EOF, zlib and capacity failures separate. The counters leave the storage behavior unchanged.
R0Y00 commented 2026-11-24 18:02:56 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T17:14:23Z.


The destination-page check from #1672 is on main at 7fdfe6d2. The source-built Windows Release test verified refusal before writes for non-writable memory and an exact successful follow-up on the same queue. Please keep the new destination-not-writable outcome separate from past-EOF, zlib and capacity in the next loading summary. The original loading report stays open.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7138895407 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7138895407). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T17:14:23Z. --- The destination-page check from #1672 is on main at 7fdfe6d2. The source-built Windows Release test verified refusal before writes for non-writable memory and an exact successful follow-up on the same queue. Please keep the new destination-not-writable outcome separate from past-EOF, zlib and capacity in the next loading summary. The original loading report stays open.
MasterDomino commented 2026-11-24 19:01:38 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-24T18:06:13Z.


Loading summary from local startup runs. Each category is counted separately, as you asked.

Setup. main at 9ffb8529 plus local diagnostic counters in xcrdapi.cpp. The counters are uncommitted and don't change behaviour. RX 9070 XT, Windows build 26300, release build, warm cache, -MemoryGiB 32 (see the note on the cap below). Input reaches the first-run acceptance page and confirms it at about 265 s; loading starts then. Counts only; the inputs stay local.

Failed requests by outcome (whole run, ends at 299 s)

Outcome Count
destination capacity exceeded 2,049
bcpack failed 199
zlib failed 6
read at or past end of file 2
destination not writable (#1672) 0
  • Before confirming: 18 failures (capacity 15, zlib 2, BCPack 1). The first failing request is a BCPack request (options 0x20000e), immediately followed by capacity failures.
  • After confirming: failures rise from 18 to 2,256 within 40 s.
  • No BCPack summary: the run doesn't exit normally (see the end point below), so the aggregate BCPack summary isn't printed.

The capacity failures have one shape

All are zlib requests to page destinations (options 0x200001). Splitting page-destination requests by where page_offset + dest_size ends:

Request ends OK Failed
inside the first 64 KiB page 19,345 0
exactly at the first page's end 4,554 2,256
past the first page 2,366 0
  • Multi-page sizes do work. Requests that run past the first page all succeed, so dest_size does carry multi-page sizes.
  • Every logged failure fills exactly the rest of its first page. That held for 40 of 40 logged failures. The stream inflates to more than the destination, up to 32× here, typically a whole number of 64 KiB pages.
  • No hidden size field. In 12 raw requests, +0x38 is 0 and nothing else holds a size or page count.
  • No follow-on pieces. zlib failures stay at single digits, so the title never sends continuation pieces. It looks like it asks for only the first dest_size bytes of a longer stream.

Experiment (local only, behind an env var, not proposed as a default). Filling the destination with the stream's first dest_size bytes, when a plain zlib stream is longer and no continuation is identified, removes these failures: 2,256 such requests served, post-confirm failures down to about 200, mostly BCPack. It doesn't move the end point below. I'm reporting it as evidence about what the title expects, not as a fix, given your note to avoid fallbacks. A source-built control would need a page destination that ends at a page boundary with a longer stream.

  • The memory cap. With run.ps1's default -MemoryGiB 14, the same runs stop at about 290 s with a write or read fault in title code during this burst (#1586's pattern). With 32 GiB they go further. Commit reaches about 16 GiB during the burst.
  • The end point with 32 GiB. An unhandled C++ exception (thrown type long) from the package's BVH builder DLL, at 299–321 s across runs, with or without the experiment.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7140161243 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7140161243). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-24T18:06:13Z. --- Loading summary from local startup runs. Each category is counted separately, as you asked. **Setup.** `main` at `9ffb8529` plus local diagnostic counters in `xcrdapi.cpp`. The counters are uncommitted and don't change behaviour. RX 9070 XT, Windows build 26300, release build, warm cache, `-MemoryGiB 32` (see the note on the cap below). Input reaches the first-run acceptance page and confirms it at about 265 s; loading starts then. Counts only; the inputs stay local. ## Failed requests by outcome (whole run, ends at 299 s) | Outcome | Count | |---|---| | destination capacity exceeded | 2,049 | | bcpack failed | 199 | | zlib failed | 6 | | read at or past end of file | 2 | | destination not writable (#1672) | 0 | - **Before confirming:** 18 failures (capacity 15, zlib 2, BCPack 1). The first failing request is a BCPack request (options `0x20000e`), immediately followed by capacity failures. - **After confirming:** failures rise from 18 to 2,256 within 40 s. - **No BCPack summary:** the run doesn't exit normally (see the end point below), so the aggregate BCPack summary isn't printed. ## The capacity failures have one shape All are zlib requests to page destinations (options `0x200001`). Splitting page-destination requests by where `page_offset + dest_size` ends: | Request ends | OK | Failed | |---|---|---| | inside the first 64 KiB page | 19,345 | 0 | | exactly at the first page's end | 4,554 | 2,256 | | past the first page | 2,366 | 0 | - **Multi-page sizes do work.** Requests that run past the first page all succeed, so `dest_size` does carry multi-page sizes. - **Every logged failure fills exactly the rest of its first page.** That held for 40 of 40 logged failures. The stream inflates to more than the destination, up to 32× here, typically a whole number of 64 KiB pages. - **No hidden size field.** In 12 raw requests, `+0x38` is 0 and nothing else holds a size or page count. - **No follow-on pieces.** zlib failures stay at single digits, so the title never sends continuation pieces. It looks like it asks for only the first `dest_size` bytes of a longer stream. **Experiment (local only, behind an env var, not proposed as a default).** Filling the destination with the stream's first `dest_size` bytes, when a plain zlib stream is longer and no continuation is identified, removes these failures: 2,256 such requests served, post-confirm failures down to about 200, mostly BCPack. It **doesn't** move the end point below. I'm reporting it as evidence about what the title expects, not as a fix, given your note to avoid fallbacks. A source-built control would need a page destination that ends at a page boundary with a longer stream. ## Related observations (details on #870) - **The memory cap.** With `run.ps1`'s default `-MemoryGiB 14`, the same runs stop at about 290 s with a write or read fault in title code during this burst (#1586's pattern). With 32 GiB they go further. Commit reaches about 16 GiB during the burst. - **The end point with 32 GiB.** An unhandled C++ exception (thrown type `long`) from the package's BVH builder DLL, at 299–321 s across runs, with or without the experiment. AI-assisted.
MasterDomino commented 2026-11-24 19:01:38 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-24T18:10:32Z.


Proposal, so the next loading summaries from anyone keep the categories separate without local patches. I'd like a go-ahead before opening the PR.

Change (src/startup_stubs/xcrdapi.cpp, behaviour-neutral):

  • Failure counts by outcome. Count failed requests by their existing outcome text: capacity, zlib, BCPack, destination not writable, page-grant failures, page array unreadable at run, entry threw, not started. Print the counts in the existing 10 s storage heartbeat as one line: failed by outcome: ….
  • Split read failures. Split read failed in that count into read at or past end of file, read crosses end of file and other read failures, using the file size. The per-request log text stays exactly read failed, which startup_storage_refusal_order asserts.
  • Page-destination shape counts. Optionally, count page-destination requests by shape and result: ending inside the first page, exactly at its end, or past it. This is the table from the summary above.
  • Unchanged: no outcome changes, no fallback, no new env var. The prefix experiment from the summary stays local.

Tests:

  • Extend startup_storage_refusal_order, or add a sibling, to submit one request of each refusal kind it already builds: a valid request, at EOF, crossing EOF, implausible size, a short destination, and a zlib failure. Assert the heartbeat's per-outcome counts, after making the heartbeat interval configurable for the test, or after exposing the counters through a test-only query. I'll match whichever the existing storage tests prefer.
  • Negative control: count every failure under one bucket, and the test must fail.
  • The existing startup_storage_* and dstorage tests must stay green; they pass locally with the prototype, 11/11.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7140266499 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7140266499). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-24T18:10:32Z. --- Proposal, so the next loading summaries from anyone keep the categories separate without local patches. I'd like a go-ahead before opening the PR. **Change (`src/startup_stubs/xcrdapi.cpp`, behaviour-neutral):** - **Failure counts by outcome.** Count failed requests by their existing outcome text: capacity, zlib, BCPack, destination not writable, page-grant failures, page array unreadable at run, entry threw, not started. Print the counts in the existing 10 s storage heartbeat as one line: `failed by outcome: …`. - **Split read failures.** Split `read failed` in that count into `read at or past end of file`, `read crosses end of file` and other read failures, using the file size. The per-request log text stays exactly `read failed`, which `startup_storage_refusal_order` asserts. - **Page-destination shape counts.** Optionally, count page-destination requests by shape and result: ending inside the first page, exactly at its end, or past it. This is the table from the summary above. - **Unchanged:** no outcome changes, no fallback, no new env var. The prefix experiment from the summary stays local. **Tests:** - Extend `startup_storage_refusal_order`, or add a sibling, to submit one request of each refusal kind it already builds: a valid request, at EOF, crossing EOF, implausible size, a short destination, and a zlib failure. Assert the heartbeat's per-outcome counts, after making the heartbeat interval configurable for the test, or after exposing the counters through a test-only query. I'll match whichever the existing storage tests prefer. - Negative control: count every failure under one bucket, and the test must fail. - The existing `startup_storage_*` and `dstorage` tests must stay green; they pass locally with the prototype, 11/11. AI-assisted.
R0Y00 commented 2026-11-24 19:01:38 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T18:15:42Z.


Go ahead with the behavior-neutral counter PR. For the first slice, report aggregate failure counts at the existing heartbeat, separating at/past EOF, crossing EOF, other read failure, destination capacity, non-writable destination, zlib and BCPack. Keep existing status, ordering and per-request text. Compute the EOF categories with overflow-safe comparisons. Test valid, EOF, crossing EOF, short-destination and invalid-zlib requests in a source-built fixture. Assert the exact counts and require the one-bucket negative control to fail. Reuse the current refusal-order fixture or a sibling; avoid a new public knob just to make the test run. Page-shape counts can follow separately. Link the result to #1758, which is collecting the first-failure evidence. Keep the prefix experiment outside this PR.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7140391241 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7140391241). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T18:15:42Z. --- Go ahead with the behavior-neutral counter PR. For the first slice, report aggregate failure counts at the existing heartbeat, separating at/past EOF, crossing EOF, other read failure, destination capacity, non-writable destination, zlib and BCPack. Keep existing status, ordering and per-request text. Compute the EOF categories with overflow-safe comparisons. Test valid, EOF, crossing EOF, short-destination and invalid-zlib requests in a source-built fixture. Assert the exact counts and require the one-bucket negative control to fail. Reuse the current refusal-order fixture or a sibling; avoid a new public knob just to make the test run. Page-shape counts can follow separately. Link the result to #1758, which is collecting the first-failure evidence. Keep the prefix experiment outside this PR.
MasterDomino commented 2026-11-24 19:01:39 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-24T18:18:16Z.


Claiming the behaviour-neutral counter PR as scoped (heartbeat aggregates for at/past EOF, crossing EOF, other read, capacity, non-writable, zlib and BCPack; overflow-safe EOF checks; source-built fixture with exact counts and the one-bucket negative control; no new knob; page-shape counts and the prefix experiment left out). PR link to follow, linked to #1758.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7140453700 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7140453700). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-24T18:18:16Z. --- Claiming the behaviour-neutral counter PR as scoped (heartbeat aggregates for at/past EOF, crossing EOF, other read, capacity, non-writable, zlib and BCPack; overflow-safe EOF checks; source-built fixture with exact counts and the one-bucket negative control; no new knob; page-shape counts and the prefix experiment left out). PR link to follow, linked to #1758. AI-assisted.
MasterDomino commented 2026-11-24 19:01:40 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-24T18:34:03Z.


Counter PR: https://github.com/R0Y00/Xbox2Windows/pull/1781. Eight fixed causes on a second heartbeat line (totals line byte-for-byte unchanged), overflow-safe EOF split, per-request text and statuses unchanged. New startup_storage_failure_counts fixture: 13 requests, exact counts per cause (sum = failed = 11), plus the registered one-bucket control (fails as required); EOF-swap and wrapping mutants recorded in the PR. Storage tests 15/15, ^startup_ 203 passed / 0 failed / 4 capability skips. Linked to #1758.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7140825237 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7140825237). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-24T18:34:03Z. --- Counter PR: https://github.com/R0Y00/Xbox2Windows/pull/1781. Eight fixed causes on a second heartbeat line (totals line byte-for-byte unchanged), overflow-safe EOF split, per-request text and statuses unchanged. New `startup_storage_failure_counts` fixture: 13 requests, exact counts per cause (sum = failed = 11), plus the registered one-bucket control (fails as required); EOF-swap and wrapping mutants recorded in the PR. Storage tests 15/15, `^startup_` 203 passed / 0 failed / 4 capability skips. Linked to #1758. AI-assisted.
MasterDomino commented 2026-11-24 20:01:18 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-24T19:29:31Z.


Picking up the page-shape follow-up you left for a separate PR: aggregate heartbeat counts of page-destination requests by where page_offset + dest_size ends (inside the first 64 KiB page, exactly at its end, past it), each split into completed and failed. Behaviour-neutral like #1781: existing lines, statuses and per-request text unchanged, overflow-safe arithmetic, a source-built fixture with exact counts for each shape and a one-bucket negative control. PR link to follow.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7142172381 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7142172381). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-24T19:29:31Z. --- Picking up the page-shape follow-up you left for a separate PR: aggregate heartbeat counts of page-destination requests by where `page_offset + dest_size` ends (inside the first 64 KiB page, exactly at its end, past it), each split into completed and failed. Behaviour-neutral like #1781: existing lines, statuses and per-request text unchanged, overflow-safe arithmetic, a source-built fixture with exact counts for each shape and a one-bucket negative control. PR link to follow. AI-assisted.
R0Y00 commented 2026-11-24 20:01:18 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T19:29:41Z.


The new independent RTX 3090 report used #1781's counters. Its later read fault was observed after local diagnostic changes and has no confirmed link to a storage request.

Open for a small source-built follow-up: track one failed request end to end, through enqueue, completion status and the first consumer read or release of its destination. Pair a successful request with one refused request of the same shape and use distinct sentinels. Verify that success publishes the expected bytes and that a failed completion cannot be mistaken for usable data. If the existing fixture already covers that last step, link the test and use the same checkpoints for a bounded local retest. Keep aggregate counters, address placement, and XDsp in their current work items.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7142176825 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7142176825). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T19:29:41Z. --- The new [independent RTX 3090 report](https://github.com/R0Y00/Xbox2Windows/issues/1758#issuecomment-7142047272) used #1781's counters. Its later read fault was observed after local diagnostic changes and has no confirmed link to a storage request. Open for a small source-built follow-up: track one failed request end to end, through enqueue, completion status and the first consumer read or release of its destination. Pair a successful request with one refused request of the same shape and use distinct sentinels. Verify that success publishes the expected bytes and that a failed completion cannot be mistaken for usable data. If the existing fixture already covers that last step, link the test and use the same checkpoints for a bounded local retest. Keep aggregate counters, address placement, and XDsp in their current work items.
MasterDomino commented 2026-11-24 20:01:20 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-24T19:46:04Z.


Page-shape follow-up PR: https://github.com/R0Y00/Xbox2Windows/pull/1864. A third heartbeat line counts page-destination requests by where page_offset + dest_size ends (inside / at the first page's end / past it), each completed and failed, counted at the same places that already add to failed=; 64-bit end so nothing wraps. New startup_storage_page_end_counts fixture with real page writes through the xmem shim (exact counts per shape, totals cross-checks, 10 edge ends) plus the registered one-bucket control; swapped-comparison and 32-bit-sum mutants recorded. Storage/heartbeat/triage group 17/17, ^startup_ 235 passed / 0 failed / 4 capability skips.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7142560838 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7142560838). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-24T19:46:04Z. --- Page-shape follow-up PR: https://github.com/R0Y00/Xbox2Windows/pull/1864. A third heartbeat line counts page-destination requests by where `page_offset + dest_size` ends (inside / at the first page's end / past it), each completed and failed, counted at the same places that already add to `failed=`; 64-bit end so nothing wraps. New `startup_storage_page_end_counts` fixture with real page writes through the xmem shim (exact counts per shape, totals cross-checks, 10 edge ends) plus the registered one-bucket control; swapped-comparison and 32-bit-sum mutants recorded. Storage/heartbeat/triage group 17/17, `^startup_` 235 passed / 0 failed / 4 capability skips. AI-assisted.
R0Y00 commented 2026-11-24 20:01:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T19:57:15Z.


#1864 is on main at 150a01d3. The two Release page-end tests passed, including the negative control that collapses the three ranges. New retests can use the built-in inside/exact-end/past-end counters and keep the completion counts separate from failures. The counters leave request behavior alone. The separate completion-to-consumer check above is still open.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7142833391 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7142833391). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T19:57:15Z. --- #1864 is on main at 150a01d3. The two Release page-end tests passed, including the negative control that collapses the three ranges. New retests can use the built-in inside/exact-end/past-end counters and keep the completion counts separate from failures. The counters leave request behavior alone. The separate completion-to-consumer check above is still open.
MasterDomino commented 2026-11-24 20:01:22 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-24T19:58:30Z.


Claiming the queue-to-consumer follow-up.

What the existing fixtures already cover:

  • startup_storage_refusal_order (#1664): enqueue → status → fence order, and that a refused destination stays poisoned.
  • startup_dstorage_destination_check (#1672): refusal before any byte is written.

What neither covers:

  • following the destination to a consumer read or release;
  • the page-destination shape behind most loading failures: a zlib stream whose page_offset + dest_size ends at the first page boundary but inflates past it.

Plan (source-built, sibling of the #1781/#1864 fixtures with real page writes through the xmem shim):

  1. A matched pair. One Submit carries two page-destination requests of the same shape. One stream fits its destination (success). One stream inflates past it (refused as capacity). Each destination page starts with its own sentinel pattern.
  2. Consumer checkpoints, per request:
    • status entry value;
    • fence order;
    • the bytes the consumer reads after the fence through the title-visible mapping. Success must publish the exact expected bytes; the refused one must still read as its own sentinel, so it can't be mistaken for data;
    • release of the pages after completion, and a follow-up request that reuses them and must succeed.
  3. Negative controls:
    • a consumer that reads after the fence without checking status must be detectable: the test asserts the refused destination is the sentinel and not stream bytes;
    • a mutant that lets the refused request write a prefix must fail the test.
  4. Bounded local retest with the same checkpoints. In the title, count refused page-request completions, and whether the title queries those status entries (IsComplete/GetHResult) before the next access to that destination's pages. The query check uses the existing stand-in log points, extended to count per index. Results as aggregate counts only.

Address placement, XDsp and slot 148 stay in their own items.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7142865512 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7142865512). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-24T19:58:30Z. --- Claiming the queue-to-consumer follow-up. **What the existing fixtures already cover:** - `startup_storage_refusal_order` (#1664): enqueue → status → fence order, and that a refused destination stays poisoned. - `startup_dstorage_destination_check` (#1672): refusal before any byte is written. **What neither covers:** - following the destination to a consumer read or release; - the page-destination shape behind most loading failures: a zlib stream whose `page_offset + dest_size` ends at the first page boundary but inflates past it. **Plan (source-built, sibling of the #1781/#1864 fixtures with real page writes through the xmem shim):** 1. **A matched pair.** One Submit carries two page-destination requests of the same shape. One stream fits its destination (success). One stream inflates past it (refused as capacity). Each destination page starts with its own sentinel pattern. 2. **Consumer checkpoints, per request:** - status entry value; - fence order; - the bytes the consumer reads after the fence through the title-visible mapping. Success must publish the exact expected bytes; the refused one must still read as its own sentinel, so it can't be mistaken for data; - release of the pages after completion, and a follow-up request that reuses them and must succeed. 3. **Negative controls:** - a consumer that reads after the fence without checking status must be detectable: the test asserts the refused destination is the sentinel and not stream bytes; - a mutant that lets the refused request write a prefix must fail the test. 4. **Bounded local retest with the same checkpoints.** In the title, count refused page-request completions, and whether the title queries those status entries (`IsComplete`/`GetHResult`) before the next access to that destination's pages. The query check uses the existing stand-in log points, extended to count per index. Results as aggregate counts only. Address placement, XDsp and slot 148 stay in their own items. AI-assisted.
MasterDomino commented 2026-11-24 21:01:20 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-24T20:10:54Z.


Queue-to-consumer fixture: https://github.com/R0Y00/Xbox2Windows/pull/1886. One Submit with a matched pair of page requests ending at the first page's end (S inflates to exactly 0x1000, R to 0x1800 and is refused for capacity), each with its own sentinel, status and fence. Read through the title-visible view (XMemVirtualAlloc + XMemMapPhysicalPages) at each fence and after both: S shows its exact bytes, every byte of R's page stays its sentinel and none equals R's stream prefix; the pages are then unmapped, freed and reused by an S-shaped follow-up that completes exactly. Registered accept-refused control plus a recorded prefix-writing mutant fail on R's check; stand-in unchanged. Storage group 19/19, ^startup_ 237 passed / 0 failed / 4 capability skips. The bounded title retest with the same checkpoints comes separately.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7143154702 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7143154702). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-24T20:10:54Z. --- Queue-to-consumer fixture: https://github.com/R0Y00/Xbox2Windows/pull/1886. One Submit with a matched pair of page requests ending at the first page's end (S inflates to exactly 0x1000, R to 0x1800 and is refused for capacity), each with its own sentinel, status and fence. Read through the title-visible view (XMemVirtualAlloc + XMemMapPhysicalPages) at each fence and after both: S shows its exact bytes, every byte of R's page stays its sentinel and none equals R's stream prefix; the pages are then unmapped, freed and reused by an S-shaped follow-up that completes exactly. Registered accept-refused control plus a recorded prefix-writing mutant fail on R's check; stand-in unchanged. Storage group 19/19, `^startup_` 237 passed / 0 failed / 4 capability skips. The bounded title retest with the same checkpoints comes separately. AI-assisted.
MasterDomino commented 2026-11-24 21:01:22 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-24T20:32:02Z.


Bounded local retest for the queue-to-consumer checkpoints of #1886, in the title. Aggregate counts only.

Setup:

Build main at df40e4bc, release, plus one uncommitted local diagnostic in xcrdapi.cpp that only observes (no outcome changes). It links each refused page request's first page token to the status entry that reports it, then counts IsComplete/GetHResult calls on that entry and later page writes to the same token.
Machine RX 9070 XT, Windows build 26300
Run same input script as the #1758 runs; address placement off; -MemoryGiB 32 (peak commit 13.7 GiB)
End the known BVH builder stop at 298.3 s, about 35 s into the post-confirm loading burst

Counters at 280 s (#1781 and #1864 lines):

  • failures by cause: capacity 538, BCPack 87, zlib 3, past EOF 1;
  • page requests by end: inside 4,686/0, at the page end 1,679/629, past 761/0 (completed/failed).

Checkpoints for refused page requests:

Checkpoint Count
refused page requests linked to a status entry 598 (32 more were still waiting for their status entry when the run ended)
failing status entries they map to 34 (several requests share one entry)
those entries queried with IsComplete 598 / 598
those entries queried with GetHResult 0
never queried 0
destination page written again by a later request before the run ended 0

Other paths a title could use to see failures:

  • Queue::GetErrorEvent was not called in this run.
  • No queue slot beyond the implemented ones (≥ 10, e.g. an error record or query) was hit. The no-op trap logged none.

What this shows: in this window the title tracks these requests only through IsComplete on their status entries. That returns true for a completed request whether it succeeded or failed (the stand-in follows PC semantics, and #1886 shows the refused destination keeps its sentinel). The title never asks for the HRESULT. A refused request therefore looks complete to it, with its destination never written.

What this doesn't show:

  • whether the title reads status some other way (for example directly from status-array memory, or a console-specific completion word);
  • whether it later reads the destination pages. The stand-in only sees later requests, and none reused these pages before the stop.
  • Next, if useful: whether the console's status array reports failure through IsComplete itself, or through a field the title reads directly. That is a semantics question for the status-array contract, not something this retest can settle.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7143691928 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7143691928). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-24T20:32:02Z. --- Bounded local retest for the queue-to-consumer checkpoints of #1886, in the title. Aggregate counts only. **Setup:** | | | |---|---| | Build | `main` at `df40e4bc`, release, plus one uncommitted local diagnostic in `xcrdapi.cpp` that only observes (no outcome changes). It links each refused page request's first page token to the status entry that reports it, then counts `IsComplete`/`GetHResult` calls on that entry and later page writes to the same token. | | Machine | RX 9070 XT, Windows build 26300 | | Run | same input script as the #1758 runs; address placement off; `-MemoryGiB 32` (peak commit 13.7 GiB) | | End | the known BVH builder stop at 298.3 s, about 35 s into the post-confirm loading burst | **Counters at 280 s** (#1781 and #1864 lines): - failures by cause: capacity 538, BCPack 87, zlib 3, past EOF 1; - page requests by end: inside 4,686/0, at the page end 1,679/629, past 761/0 (completed/failed). **Checkpoints for refused page requests:** | Checkpoint | Count | |---|---| | refused page requests linked to a status entry | 598 (32 more were still waiting for their status entry when the run ended) | | failing status entries they map to | 34 (several requests share one entry) | | those entries queried with `IsComplete` | **598 / 598** | | those entries queried with `GetHResult` | **0** | | never queried | 0 | | destination page written again by a later request before the run ended | 0 | **Other paths a title could use to see failures:** - `Queue::GetErrorEvent` was not called in this run. - No queue slot beyond the implemented ones (≥ 10, e.g. an error record or query) was hit. The no-op trap logged none. **What this shows:** in this window the title tracks these requests only through `IsComplete` on their status entries. That returns true for a completed request whether it succeeded or failed (the stand-in follows PC semantics, and #1886 shows the refused destination keeps its sentinel). The title never asks for the HRESULT. A refused request therefore looks complete to it, with its destination never written. **What this doesn't show:** - whether the title reads status some other way (for example directly from status-array memory, or a console-specific completion word); - whether it later reads the destination pages. The stand-in only sees later requests, and none reused these pages before the stop. - **Next, if useful:** whether the console's status array reports failure through `IsComplete` itself, or through a field the title reads directly. That is a semantics question for the status-array contract, not something this retest can settle. AI-assisted.
R0Y00 commented 2026-11-24 21:01:23 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T20:37:50Z.


The consumer-view fixture #1886 is on main. I reran the exact Release candidate: the matched requests and accept-refused control both passed their expected outcomes. The failed request left its mapped page untouched through completion and did not prevent a fresh request after release. The post-confirm loading failure still lacks a causal link to a specific completion or consumer read.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7143842221 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7143842221). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T20:37:50Z. --- The consumer-view fixture #1886 is on main. I reran the exact Release candidate: the matched requests and accept-refused control both passed their expected outcomes. The failed request left its mapped page untouched through completion and did not prevent a fresh request after release. The post-confirm loading failure still lacks a causal link to a specific completion or consumer read.
R0Y00 commented 2026-11-24 21:01:24 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T20:42:54Z.


The Xbox GDK reference confirms that IsComplete is equivalent to GetHResult(index) != E_PENDING. A finished failure must report complete, and GetHResult is where the failure is carried. Keep that behaviour and the existing refused-page sentinel check.

The 598 request links, 34 reported status entries and absence of GetHResult on those entries narrow the next experiment. Follow one failing request's generation through its status poll, then check whether the same destination is read or consumed before any replacement write. A source-built pair can distinguish old sentinel bytes, a valid later write and a bounded refused request. Publish only aggregate results or the sequence of events; leave private bytes and traces local.

Microsoft Xbox IsComplete · Xbox GetHResult.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7143957996 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7143957996). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T20:42:54Z. --- The Xbox GDK reference confirms that IsComplete is equivalent to GetHResult(index) != E_PENDING. A finished failure must report complete, and GetHResult is where the failure is carried. Keep that behaviour and the existing refused-page sentinel check. The 598 request links, 34 reported status entries and absence of GetHResult on those entries narrow the next experiment. Follow one failing request's generation through its status poll, then check whether the same destination is read or consumed before any replacement write. A source-built pair can distinguish old sentinel bytes, a valid later write and a bounded refused request. Publish only aggregate results or the sequence of events; leave private bytes and traces local. [Microsoft Xbox IsComplete](https://learn.microsoft.com/en-us/xbox/gdk/docs/reference/system/dstorage/interfaces/idstoragestatusarrayx/methods/idstoragestatusarrayx_iscomplete?view=gdk-2510) · [Xbox GetHResult](https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/system/dstorage/interfaces/idstoragestatusarrayx/methods/idstoragestatusarrayx_gethresult?view=gdk-2604).
sydney-0o commented 2026-11-25 01:02:02 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by sydney-0o on 2026-11-25T00:11:06Z.


I ran a native Windows A/B control for both offset deltas reported in #1554. The test took the mip starts from the real XG slot-10 call and used their difference to form requests against generated RDS5 fixtures.

Windows 10 x64 build 19045.6456, GTX 1080 Ti driver 32.0.15.8278, MSVC 19.31 Release, D3D12 debug layer off. Both XG DLLs were built from 9dcf1ae1. The negative control disabled only the tile64::Plan::supports branch. Both used the same Release storage consumer and XCRDAPI DLL from the local 6b50e3d7 build.

BC7 shape, layout 0x10a Mip 1 start with plan / desktop Request offset delta
1024 × 1024, 9 mips 2 / 16 tiles 0xE0000
2048 × 2048, 10 mips 6 / 64 tiles 0x3A0000

For each shape, I generated two archives via the write_intervals helper in tests/startup_storage_directory_batch.py. Both hold the same expected 4 KiB page at the plan offset. One has a different valid page at the shifted offset. The other has a stream with a bad checksum there. The requests were submitted via startup_stub_consumer.exe dstorage-directory. With the plan, both requests returned the expected bytes and S_OK. With the desktop fallback, the valid alternate page returned S_OK, and the checksum control returned E_FAIL with its destination untouched. All guards were intact. Three complete A/B repetitions agreed.

The separate Windows Sandbox startup pair reached slot 10 and storage requests, then stopped early at the same access violation in both variants. The live loading phase remains unmeasured on this host.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7148238855 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7148238855). Originally posted by [sydney-0o](https://github.com/sydney-0o) on 2026-11-25T00:11:06Z. --- I ran a native Windows A/B control for both offset deltas reported in #1554. The test took the mip starts from the real XG slot-10 call and used their difference to form requests against generated RDS5 fixtures. Windows 10 x64 build 19045.6456, GTX 1080 Ti driver 32.0.15.8278, MSVC 19.31 Release, D3D12 debug layer off. Both XG DLLs were built from `9dcf1ae1`. The negative control disabled only the `tile64::Plan::supports` branch. Both used the same Release storage consumer and XCRDAPI DLL from the local `6b50e3d7` build. | BC7 shape, layout `0x10a` | Mip 1 start with plan / desktop | Request offset delta | |---|---:|---:| | 1024 × 1024, 9 mips | 2 / 16 tiles | `0xE0000` | | 2048 × 2048, 10 mips | 6 / 64 tiles | `0x3A0000` | For each shape, I generated two archives via the `write_intervals` helper in `tests/startup_storage_directory_batch.py`. Both hold the same expected 4 KiB page at the plan offset. One has a different valid page at the shifted offset. The other has a stream with a bad checksum there. The requests were submitted via `startup_stub_consumer.exe dstorage-directory`. With the plan, both requests returned the expected bytes and `S_OK`. With the desktop fallback, the valid alternate page returned `S_OK`, and the checksum control returned `E_FAIL` with its destination untouched. All guards were intact. Three complete A/B repetitions agreed. The separate Windows Sandbox startup pair reached slot 10 and storage requests, then stopped early at the same access violation in both variants. The live loading phase remains unmeasured on this host. AI-assisted.
R0Y00 commented 2026-11-25 02:02:06 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T01:28:45Z.


The field correction is on main in #2129 (4c1b27dd). The public Xbox request ABI defines +0x38 as CancellationTag and +0x34 as IntermediateSize for zlib plus BCPack. I reran the Windows Release worker checks against the exact candidate: the large-tag zlib request succeeded within the test commit limit, and the allocation-failure/recovery and EOF/fence checks passed (2/2 overall). This removes the false size source. Please keep offset selection and overlong source ranges under separate investigation; a zero cancellation tag supplies no evidence about their intended output size. #1429 has the earlier ABI analysis and can retain its separate streaming work. https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/system/dstorage/structs/dstorage_request

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7149591719 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7149591719). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T01:28:45Z. --- The field correction is on main in #2129 (4c1b27dd). The public Xbox request ABI defines +0x38 as CancellationTag and +0x34 as IntermediateSize for zlib plus BCPack. I reran the Windows Release worker checks against the exact candidate: the large-tag zlib request succeeded within the test commit limit, and the allocation-failure/recovery and EOF/fence checks passed (2/2 overall). This removes the false size source. Please keep offset selection and overlong source ranges under separate investigation; a zero cancellation tag supplies no evidence about their intended output size. #1429 has the earlier ABI analysis and can retain its separate streaming work. https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/system/dstorage/structs/dstorage_request
R0Y00 commented 2026-11-25 02:02:10 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T01:58:44Z.


The source-built generation check landed in #2083 (49f70c63). Windows Release passed both cases. Three requests reuse the same mapped page in one Submit. At their fences the results are E_FAIL → S_OK → E_FAIL. The first refusal leaves the sentinel, the valid request writes all 4,096 bytes, and the later refusal preserves those bytes and the earlier statuses. A consumer that reads the first refused destination as decoded data matches zero of 4096 bytes. This verifies the stand-in sequence. The observed startup batches still need their own offset/size attribution and status-to-consumer evidence.

ctest --preset release --no-tests=error -R '^startup_storage_refused_reuse($|_accept_refused_control$)' --output-on-failure

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7150177783 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7150177783). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T01:58:44Z. --- The source-built generation check landed in #2083 (49f70c63). Windows Release passed both cases. Three requests reuse the same mapped page in one Submit. At their fences the results are E_FAIL → S_OK → E_FAIL. The first refusal leaves the sentinel, the valid request writes all 4,096 bytes, and the later refusal preserves those bytes and the earlier statuses. A consumer that reads the first refused destination as decoded data matches zero of 4096 bytes. This verifies the stand-in sequence. The observed startup batches still need their own offset/size attribution and status-to-consumer evidence. `ctest --preset release --no-tests=error -R '^startup_storage_refused_reuse($|_accept_refused_control$)' --output-on-failure`
MasterDomino commented 2026-11-25 05:04:57 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-25T04:48:14Z.


Retest after #2129: the capacity refusals remain

Two startup runs on main at 19e04be9, which includes the #2129 field correction and the #2083 fixture. RX 9070 XT, Windows 11 build 26300, Release. Settings are the same as the cold/warm pair posted on #870: post-confirmation input, -MemoryGiB 32, -StartupBelow40, -Render -Translate. Both runs end at the slot 148 builder stop. A local counting-only diagnostic (not for PR) tracks each refused page request through its status queries. Counts only; no offsets, paths or logs.

Failure causes at the last heartbeat:

Cold run (290 s) Warm run (280 s) Pre-#2129 run (280 s)
destination capacity 2,297 195 538
bcpack 220 70 87
zlib 7 3 3
read at or past EOF 2 0 1
Page requests ending exactly at the first 64 KiB page end: failed / all 2,526 / 7,434 (34%) 268 / 964 (28%) 629 / 2,308 (27%)
Requests ending inside the page: failed 0 / 22,133 0 / 1,016 0 / 4,686
Requests ending past the page: failed 0 / 2,602 0 / 100 0 / 761
  • The refusals have the same shape as before #2129. Every failed page request, capacity, bcpack, zlib and EOF alike, still ends exactly at the page end: in each run the causes add up to the at-page-end failures, and no request ending inside or past the page fails.
  • The correct IntermediateSize field didn't remove them. So #2129's false size source was not their cause, and the overlong source range stays the open lead.
  • Totals vary. They depend on how much loading a run reaches before the stop: the cold run issued about 15 times as many page requests as the warm run. The proportions are stable.

Status to consumer (refused page requests tracked through their status queries, as the title issues them):

Cold Warm
Refused page requests tracked 2,472 268
Their status entry polled with IsComplete before the stop 2,457 268
Never polled before the stop 15 0
GetHResult queried 0 0
Destination rewritten before or after the poll 0 0
  • The title only polls completion and never reads the error. It polls IsComplete on each failed request's status entry and never calls GetHResult, so a refused page completes from the title's point of view with its destination untouched. That is the sequence #2083 checks, where a consumer reading the first refused destination as decoded data matches 0 of 4,096 bytes.
  • What this doesn't show. The counting doesn't observe reads, so it doesn't say whether the title then consumes those destinations. That needs a read watch on a refused destination, which I haven't run.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7153178175 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7153178175). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-25T04:48:14Z. --- ## Retest after #2129: the capacity refusals remain Two startup runs on `main` at `19e04be9`, which includes the #2129 field correction and the #2083 fixture. RX 9070 XT, Windows 11 build 26300, Release. Settings are the same as the cold/warm pair posted on #870: post-confirmation input, `-MemoryGiB 32`, `-StartupBelow40`, `-Render -Translate`. Both runs end at the slot 148 builder stop. A local counting-only diagnostic (not for PR) tracks each refused page request through its status queries. Counts only; no offsets, paths or logs. **Failure causes at the last heartbeat:** | | Cold run (290 s) | Warm run (280 s) | Pre-#2129 run (280 s) | |---|---|---|---| | destination capacity | 2,297 | 195 | 538 | | bcpack | 220 | 70 | 87 | | zlib | 7 | 3 | 3 | | read at or past EOF | 2 | 0 | 1 | | Page requests ending exactly at the first 64 KiB page end: failed / all | 2,526 / 7,434 (34%) | 268 / 964 (28%) | 629 / 2,308 (27%) | | Requests ending inside the page: failed | 0 / 22,133 | 0 / 1,016 | 0 / 4,686 | | Requests ending past the page: failed | 0 / 2,602 | 0 / 100 | 0 / 761 | - **The refusals have the same shape as before #2129.** Every failed page request, capacity, bcpack, zlib and EOF alike, still ends exactly at the page end: in each run the causes add up to the at-page-end failures, and no request ending inside or past the page fails. - **The correct `IntermediateSize` field didn't remove them.** So #2129's false size source was not their cause, and the overlong source range stays the open lead. - **Totals vary.** They depend on how much loading a run reaches before the stop: the cold run issued about 15 times as many page requests as the warm run. The proportions are stable. **Status to consumer** (refused page requests tracked through their status queries, as the title issues them): | | Cold | Warm | |---|---|---| | Refused page requests tracked | 2,472 | 268 | | Their status entry polled with `IsComplete` before the stop | 2,457 | 268 | | Never polled before the stop | 15 | 0 | | `GetHResult` queried | 0 | 0 | | Destination rewritten before or after the poll | 0 | 0 | - **The title only polls completion and never reads the error.** It polls `IsComplete` on each failed request's status entry and never calls `GetHResult`, so a refused page completes from the title's point of view with its destination untouched. That is the sequence #2083 checks, where a consumer reading the first refused destination as decoded data matches 0 of 4,096 bytes. - **What this doesn't show.** The counting doesn't observe reads, so it doesn't say whether the title then consumes those destinations. That needs a read watch on a refused destination, which I haven't run. AI-assisted.
R0Y00 commented 2026-11-25 07:01:13 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T06:29:33Z.


The small-texture allocation and copy correction is on main in #2133 (ad394d2d). Independent Windows Release verification gave 8 passed and one AddrLib skip. WARP and RTX 4060 Laptop each matched 1,536 rendered pixels from two mips written through the XG shim, with the reported allocation followed by a guard page. This covers the compact 4 KiB-aligned layout. For a startup A/B, use the same input and initial cache state and count capacity, BCPack, zlib and EOF separately. Please report the first remaining category with a reproducible source-built case if one is available. Keep the overall issue open for the remaining failures.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7154845587 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1198#issuecomment-7154845587). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T06:29:33Z. --- The small-texture allocation and copy correction is on main in #2133 (ad394d2d). Independent Windows Release verification gave 8 passed and one AddrLib skip. WARP and RTX 4060 Laptop each matched 1,536 rendered pixels from two mips written through the XG shim, with the reported allocation followed by a guard page. This covers the compact 4 KiB-aligned layout. For a startup A/B, use the same input and initial cache state and count capacity, BCPack, zlib and EOF separately. Please report the first remaining category with a reproducible source-built case if one is available. Keep the overall issue open for the remaining failures.
Sign in to join this conversation.
No labels
No milestone
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.

Reference
R0Y00/Xbox2Windows#1191
No description provided.