allocator freeze #436

Closed
opened 2026-12-04 02:54:22 +00:00 by github-bot · 0 comments
Owner

@⁠mohan-repo-lab on GitHub · 2026-12-04 02:49 UTC · original

GTA VI (7952987A): random freeze, then watchdog crash at +0x2215c35. A game worker spins forever on a circular 16-bit-indexed allocator list

Summary

In the world, after anywhere from 30 seconds to almost 3 hours of play, the
game stops making frames. VIctory's hang watch fires (no frame begun for 10 s),
and about 30 s later the title's own watchdog kills the game on purpose:

VIctory: unhandled exception 0xc0000005 at victory-image-b99f876b74d4a77f.dll+0x2215c35 (write 0x0: nothing mapped there)

The +0x2215c35 write is not the fault. It is the watchdog's deliberate
mov dword [0],0, the same thread-pool function that starts the workers
(+0x2215ea0/+0x2215eca). The real problem shows in the hang-watch dumps: in
every case, one title worker sits in a list-walking loop, at the same
instruction in the 10 s and the 20 s dump
. The list's 16-bit next indices
form a cycle, so the walk never ends. title-main waits for that worker, and
no frame begins.

This reproduced 10 times over two days, on three VIctory builds. Some of the
title's detail patches (below) make it much more frequent: under 15 minutes
instead of over 1 hour.

Environment

VIctory 8585cd4, 6064c04 and dc9b7b5 (all reproduce), image victory-image-b99f876b74d4a77f.dll
Title 7952987A, build 930.048.020-vb_sub_story, profile Series X (CONSOLE=series-x)
Runtime Proton Experimental experimental-11.0-20261123b, ntsync up
Graphics VIctory's patched RADV/vkd3d from setup.sh; RX 6750 XT 12 GB (Navi 22, RDNA2)
CPU / RAM Ryzen 5 5600X (6C/12T), 32 GB + 16 GB swap, KEEP_FREE=8192
OS Manjaro, kernel 6.18.63
Output 1920x1080, VICTORY_FSR_4K=quality, BVH_BUILDER=0, no frame generation

tools/wake-race.sh passes on this Proton ("ok: no damage in 30 s"), so this
is not the Wine wait-on-address wake race fixed by 81e52628b.

Where it spins

Two loops, and both read the same list (nodes of 20 bytes, linked by 16-bit
indices, in an array whose base pointer is at 0x14908f020; head/sentinel
words at 0x14908f030/0x14908f032). Image base 0x140000000.

Loop A, +0x2626867..0x2626881 (seen in 7 dumps), a first-fit search over
the free list:

142626867: movzx r10d, ax
14262686b: lea   r10, [r10+r10*4]
14262686f: lea   r10, [r8+r10*4]          ; node = base + idx*20
142626873: cmp   dword [r10+0xc], edx     ; node.size >= wanted ?
142626877: jae   0x142626887              ; <- stuck here / +0x262686b / +0x262686f
142626879: movsx eax, word [r10+0x4]      ; idx = node.next
14262687e: cmp   eax, r11d                ; == sentinel ?
142626881: jne   0x142626867

Stack of the stuck worker (the same every time):

#0 +0x2626877   #1 +0xbc0576   #2 +0xbc03b5   #3 +0x82cd46   #4 +0x300292
#5 +0x51c39e1   #6 +0x257035e  #7 +0x221c29c  #8 +0x2215eca (worker entry)

Loop B, +0xad522d..0xad5241 (seen in 3 dumps), walks the same kind of
16-bit chain via +0x2:

140ad522d: cmp   r8w, cx
140ad5231: jae   0x140ad5274
140ad5233: movzx r8d, r8w
140ad5237: lea   r8, [r8+r8*4]
140ad523b: movzx r8d, word [r15+r8*4+0x2] ; idx = node.next
140ad5241: jmp   0x140ad522d              ; <- stuck here / +0xad5231 / +0xad523b

A 16-bit list is walked in microseconds, so a 10 s+ spin means a cycle in the
links
, not a long list. Something broke the list's invariants.

The list is lock-protected. The caller at +0xbc0530 takes a title lock
before touching it and releases it after (tail jump):

140bc0539: lea  rcx, [rip+...]   ; 0x1476b8e70  (lock object)
140bc0542: call 0x140004b40      ; title's own lock: reads gs:0x58 (TLS), [rcx+0x1c], [rcx]
...
140bc0571: call 0x142626830      ; loop A
...
140bc0596: lea  rcx, [rip+...]   ; 0x1476b8e70, then jmp to the unlock

So either the lock does not give mutual exclusion under VIctory (the
lock/atomics/TLS it relies on), or something outside the lock writes over the
list's memory (0x14908eff0/0x14908f020 and the node array they point to).

