Early init: an empty pack-name table (12 joaat keys) — how is it built? #161

Open
opened 2026-11-26 04:13:07 +00:00 by github-bot · 5 comments
Owner

@⁠sub-north on GitHub · 2026-11-23 18:01 UTC · original

Retail Scarlett bring-up: an early validator finds an empty pack-name table

We are bringing up a retail Scarlett title under xcl in a GPU-PV VM (Windows 11 guest, RTX 4070 Ti SUPER,
XCL_NETWORK=0). Three observations, one question that we cannot answer from static analysis.

Where it stops

The title gets through XMem virtual/physical pages, D3D12ConfigureVirtualMemoryX, D3D12 device + heap,
XGameRuntime init, GameInput create, the DirectStorage factory (IID 62959d11-d45f-4884-a0a3-f7862ea243ae),
XPackage identity and PLS. It then stops on its own int3 in early init.

A crash-time probe reads the object the validator receives:

  • {tag=12, count=12, list} where the list is 12 Jenkins one-at-a-time hashes
  • eleven of them are the game's pack names by hash: common, data, shaders, textures, script, audio, movies, packs, levels, anim, navmeshes
  • the table it checks them against has count 0 and its control bytes are all 0x80 (empty)
  • stepping over the int3 does not save it: execution then writes to address 0 inside vcruntime140,
    so the break guards a real precondition

What static analysis says

  • the lookup (0x110-byte slots) has no insert anywhere in the image; the only empty-marker constant is
    referenced once, from a different table
  • a real insert exists for a 0x290-byte table, reached from the same init function
  • mounting and device-commit paths do not reach either table (direct-call BFS, depth 4)

So either the console's table arrives by memcpy of a prepared table (and our settings blob does not
carry it), or we are reading the wrong structure.

Question: has anyone seen an early RAGE init build a pack-name table from prepared storage rather than
by inserts, and is there a known order requirement between registering pack devices and validating the
pack list?

Two smaller ones

  1. DirectStorage refusals are silent. With only the PC factory IID answered, DStorageGetFactory
    returns E_NOINTERFACE with no log line and unknown_iids empty; the title then fails far away with
    rax=0x80004002. A WARN naming the refused IID would have saved us a run. We have a logging-only patch.
  2. GameInputDeviceInfo size. We return 0x3f0 with null gamepadInfo/displayName/deviceStrings;
    a console struct is reported as 0x180. Is there a known expected size for Scarlett titles?

One question about your results

The handoff mentions a retail title running 45 s and a first frame at 3.6 s. Which title and commit was
that, and is a log or command line available? We would like to compare the boot sequence rather than guess.

Evidence we can share

  • XPackage: GetCurrentProcessPackageIdentifier -> '<id>' (30 chars, buffer 33) -> 0x00000000
  • GameInput: GetDeviceInfo -> size 0x3f0, family 1, caps 0x8, input 0x104000e
  • unhandled exception 0x80000003 in the title, called_stubs: [], unknown_iids: []
  • probe: 12 keys, table count 0, control bytes 0x80
