Xeon E5-2670 v3 (Haswell, 16 GB): nothing starts without clwb; with it, menus navigate and loading reaches the world #68
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#68
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@weslley560-bit on GitHub · 2026-11-24 00:10 UTC · original
This host has no
clwb, soemulate_amd_onlydoes not cover it and the titlestops 1.5 s in. With the instruction dealt with, everything up to the world runs
on a 12-year-old CPU.
Hardware: Windows 11 25H2, Intel Xeon E5-2670 v3 (Haswell-EP, 12C/24T), 16 GB,
AMD Radeon RX 6750 XT (RDNA2, 12 GB), Adrenalin 26.11.2, 1920x1080. The game
files are on a F HDD spinning disk.
Build:
mainat1dd7afd,cargo build --profile diag -p victory --features diagnostics.clwbstops it before anything runsVIctory: unhandled exception 0xc000001d at victory-image-b99f876b74d4a77f.dll+0x4ecc84a
rax 0x177d001f rcx 0x177d0000 rdx 0x0 rbx 0x1
#0 +0x4ecc84a
#1 +0x247905f
#2 +0x19f4f54
#3 +0x580437e
#4 +0x43a4911
#5 +0x224070b
#6 +0x23cf00a
#7 +0x2215eca
The instruction at
+0x4ecc84aisclwb(66 41 0f ae 31), inside a write-backloop over a run of cache lines:
0x144ecc841 lea rax, [r9 + rax - 1]
0x144ecc846 and r9, 0xffffffffffffffc0
0x144ecc84a clwb byte ptr [r9]
0x144ecc84f add r9, 0x40
0x144ecc853 cmp r9, rax
0x144ecc856 jbe 0x144ecc84a
clwbcame with Skylake-SP and Zen 2. Haswell, Broadwell, Skylake client,Kaby Lake and Coffee Lake do not have it, so the opcode raises
#UD. Nothing inemulate_amd_onlymatches66 [REX] 0f ae /6, so the exception goes back toEXCEPTION_CONTINUE_SEARCHand the process ends.Frames
+0x224070b,+0x23cf00aand+0x2215ecaare the ones ending #7's traceand #23's, so this is the same startup path: a Raptor Lake has
clwband gets to+0x4e8aa70, a Haswell does not and stops 26 KB earlier.clwbandclflushleave the same bytes in memory;clwbonly keeps the linevalid in cache afterwards. So the site can be rewritten and re-run rather than
emulated —
3ewhere the66was,/7where the/6was:before clwb 66 41 0f ae 31
after clflush 3e 41 0f ae 39
tls.rs:55already protects, writes and restores pages to patch title code, sothe handler does the same: recognise the ModRM,
VirtualProtectthe site,patch it,
FlushInstructionCache, restore the protection, continue. The site isreached once and the loop then runs natively, so it costs no exception per line.
I have this locally and it works; happy to send it as a PR.
What runs with it
DXGI_ERROR_DEVICE_RESET(0x887A0007)That WARP result may be worth knowing for #29: on this AMD card the device holds
through every stage, the same as on the RX 9070 XT and unlike the NVIDIA reports
in #11, #16 and #27. It only fell over on the software adapter.
Where it ends
The world comes up black, as the README says, and a moment later the title
aborts itself:
VIctory: unhandled exception 0xc0000005 at victory-image-b99f876b74d4a77f.dll+0x23cf683 (write 0x0)
rax 0x0 rbx 0x0 rcx 0xd0024c348 rdx 0x1
#0 +0x23cf683
#1 +0x2215c35
#2 +0x2215eca
This is not a bad pointer in our code.
+0x23cf683is a deliberate abort:0x1423cf66b cmp byte ptr [rsp + 0x34], 1
0x1423cf670 jne 0x1423cf683
...
0x1423cf683 mov dword ptr [0], 0x4d8bd421 ; magic, to force the fault
0x1423cf68e add rsp, 0x48
0x1423cf692 ret
A compare against
1fails and the code writes a magic value through a nullpointer to raise the exception.
0x4d8bd421appears once in the whole image.Its caller is a guarded indirect call, which is a registered callback:
0x142215c27 mov rax, qword ptr [rip + 0x4fa071a]
0x142215c2e test rax, rax
0x142215c31 je 0x142215c35
0x142215c33 call rax
0x142215c35 mov dword ptr [0], 0 ; the NULL-callback path, not taken
So the callback fired and asserted from the inside. Whatever it checks was not
what it wanted at the first world frame.
This ran on
1dd7afd.35b054esays copy-backs of shader-written ranges"used to overwrite what the title's CPU wrote meanwhile, which crashed the
title", which sounds like exactly this. I will rebuild at
35b054eand reportwhether it stays up, but I am filing the
clwbpart now because it is separateand affects every CPU older than Skylake.
Not #23
I checked whether this was the 6.5 GB
XMemVirtualAllocfailure, and it is not.The page file is 25 GB with a peak use of 4.7 GB, so the commit limit was never
the wall here; there is no
os error 1455anywhere in the log. The title's ownreport at the abort reads
memory.load_percent86 withsystem.memory.free2300596, so memory was tight but nothing refused anallocation.
Smaller things
crashes.loglands in%LOCALAPPDATA%\victory\data\7952987A\crashes.log,because
run.rsdoestemp.with_file_name("crashes.log"). The README says thedata folder. I looked in the wrong place first.
victory_gpu::copystatshows 431 to 728 page faults per frame during themenus. With the archives on a spinning disk, some of that may be the title
streaming; I have not separated it from our copy path.
What I can test
This is the oldest CPU the project is likely to see in practice — anything
before Skylake-SP has the same problem — and I have it permanently, on RDNA2,
which is what the project is developed against. I can run any build you want and
report the next fault, and I can send the
clwbchange as a PR.