title-main at the hang (it waits for the worker):

#0 ntdll+0xea94 #1 kernelbase+0x72b8f #2 +0x509898d #3 +0x6c539a (or +0x67b779)
#4 +0x6c5360 (or +0x67b74e) ... +0x21b6d20/+0x21b6cee  +0x81269b  +0x53ec040
+0x53ebf3a  +0x661f0  +0x1d109c9  +0x5a91c0d  +0x56a1e5a  victory.exe

Settings that make it frequent

AMD Ryzen 5 5600X
AMD Radeon RX 6750 XT, 12 GB GDDR6
32 GB RAM

Every crash below has the same signature (hang watch, then +0x2215c35). The
detail patches in play: VICTORY_SHADOW_CASCADES, LOW_SHADOWS,
GRASS_SHADOWS, VOLUMETRIC_QUALITY, SMALL_CULL, TREE_QUALITY and
WORLD_DIST_SCALE.

When Detail patches on Time to freeze Loop
12-02 16:16 all 7 (+SHADOW_DIST=low) 4 min 38 s (log rotated)
12-02 16:26 all 7 34 s B +0xad5241
12-02 19:21 none 2 h 46 min A +0x2626877
12-02 21:46 none (POOL_MOVE=0, LOD_SCALE=0.5) 2 h 18 min A +0x2626877
12-03 11:34 none 2 h 11 min (log rotated)
12-03 17:13 all 7 14 min 36 s A +0x262686f
12-03 17:24 all 7 9 min 10 s B +0xad5241
12-03 17:26 none 35 min, no crash (quit) n/a
12-03 19:31 the 3 shadow ones 1 h 25 min A +0x2626877
12-03 20:10 shadow + VOLUMETRIC_QUALITY + SMALL_CULL 34 min A +0x2626877
12-03 21:41 the same 1 h 24 min B +0xad5241 (dc9b7b5)
  • All 7 on: 4 freezes, every one within 15 minutes.
  • None of them: 3 freezes at 2 h 11–2 h 46; one 35 min session without one.
  • With the 5 cleared settings on: 34 min – 1 h 25.
  • So it happens without any of these patches, but with all of them the
    freeze comes about 10× sooner. Still being narrowed down: TREE_QUALITY=2
    vs. WORLD_DIST_SCALE=0.8.

Not the cause (the freeze kept coming with each changed):
VICTORY_POOL_MOVE (0 and 1), VICTORY_UI_PLANE, VICTORY_LOD_SCALE
(0.35–0.5), FSR quality vs. balanced, the four experimental switches
(PARTS_ONE_CALL, KEEP_HOST_BUFFERS, RECORD_RANGES, RECORD_PLACES:
on in all 12-03 runs, which include both quick and long ones), and the
location (seven different places across the map).

Title state at the freezes: the title's own crash report shows
Pool: ~591978xxx/624951280 every time (its steady state, not a spike),
TileHeap ~3.0–3.1 GB / 6.2 GB, 100–230 streaming requests, normal ped and
vehicle counts. VRAM pressure is low (one "no room for more" warning in the
whole session).

Repro

  1. Series X profile, 1920x1080 + FSR quality, with
    VICTORY_SHADOW_CASCADES=2 VICTORY_LOW_SHADOWS=1024 VICTORY_GRASS_SHADOWS=0 VICTORY_VOLUMETRIC_QUALITY=2 VICTORY_SMALL_CULL=2.5 VICTORY_TREE_QUALITY=2 VICTORY_WORLD_DIST_SCALE=0.8.
  2. Play in the world (driving helps). It freezes within about 15 minutes.
  3. Without these patches it still happens, after 30 min to 3 h.

Suggestions

  • When the hang watch fires, dump the list (0x14908f020 base, 0x14908f030
    head) and the lock at 0x1476b8e70 (owner, count). A cycle with the lock
    free, or a cycle with two owners, tells the two hypotheses apart.
  • Check what the lock at 0x140004b40 relies on (gs:0x58 TLS slot, lock-prefixed
    or interlocked ops) under VIctory's TLS/thread setup.
  • A data watchpoint on the node array's next words from outside
    +0xbc0530's locked region would show a stray writer, if there is one.

Logs

Available on request: the local/run/play-*.log files with the hang-watch
dumps of all 132 threads (10 s and 20 s) and the title's *.crash.log files
from T:\ for each crash above.

