Skip to content

docs/boot: --run has been run on the retail executable (RT-561) - #7982

Closed
bobczan wants to merge 3 commits into
ProjectLeonida:mainfrom
bobczan:docs/boot-run-rt561
Closed

bobczan wants to merge 3 commits into
ProjectLeonida:mainfrom
bobczan:docs/boot-run-rt561

Conversation

@bobczan

@bobczan bobczan commented Nov 23, 2026 •

Copy link
Copy Markdown

#7599 — RT-561

docs/boot.md's status line says --run has not been run on the retail executable. It has been, repeatedly, by
several people; what is true is that on main it does not get as far as device creation. Left as it is, the page reads
as if nobody has tried.

This changes the two status sentences and nothing else: no command block, no procedure, no question table.

What the line now says

  • --dry-run, --init and --run have all been run.
  • A --run on main maps the package, runs the TLS callbacks and reaches the title's own setup, then faults before
    any D3D12 call on the title's hardcoded TLS index 0 (#8452),
    and the fault differs between runs.
  • The PRs that carry it further, and the stop each one clears, are in
    retail_boot_chain.md — so the page points at the maintained record instead of
    restating a stop that changes daily.

Basis, all from runs on the retail executable (LEONIDA_D3D12=vulkan, Windows 11, MSVC 19.44, RTX 5070):

Configuration Result
main alone 0xc0000005 at a fixed offset in the executable, not reproducible (rc=139, then rc=127), no D3D12 call
main + #8379 5/5 identical, 0 occurrences of that address; stops at the XErrorReport lookup (verification)
+ #6582 + #8461 + #6964 passes XErrorReport, DStorageGetFactory, then device slot 26 — i.e. it does reach D3D12 with a stack

So the difference between "faults before D3D12" and "reaches D3D12" is the stack, not the executable, which is what the
sentence needs to convey.

Independent check: @YordiLorenzo ran it
on Linux, Python 3.14.4: 9 of 11 doc tests OK (cli_flags and links fail the same on main, nothing in boot.md),
check_no_game_data exit 0, merges clean, link resolves.

No game data: error classes, exit codes and stop addresses already public in #8452 only; traces stayed local.

Claimed as RT-561 in #7599. AI-assisted (Hermes).

The status line said --run had not been run. It has: on main the run maps the
package, runs the TLS callbacks and reaches the title's own setup, then ends in an
exception before any D3D12 call, non-deterministically. Point the reader at
docs/retail_boot_chain.md for the PRs that carry it further rather than leaving the
page implying no run exists.

RT-561 in ProjectLeonida#7599.
@YordiLorenzo

Copy link
Copy Markdown

Tested af6ee4c on Linux, Python 3.14.4: pass

  • python -I tests/test_docs_*.py: 9 of 11 OK, cli_flags (embedded_shaders.md) and links (gpu_test_results.md) fail the same on main, nothing in boot.md
  • python -I scripts/check_no_game_data.py docs/boot.md: exit 0. git diff --check clean, merges clean with main
  • The retail_boot_chain.md link resolves, and its sections are all measured with PRs merged on top of main, which fits "not on main alone". The retail runs themselves I can't redo here

The status line said the exception varies from run to run. The cause is known
(ItsNotRexed#8452): the image reads TLS index 0 hardcoded, so on a host where the main image
is not slot 0 the allocator singleton comes back invalid. Say that, and cite the
issue, instead of describing it as an unnamed varying exception.
@bobczan

bobczan commented Nov 23, 2026

Copy link
Copy Markdown
Author

Thanks — that is the same result I get on Windows (9/11 doc tests, the two failures identical to main), so the PR now has a Linux and a Windows run behind it.

I pushed one improvement since your test (ef97fff9f), because the statement "which exception varies from run to run" is now explained rather than mysterious: it is the title reading TLS index 0 hardcoded, which is only correct when the main image owns that slot — #8452. The line now names that and cites the issue.

The runs behind it, so the claim is checkable rather than asserted:

Windows 11, MSVC 19.44, RTX 5070. AI-assisted (Hermes).

The line said 30 unimplemented imports. main's runtime_imports.md still says 30
while noting two of them are served now, and a dry run against a build with the
merged shims reports 19 -- the number moves with every shim PR, so a doc that
repeats it is wrong most of the time. Point at the table instead, which is the
thing that is kept current.
@bobczan

bobczan commented Nov 23, 2026

Copy link
Copy Markdown
Author

Third commit (21f330c35), from a check of what has landed since the PR opened.

The line said "30 imports unimplemented". That number is now wrong three ways at once: main is nearly current and its runtime_imports.md still says 30 while noting two are served; a dry run against a build carrying the merged shims reports 19; and every shim PR moves it. A doc that repeats a drifting count is wrong most of the time, so the sentence now points at the table that is kept current instead, and the count is gone.

Measured, not assumed: gta6rt --dry-run with LEONIDA_UNIMPLEMENTED=log prints 5 module(s) mapped, 19 unimplemented import(s) on this build (Windows 11, MSVC 19.44, RTX 5070), versus 30 when the line was written.

Doc checks re-run after the edit: link check reports nothing for boot.md (the one failure is docs/dev-tools.md, same as on main), check_no_game_data exit 0, test_docs_list_items pass.

AI-assisted (Hermes).

@bobczan

bobczan commented Nov 23, 2026

Copy link
Copy Markdown
Author

Evidence that the count this PR removes is actively wrong, from main as it stands (867d922f0):

  • docs/boot.md line 5: "leaves 30 imports unimplemented"
  • docs/runtime_imports.md: 23, in the same repository, describing the same dry run

Both are on main right now, and the gap grew because shim PRs (xmem's seven imports among them) served the imports without anyone updating the sentence. That is the reason this PR drops the number rather than correcting it to 23: the next shim merge makes 23 wrong too, and nobody notices until the two documents disagree again.

Pointing at the table is the fix that does not rot. Nothing else in the PR changes.

AI-assisted (Hermes).

@OlaiFG7

OlaiFG7 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Reviewed 21f330c, docs read, AI-assisted: the docs/boot.md diff crosses no rule: no addresses or bytes, the link and anchor resolve, and dropping the 30-count in favour of the table in runtime_imports.md is sound. One request about the PR text rather than the diff: the PR body and comments quote a fault address (+0x104075); it is already public in #8452, but it is an executable offset, so please remove it from the PR text.

@bobczan

bobczan commented Nov 23, 2026

Copy link
Copy Markdown
Author

Done — thank you for catching it.

Removed the executable offset from the PR description and edited the earlier comment that quoted it. Both now say "a fixed offset in the executable" instead; the mechanism (a fault the loader clears once the title gets its own TLS at index 0) reads the same without the address. It was already public in #8452, but you are right that it should not be repeated here.

Nothing in the diff changes: docs/boot.md still points at the maintained table in runtime_imports.md instead of carrying a count.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants