Skip to content

series: stale NoExec retry deadlock fix in 0001 (gn-7) - #10

Merged
utkarshdalal merged 3 commits into
gamenativefrom
stale-noexec-deadlock-and-next-page-fault
Nov 15, 2026
Merged

utkarshdalal merged 3 commits into
gamenativefrom
stale-noexec-deadlock-and-next-page-fault

Conversation

@utkarshdalal

@utkarshdalal utkarshdalal commented Nov 15, 2026 •

Copy link
Copy Markdown

Takes one later commit from Dmage22/FEX-D2 d2r/clean into patch 0001: 2d8b53d, the fix for Blizzard's protected launchers (Battle.net: Diablo II: Resurrected, Overwatch 2). SERIES_VERSION 7.

The fault-free synchronous fault stub branches into SynchronousExceptionHandler with InSyscallCallback clear. The stale NoExec retry there invalidates code with the code invalidation mutex held; the invalidation decommits lookup cache pages, ntdll reports that through NotifyMemoryFree, and that takes the same non-recursive mutex again on the same thread. The process hangs shortly after start-up.

The handler now sets the flag around DropStaleNoExecFault and clears it before both exits (dispatcher re-entry and the guest raise). This is the state every other call from JIT code into the emulator already runs in, and the host exception path too. It is on by default with no env gate: it changes no guest-visible behavior, only which of the emulator's own memory calls ntdll reports back to it.

His CPUFeatures hunk is not needed: the series never turned the fault-free path off.

Left out: the next-page probe for full NoExec faults (ba05439), which changes the fault address the guest sees, on WoW64 too; the entry-block log cap (238fe0a); ba8346d (superseded).

The source change against gn-6 is 7 lines in Source/Windows/ARM64EC/Module.cpp. Patches 0002 and 0003 changed only in index hashes and hunk offsets; 0004-0012 are identical. The series applies with plain git am on a fresh FEX-2611 checkout.

Not run on a device. Needs a D2R or Overwatch 2 launch on the CI build.

Utkarsh Dalal added 3 commits November 15, 2026 13:00
… (gn-7)

Folds two later Dmage22/FEX-D2 d2r/clean fixes for Battle.net launchers into 0001.

2d8b53d: SynchronousExceptionHandler now sets InSyscallCallback around the stale NoExec
retry and clears it before re-entering the dispatcher or raising the guest exception. The
fault-free fault stub reaches the handler with the flag clear, so the lookup cache decommit in
the invalidation was reported to NotifyMemoryFree, which took the code invalidation mutex a
second time on the same thread and hung the process. His CPUFeatures.cpp hunk is not needed:
the series never turned the fault-free path off.

ba05439: HandleGuestException gets its next-page probe back. A full NoExec fault carries the
instruction start, so the decoder's address is used only when it is non-zero and differs from
RIP; otherwise an instruction at the tail of an already unlocked page reported that page again
and D2R_loader's handler faulted forever.

Patches 0002-0012 only change in index hashes and line offsets.
@utkarshdalal utkarshdalal changed the title series: stale NoExec retry deadlock and next-page fetch fault in 0001 (gn-7) series: stale NoExec retry deadlock fix in 0001 (gn-7) Nov 15, 2026
@utkarshdalal
utkarshdalal merged commit 6e10033 into gamenative Nov 15, 2026
4 checks passed
utkarshdalal pushed a commit to utkarshdalal/GameNative that referenced this pull request Nov 17, 2026
Series 7 is GameNative/FEX at 6e1003396 (tag gn-7): gn-6 plus
GameNative/FEX#10, a fix for a start-up hang in the stale NoExec retry on
protected launchers, on upstream FEX-2611.1 (gn-6 was on FEX-2611). The
pack keeps the 2611-gn line, so overlays with a 2611-gn floor resolve to it.
utkarshdalal added a commit to utkarshdalal/GameNative that referenced this pull request Nov 17, 2026
…efaults for new containers (#2454)

* Proton 11.0-2 rebuild 12 in the manifest and as the default for new containers

Rebuild 12 is GameNative/proton-wine proton_11.0-2 at a23e5548d (release
proton-11.0-2-20261115): rebuild 11 plus GameNative/proton-wine#133, where
ntdll tells the emulator when a system call writes into code it has already
translated, so that code is translated again (arm64ec only). Over rebuild 10
it also has GameNative/proton-wine#128. The x86_64 build is the same source
as rebuild 11.

New containers take proton-11.0-2-arm64ec-12 on every device class that took
rebuild 9. Existing containers keep the version they have. The rebuild 12 ids
join BionicSteamAssetsDependency so those installs get the Proton 11
steam.exe and lsteamclient handling.

* FEX 2611-gn-7 in the manifest and as the default

Series 7 is GameNative/FEX at 6e1003396 (tag gn-7): gn-6 plus
GameNative/FEX#10, a fix for a start-up hang in the stale NoExec retry on
protected launchers, on upstream FEX-2611.1 (gn-6 was on FEX-2611). The
pack keeps the 2611-gn line, so overlays with a 2611-gn floor resolve to it.

---------

Co-authored-by: Utkarsh Dalal <utkarsh.dalal@toptal.com>
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.

1 participant