**@⁠sub-north** on GitHub · 2026-11-23 18:01 UTC · [original](https://github.com/xcl-dev/xcl/issues/161) # Retail Scarlett bring-up: an early validator finds an empty pack-name table We are bringing up a retail Scarlett title under xcl in a GPU-PV VM (Windows 11 guest, RTX 4070 Ti SUPER, `XCL_NETWORK=0`). Three observations, one question that we cannot answer from static analysis. ## Where it stops The title gets through XMem virtual/physical pages, `D3D12ConfigureVirtualMemoryX`, D3D12 device + heap, XGameRuntime init, GameInput create, the DirectStorage factory (IID `62959d11-d45f-4884-a0a3-f7862ea243ae`), XPackage identity and PLS. It then stops on its own `int3` in early init. A crash-time probe reads the object the validator receives: - `{tag=12, count=12, list}` where the list is 12 Jenkins one-at-a-time hashes - eleven of them are the game's pack names by hash: `common, data, shaders, textures, script, audio, movies, packs, levels, anim, navmeshes` - the table it checks them against has **count 0** and its control bytes are all `0x80` (empty) - stepping over the `int3` does not save it: execution then writes to address 0 inside `vcruntime140`, so the break guards a real precondition ## What static analysis says - the lookup (`0x110`-byte slots) has no insert anywhere in the image; the only empty-marker constant is referenced once, from a *different* table - a real insert exists for a `0x290`-byte table, reached from the same init function - mounting and device-commit paths do not reach either table (direct-call BFS, depth 4) So either the console's table arrives by **memcpy of a prepared table** (and our settings blob does not carry it), or we are reading the wrong structure. **Question:** has anyone seen an early RAGE init build a pack-name table from prepared storage rather than by inserts, and is there a known order requirement between registering pack devices and validating the pack list? ## Two smaller ones 1. **DirectStorage refusals are silent.** With only the PC factory IID answered, `DStorageGetFactory` returns `E_NOINTERFACE` with no log line and `unknown_iids` empty; the title then fails far away with `rax=0x80004002`. A WARN naming the refused IID would have saved us a run. We have a logging-only patch. 2. **`GameInputDeviceInfo` size.** We return `0x3f0` with null `gamepadInfo`/`displayName`/`deviceStrings`; a console struct is reported as `0x180`. Is there a known expected size for Scarlett titles? ## One question about your results The handoff mentions a retail title running 45 s and a first frame at 3.6 s. Which title and commit was that, and is a log or command line available? We would like to compare the boot sequence rather than guess. ## Evidence we can share - `XPackage: GetCurrentProcessPackageIdentifier -> '<id>' (30 chars, buffer 33) -> 0x00000000` - `GameInput: GetDeviceInfo -> size 0x3f0, family 1, caps 0x8, input 0x104000e` - `unhandled exception 0x80000003` in the title, `called_stubs: []`, `unknown_iids: []` - probe: 12 keys, table count 0, control bytes `0x80`
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:13:07 +00:00
Author
Owner

@⁠ryosen0 on GitHub · 2026-11-23 18:08 UTC · original

We can answer part of this from the same retail title outside a VM (Windows 11 host, RTX 3060 Ti, ShyVortex fork main @ 2026-11-23, XCL_NETWORK=0): our run gets past the pack-name validator — 50,698 pipelines translated, 2 presents, then the deterministic null-write at +0x2215c35 (see our comment in #159). So the empty-table int3 you hit is not universal for this package; something in the GPU-PV path or the settings blob differs.

On the 12 joaat keys: we independently carved and analyzed this title's audio.rpf config for a radio-mod tool, and the pack set matches your eleven names. Two data points that may help:

  1. The keys are plain joaat of the bare pack names. Verified vectors from our side: joaat("radio_vcrr") = 0xA7E557A1 matches a descriptor hash in the audio config byte-for-byte, so the game's Jenkins implementation is the standard one (lowercase, no seed). If your probe shows the 12 hashes, computing joaat over the pack file stems should reproduce 11 of them exactly; the 12th is likely a non-file entry (e.g. a virtual/common mount).
  2. Our run never hits the int3, with the game's own MicrosoftGame.Config present in the folder and XCL answering XPackage identity from it. If your VM setup strips or renames the config, the "prepared storage" the table is memcpy'd from may be exactly that path: our mount order is the plain xcl run <game dir> one, no custom settings blob.

Happy to run a patched build with logging around the 0x110-slot table init (insert vs memcpy, source address) on the host where it works, and diff against your VM probe — that would settle whether the table arrives prepared or is built by inserts we're both missing. We have the title locally and can re-run quickly.

Also +1 on the DirectStorage silent-refusal WARN: we saw the same class of far-away failure before XCL_NETWORK=0 was set; a named IID log line is cheap and saves runs.

**@⁠ryosen0** on GitHub · 2026-11-23 18:08 UTC · [original](https://github.com/xcl-dev/xcl/issues/161#issuecomment-7109710909) We can answer part of this from the **same retail title outside a VM** (Windows 11 host, RTX 3060 Ti, ShyVortex fork main @ 2026-11-23, `XCL_NETWORK=0`): our run gets **past** the pack-name validator — 50,698 pipelines translated, 2 presents, then the deterministic null-write at `+0x2215c35` (see our comment in #159). So the empty-table `int3` you hit is not universal for this package; something in the GPU-PV path or the settings blob differs. On the 12 joaat keys: we independently carved and analyzed this title's `audio.rpf` config for a radio-mod tool, and the pack set matches your eleven names. Two data points that may help: 1. **The keys are plain joaat of the bare pack names.** Verified vectors from our side: `joaat("radio_vcrr") = 0xA7E557A1` matches a descriptor hash in the audio config byte-for-byte, so the game's Jenkins implementation is the standard one (lowercase, no seed). If your probe shows the 12 hashes, computing `joaat` over the pack file stems should reproduce 11 of them exactly; the 12th is likely a non-file entry (e.g. a virtual/common mount). 2. **Our run never hits the int3**, with the game's own `MicrosoftGame.Config` present in the folder and XCL answering XPackage identity from it. If your VM setup strips or renames the config, the "prepared storage" the table is memcpy'd from may be exactly that path: our mount order is the plain `xcl run <game dir>` one, no custom settings blob. Happy to run a patched build with logging around the `0x110`-slot table init (insert vs memcpy, source address) on the host where it works, and diff against your VM probe — that would settle whether the table arrives prepared or is built by inserts we're both missing. We have the title locally and can re-run quickly. Also +1 on the DirectStorage silent-refusal WARN: we saw the same class of far-away failure before `XCL_NETWORK=0` was set; a named IID log line is cheap and saves runs.
Author
Owner

@⁠sub-north on GitHub · 2026-11-23 18:10 UTC · original

Thanks - that is the most useful data point we have had. Your run gets past the validator on the same package, so the empty table is ours, not the title's.

Our setup, for the diff:

  • GPU-PV VM: Windows 11 guest, RTX 4070 Ti SUPER, wave 32..32, network off, XCL_NETWORK=0.
  • MicrosoftGame.Config is present and parsed (XCL logs PLS 2048 MB, TitleId ...).
  • Plain xcl run <game dir>; no custom settings blob.
  • The validator is reached at ~0.7 s, with the settings object carrying count=12 and the table at [[Stage+0x2a8]+0x78] holding control bytes 0x80 and count 0.

We would take you up on the patched build. What would settle it for us, in order of value:

  1. At the 0x110-slot table init: is it an insert or a memcpy? If memcpy: source address and size, and what produced that source.
  2. The table's count and first control byte at first use (the validator) on your host - if it is non-zero there, we can compare against our empty probe directly.
  3. Your exact fork/commit so we can build the same tree and run the same instrumented build in our VM. If the fork carries changes beyond ivall/xcl main that touch mounts or settings, that is itself a candidate difference.

Our side of the instrumentation is a crash-time memory probe (patch 0004 in our lab repo, logging only): XCL_CRASH_PROBE=addr:len,tls0,reg. We can add a matching token that dumps the table and its source pointer at the validator, so both logs are directly comparable.

Also noted on your +0x2215c35 null-write: we see a null write at +0x5b29847 when we step over the validator, so your post-validator stop may be the same class with a different frame.

If it helps, we will publish the probe patch and the exact command line; nothing game-specific is needed from either side.

**@⁠sub-north** on GitHub · 2026-11-23 18:10 UTC · [original](https://github.com/xcl-dev/xcl/issues/161#issuecomment-7109767676) Thanks - that is the most useful data point we have had. Your run gets past the validator on the same package, so the empty table is ours, not the title's. Our setup, for the diff: - GPU-PV VM: Windows 11 guest, RTX 4070 Ti SUPER, wave 32..32, network off, `XCL_NETWORK=0`. - `MicrosoftGame.Config` is present and parsed (XCL logs `PLS 2048 MB, TitleId ...`). - Plain `xcl run <game dir>`; no custom settings blob. - The validator is reached at ~0.7 s, with the settings object carrying count=12 and the table at `[[Stage+0x2a8]+0x78]` holding control bytes `0x80` and count 0. We would take you up on the patched build. What would settle it for us, in order of value: 1. At the 0x110-slot table init: is it an **insert** or a **memcpy**? If memcpy: source address and size, and what produced that source. 2. The table's count and first control byte at **first use** (the validator) on your host - if it is non-zero there, we can compare against our empty probe directly. 3. Your **exact fork/commit** so we can build the same tree and run the same instrumented build in our VM. If the fork carries changes beyond `ivall/xcl` main that touch mounts or settings, that is itself a candidate difference. Our side of the instrumentation is a crash-time memory probe (patch `0004` in our lab repo, logging only): `XCL_CRASH_PROBE=addr:len,tls0,reg`. We can add a matching token that dumps the table and its source pointer at the validator, so both logs are directly comparable. Also noted on your `+0x2215c35` null-write: we see a null write at `+0x5b29847` when we step over the validator, so your post-validator stop may be the same class with a different frame. If it helps, we will publish the probe patch and the exact command line; nothing game-specific is needed from either side.
Author
Owner

@⁠sub-north on GitHub · 2026-11-23 19:08 UTC · original

One clarification that matters for reproducing your result.

ShyVortex/xcl main moved at 18:11Z (db5dc26 -> 956a476), i.e. after your comment at 18:08Z, and the two trees are now identical to upstream. Could you confirm the exact SHA you built?

More useful: at the validator itself, what are the two values we differ on?

  • count = dword at [Y+0x10] where Y = [[Stage+0x2a8]+0x78]
  • the first control byte at base = [Y+0x18]

In our GPU-PV VM both read zero (count 0, no base), so the 12 joaat keys have nothing to match and the assert fires at +0x1CE6E13. If yours is non-zero there, that is the entire difference and we can target it directly.

No patch needed for that: one ? expression in cdb at the break, or our crash-time probe (patch 0004, logging only) prints it.

We are not asking for files or game data - just the two numbers and the SHA.

**@⁠sub-north** on GitHub · 2026-11-23 19:08 UTC · [original](https://github.com/xcl-dev/xcl/issues/161#issuecomment-7111150980) One clarification that matters for reproducing your result. `ShyVortex/xcl` main moved at 18:11Z (`db5dc26` -> `956a476`), i.e. after your comment at 18:08Z, and the two trees are now identical to upstream. Could you confirm the exact SHA you built? More useful: at the validator itself, what are the two values we differ on? - `count` = dword at `[Y+0x10]` where `Y = [[Stage+0x2a8]+0x78]` - the first control byte at `base = [Y+0x18]` In our GPU-PV VM both read zero (count 0, no base), so the 12 joaat keys have nothing to match and the assert fires at `+0x1CE6E13`. If yours is non-zero there, that is the entire difference and we can target it directly. No patch needed for that: one `?` expression in cdb at the break, or our crash-time probe (patch 0004, logging only) prints it. We are not asking for files or game data - just the two numbers and the SHA.
Author
Owner

@⁠humsterbumster on GitHub · 2026-11-24 05:41 UTC · original

Hi — we're bringing the same retail title (TitleID 7952987A, 1.0.2.1) up on Linux under Wine, using the #257 recipe (Proton Experimental 11.0's wine + its DXVK + vkd3d-proton v3.1 built with vkd3d-proton-xcl.patch and VKD3D_CONFIG=ignore_shared_fence), RTX 5090, DXC 1.9.2609.5, XCL main @ 6025201 (x86_64-pc-windows-gnu). We hit the same int3 at +0x1CE6E13, but our table does not look empty, and we think that is the useful part of this data point.

With XCL_PROBE=292d42d (probes are in main; hardware breakpoints, title continues), read at the helper2 call site +0x292D42D:

  • count = [Y+0x10] = 4
  • base = [Y+0x18] = 0x70156F920

So on our side the table is populated (count non-zero, base non-null). The 288 bytes at base are 16 control bytes + 16×16-byte slots; 14 of the 16 control bytes are occupied (only slots 14/15 are 0x80), and the slot keys are pack names, e.g.:

ctrl: 35 51 73 24 56 55 3e 55 30 6e 09 20 2b 44 80 80
slot0 key 0xAC9E7E35 = joaat("common")     slot7 0x5EB5E655 = joaat("data")
slot8 key 0x275B8A30 = joaat("levels")     slot9 0x2EB2EE6E = joaat("navmeshes")
... 0x9FCE0455 = joaat("core_restofworld001"),  0x8CBF2A2B = joaat("story000_script")

The keys the title looks up (6 calls) are 0xD521D1EA, common, movies, shaders, anim, data — i.e. the packs it has just opened. It still asserts. So "table has control bytes 0x80 / count 0" is one way to reach it, but not the only one — on our side the table has real entries and the assert still fires, which suggests the real condition is a specific key lookup, not the table being empty.

@⁠sub-north: would you be able to dump the same 16 bytes at your base (and count) on the GPU-PV side with XCL_PROBE? If yours is 80-filled and ours is 35 51 73 …-filled, these are two different failure modes and the title is probably missing one particular pack key in each.

Two more observations that may save someone a run:

  1. All 12 .rpf files are present and complete; the VFS log shows the title opens exactly appdata0, common, movies, shaders, anim, data and never enumerates the mount root (FindFirstFile is not called).
  2. If we skip the assert at runtime (XCL_SKIP=1ce6e13 with a local diagnostic build), the title immediately trips further asserts at +0x2224517, +0x1D5CC69, +0xAA406E0, +0xAA49650, +0xAA54517, then takes a null write at vcruntime140.dll+0x19E9 via game+0x5B29847 — so the early-init state is wrong in several places, which is consistent with a table/config that is incomplete rather than one bad check.

Happy to run any instrumented build or dump other addresses — we can reproduce this on demand.

**@⁠humsterbumster** on GitHub · 2026-11-24 05:41 UTC · [original](https://github.com/xcl-dev/xcl/issues/161#issuecomment-7123188764) Hi — we're bringing the same retail title (TitleID 7952987A, 1.0.2.1) up on **Linux under Wine**, using the #257 recipe (Proton Experimental 11.0's `wine` + its DXVK + `vkd3d-proton` v3.1 built with `vkd3d-proton-xcl.patch` and `VKD3D_CONFIG=ignore_shared_fence`), RTX 5090, DXC 1.9.2609.5, XCL `main` @ `6025201` (`x86_64-pc-windows-gnu`). We hit the same `int3` at `+0x1CE6E13`, but our table does **not** look empty, and we think that is the useful part of this data point. With `XCL_PROBE=292d42d` (probes are in `main`; hardware breakpoints, title continues), read at the `helper2` call site `+0x292D42D`: * `count = [Y+0x10]` = **4** * `base = [Y+0x18]` = **0x70156F920** So on our side the table is populated (`count` non-zero, `base` non-null). The 288 bytes at `base` are 16 control bytes + 16×16-byte slots; **14 of the 16 control bytes are occupied** (only slots 14/15 are `0x80`), and the slot keys are pack names, e.g.: ``` ctrl: 35 51 73 24 56 55 3e 55 30 6e 09 20 2b 44 80 80 slot0 key 0xAC9E7E35 = joaat("common") slot7 0x5EB5E655 = joaat("data") slot8 key 0x275B8A30 = joaat("levels") slot9 0x2EB2EE6E = joaat("navmeshes") ... 0x9FCE0455 = joaat("core_restofworld001"), 0x8CBF2A2B = joaat("story000_script") ``` The keys the title looks up (6 calls) are `0xD521D1EA`, `common`, `movies`, `shaders`, `anim`, `data` — i.e. the packs it has just opened. It still asserts. So "table has control bytes 0x80 / count 0" is one way to reach it, but *not the only one* — on our side the table has real entries and the assert still fires, which suggests the real condition is a **specific key lookup**, not the table being empty. @⁠sub-north: would you be able to dump the same 16 bytes at your `base` (and `count`) on the GPU-PV side with `XCL_PROBE`? If yours is `80`-filled and ours is `35 51 73 …`-filled, these are two different failure modes and the title is probably missing one particular pack key in each. Two more observations that may save someone a run: 1. All 12 `.rpf` files are present and complete; the VFS log shows the title opens exactly `appdata0, common, movies, shaders, anim, data` and never enumerates the mount root (`FindFirstFile` is not called). 2. If we skip the assert at runtime (`XCL_SKIP=1ce6e13` with a local diagnostic build), the title immediately trips further asserts at `+0x2224517`, `+0x1D5CC69`, `+0xAA406E0`, `+0xAA49650`, `+0xAA54517`, then takes a **null write** at `vcruntime140.dll+0x19E9` via `game+0x5B29847` — so the early-init state is wrong in several places, which is consistent with a table/config that is incomplete rather than one bad check. Happy to run any instrumented build or dump other addresses — we can reproduce this on demand.
Author
Owner

@⁠sub-north on GitHub · 2026-11-24 13:24 UTC · original

Corroborating from a different binary and a different site — your reading is the one that fits our data.

We had a 409-bucket table (bucket = key % 409, 12-byte chained entries, -1 head = empty) that was populated: our probe read count=409, gen=0x1e, and the chain for the requested key was empty. The lookup returned its 0x3FFFFF miss sentinel and the trap at +0x29DEFB1 fired. The table was never empty. Our first write-up called it an empty table; that was wrong for exactly the reason you give — the assert tests one key's lookup, not the table's population.

Two details that may generalize to your site:

  • Ours is recoverable, not fatal: jne <int3+1>, so taken and trapped paths converge on the same instruction, and the int3 has zero xrefs. A sibling function runs the identical sentinel test and merely skips a block. A miss is an expected state in this code.
  • Ours was caused by data, not by an unregistered subsystem: an incomplete copy of a 20 GB archive on the run volume. Once the archive was byte-identical, the assert stopped firing entirely and init proceeded.

So before concluding the pack table is never built, check payload hash-completeness on the run volume.

**@⁠sub-north** on GitHub · 2026-11-24 13:24 UTC · [original](https://github.com/xcl-dev/xcl/issues/161#issuecomment-7132791874) Corroborating from a different binary and a different site — your reading is the one that fits our data. We had a 409-bucket table (`bucket = key % 409`, 12-byte chained entries, `-1` head = empty) that was populated: our probe read `count=409`, `gen=0x1e`, and the chain for the requested key was empty. The lookup returned its `0x3FFFFF` miss sentinel and the trap at `+0x29DEFB1` fired. The table was never empty. Our first write-up called it an empty table; that was wrong for exactly the reason you give — the assert tests one key's lookup, not the table's population. Two details that may generalize to your site: - Ours is recoverable, not fatal: `jne <int3+1>`, so taken and trapped paths converge on the same instruction, and the `int3` has zero xrefs. A sibling function runs the identical sentinel test and merely skips a block. A miss is an expected state in this code. - Ours was caused by data, not by an unregistered subsystem: an incomplete copy of a 20 GB archive on the run volume. Once the archive was byte-identical, the assert stopped firing entirely and init proceeded. So before concluding the pack table is never built, check payload hash-completeness on the run volume.
This discussion has been locked. Commenting is limited to contributors.
No description provided.