**@⁠mohan-repo-lab** on GitHub · 2026-12-04 02:49 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/436) # GTA VI (7952987A): random freeze, then watchdog crash at +0x2215c35. A game worker spins forever on a circular 16-bit-indexed allocator list ## Summary In the world, after anywhere from 30 seconds to almost 3 hours of play, the game stops making frames. VIctory's hang watch fires (`no frame begun for 10 s`), and about 30 s later the title's own watchdog kills the game on purpose: ``` VIctory: unhandled exception 0xc0000005 at victory-image-b99f876b74d4a77f.dll+0x2215c35 (write 0x0: nothing mapped there) ``` The `+0x2215c35` write is not the fault. It is the watchdog's deliberate `mov dword [0],0`, the same thread-pool function that starts the workers (`+0x2215ea0`/`+0x2215eca`). The real problem shows in the hang-watch dumps: in every case, **one title worker sits in a list-walking loop, at the same instruction in the 10 s and the 20 s dump**. The list's 16-bit `next` indices form a cycle, so the walk never ends. `title-main` waits for that worker, and no frame begins. This reproduced 10 times over two days, on three VIctory builds. Some of the title's detail patches (below) make it much more frequent: under 15 minutes instead of over 1 hour. ## Environment | | | |---|---| | VIctory | `8585cd4`, `6064c04` and `dc9b7b5` (all reproduce), image `victory-image-b99f876b74d4a77f.dll` | | Title | 7952987A, build `930.048.020-vb_sub_story`, profile Series X (`CONSOLE=series-x`) | | Runtime | Proton Experimental `experimental-11.0-20261123b`, ntsync up | | Graphics | VIctory's patched RADV/vkd3d from `setup.sh`; RX 6750 XT 12 GB (Navi 22, RDNA2) | | CPU / RAM | Ryzen 5 5600X (6C/12T), 32 GB + 16 GB swap, `KEEP_FREE=8192` | | OS | Manjaro, kernel 6.18.63 | | Output | 1920x1080, `VICTORY_FSR_4K=quality`, `BVH_BUILDER=0`, no frame generation | `tools/wake-race.sh` **passes** on this Proton ("ok: no damage in 30 s"), so this is not the Wine wait-on-address wake race fixed by 81e52628b. ## Where it spins Two loops, and both read the same list (nodes of 20 bytes, linked by 16-bit indices, in an array whose base pointer is at `0x14908f020`; head/sentinel words at `0x14908f030`/`0x14908f032`). Image base `0x140000000`. **Loop A**, `+0x2626867..0x2626881` (seen in 7 dumps), a first-fit search over the free list: ``` 142626867: movzx r10d, ax 14262686b: lea r10, [r10+r10*4] 14262686f: lea r10, [r8+r10*4] ; node = base + idx*20 142626873: cmp dword [r10+0xc], edx ; node.size >= wanted ? 142626877: jae 0x142626887 ; <- stuck here / +0x262686b / +0x262686f 142626879: movsx eax, word [r10+0x4] ; idx = node.next 14262687e: cmp eax, r11d ; == sentinel ? 142626881: jne 0x142626867 ``` Stack of the stuck worker (the same every time): ``` #0 +0x2626877 #1 +0xbc0576 #2 +0xbc03b5 #3 +0x82cd46 #4 +0x300292 #5 +0x51c39e1 #6 +0x257035e #7 +0x221c29c #8 +0x2215eca (worker entry) ``` **Loop B**, `+0xad522d..0xad5241` (seen in 3 dumps), walks the same kind of 16-bit chain via `+0x2`: ``` 140ad522d: cmp r8w, cx 140ad5231: jae 0x140ad5274 140ad5233: movzx r8d, r8w 140ad5237: lea r8, [r8+r8*4] 140ad523b: movzx r8d, word [r15+r8*4+0x2] ; idx = node.next 140ad5241: jmp 0x140ad522d ; <- stuck here / +0xad5231 / +0xad523b ``` A 16-bit list is walked in microseconds, so a 10 s+ spin means **a cycle in the links**, not a long list. Something broke the list's invariants. **The list is lock-protected.** The caller at `+0xbc0530` takes a title lock before touching it and releases it after (tail jump): ``` 140bc0539: lea rcx, [rip+...] ; 0x1476b8e70 (lock object) 140bc0542: call 0x140004b40 ; title's own lock: reads gs:0x58 (TLS), [rcx+0x1c], [rcx] ... 140bc0571: call 0x142626830 ; loop A ... 140bc0596: lea rcx, [rip+...] ; 0x1476b8e70, then jmp to the unlock ``` So either the lock does not give mutual exclusion under VIctory (the lock/atomics/TLS it relies on), or something outside the lock writes over the list's memory (`0x14908eff0`/`0x14908f020` and the node array they point to). `title-main` at the hang (it waits for the worker): ``` #0 ntdll+0xea94 #1 kernelbase+0x72b8f #2 +0x509898d #3 +0x6c539a (or +0x67b779) #4 +0x6c5360 (or +0x67b74e) ... +0x21b6d20/+0x21b6cee +0x81269b +0x53ec040 +0x53ebf3a +0x661f0 +0x1d109c9 +0x5a91c0d +0x56a1e5a victory.exe ``` ## Settings that make it frequent AMD Ryzen 5 5600X AMD Radeon RX 6750 XT, 12 GB GDDR6 32 GB RAM Every crash below has the same signature (hang watch, then `+0x2215c35`). The detail patches in play: `VICTORY_SHADOW_CASCADES`, `LOW_SHADOWS`, `GRASS_SHADOWS`, `VOLUMETRIC_QUALITY`, `SMALL_CULL`, `TREE_QUALITY` and `WORLD_DIST_SCALE`. | When | Detail patches on | Time to freeze | Loop | |---|---|---|---| | 12-02 16:16 | all 7 (+`SHADOW_DIST=low`) | 4 min 38 s | (log rotated) | | 12-02 16:26 | all 7 | 34 s | B `+0xad5241` | | 12-02 19:21 | none | **2 h 46 min** | A `+0x2626877` | | 12-02 21:46 | none (`POOL_MOVE=0`, `LOD_SCALE=0.5`) | **2 h 18 min** | A `+0x2626877` | | 12-03 11:34 | none | **2 h 11 min** | (log rotated) | | 12-03 17:13 | all 7 | 14 min 36 s | A `+0x262686f` | | 12-03 17:24 | all 7 | 9 min 10 s | B `+0xad5241` | | 12-03 17:26 | none | 35 min, **no crash** (quit) | n/a | | 12-03 19:31 | the 3 shadow ones | **1 h 25 min** | A `+0x2626877` | | 12-03 20:10 | shadow + `VOLUMETRIC_QUALITY` + `SMALL_CULL` | 34 min | A `+0x2626877` | | 12-03 21:41 | the same | **1 h 24 min** | B `+0xad5241` (`dc9b7b5`) | - **All 7 on:** 4 freezes, every one within 15 minutes. - **None of them:** 3 freezes at 2 h 11–2 h 46; one 35 min session without one. - **With the 5 cleared settings on:** 34 min – 1 h 25. - So it **happens without any of these patches**, but with all of them the freeze comes about 10× sooner. Still being narrowed down: `TREE_QUALITY=2` vs. `WORLD_DIST_SCALE=0.8`. **Not the cause** (the freeze kept coming with each changed): `VICTORY_POOL_MOVE` (0 and 1), `VICTORY_UI_PLANE`, `VICTORY_LOD_SCALE` (0.35–0.5), FSR quality vs. balanced, the four experimental switches (`PARTS_ONE_CALL`, `KEEP_HOST_BUFFERS`, `RECORD_RANGES`, `RECORD_PLACES`: on in all 12-03 runs, which include both quick and long ones), and the location (seven different places across the map). Title state at the freezes: the title's own crash report shows `Pool: ~591978xxx/624951280` every time (its steady state, not a spike), `TileHeap ~3.0–3.1 GB / 6.2 GB`, 100–230 streaming requests, normal ped and vehicle counts. VRAM pressure is low (one "no room for more" warning in the whole session). ## Repro 1. Series X profile, 1920x1080 + FSR quality, with `VICTORY_SHADOW_CASCADES=2 VICTORY_LOW_SHADOWS=1024 VICTORY_GRASS_SHADOWS=0 VICTORY_VOLUMETRIC_QUALITY=2 VICTORY_SMALL_CULL=2.5 VICTORY_TREE_QUALITY=2 VICTORY_WORLD_DIST_SCALE=0.8`. 2. Play in the world (driving helps). It freezes within about 15 minutes. 3. Without these patches it still happens, after 30 min to 3 h. ## Suggestions - When the hang watch fires, dump the list (`0x14908f020` base, `0x14908f030` head) and the lock at `0x1476b8e70` (owner, count). A cycle with the lock free, or a cycle with two owners, tells the two hypotheses apart. - Check what the lock at `0x140004b40` relies on (`gs:0x58` TLS slot, lock-prefixed or interlocked ops) under VIctory's TLS/thread setup. - A data watchpoint on the node array's `next` words from outside `+0xbc0530`'s locked region would show a stray writer, if there is one. ## Logs Available on request: the `local/run/play-*.log` files with the hang-watch dumps of all 132 threads (10 s and 20 s) and the title's `*.crash.log` files from `T:\` for each crash above.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-04 02:54:23 +00:00
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/lobomfz--VIctory-xmem#436
No description provided.