DREDGE (PPSA09076) on Windows: intermittent fault in Job.Worker 4 (read of 0x6000000xx at app.exe+0x17f0796), 2 of 8 runs #3915

Closed
opened 2026-10-11 19:07:48 +00:00 by xXPBSXx · 8 comments
xXPBSXx commented 2026-10-11 19:07:48 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T19:07:48Z.


DREDGE (PPSA09076, Unity) on Windows 10, main a11c8f7f7, relinked with --windows --module-dir Media/Modules --module-dir Media/Plugins (13 modules, 0 absent imports), RTX 4080 SUPER: it intermittently faults in a job worker thread. Of 8 runs of 60 to 180 s with this build, 2 ended with

FATAL: unhandled exception 0xc0000005 on thread 'Job.Worker 4'
  rip app.exe+0x17f0796   read of 0x0000000600000030   (r8 = 0x0000000600000000)

and

FATAL: unhandled exception 0xc0000005 on thread 'Job.Worker 4'
  rip app.exe+0x17efe13   read of 0x0000000600000004

The other 6 runs (one of them 180 s) ran to their time limit with no fault, no abort and no error line. In the first fault the instruction is mov rax,[r8+0x30] in title code (app.exe+0x17f0796, right after it stores two 32-bit values to [rdi+0x1c] and [rdi+0x20]), and r8 is 0x0000000600000000: a pointer whose low half is 0 and whose high half is 6, which looks like two adjacent 32-bit fields read as one 64-bit pointer, or a pointer slot that was never written. Both faults are in Job.Worker 4, in the same part of app.exe (+0x17efe13 and +0x17f0796 are 0x983 bytes apart), and both read an address of the form 0x6000000xx.

Not established: what the routine is (Unity's job system, as the thread name suggests), whether the bad pointer comes from a race between workers or from a value our imports return, and why only 2 of 8 runs hit it. I have not tried a build with a different thread or timer setting, and I have not looked at the picture. The same Unity titles Cult of the Lamb and Harmony's Odyssey did not fault in the 150 s runs I made (one run each), so I do not know if it is specific to this title.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5804221049 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3915). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T19:07:48Z. --- DREDGE (PPSA09076, Unity) on Windows 10, `main` a11c8f7f7, relinked with `--windows --module-dir Media/Modules --module-dir Media/Plugins` (13 modules, 0 absent imports), RTX 4080 SUPER: it intermittently faults in a job worker thread. Of 8 runs of 60 to 180 s with this build, 2 ended with ``` FATAL: unhandled exception 0xc0000005 on thread 'Job.Worker 4' rip app.exe+0x17f0796 read of 0x0000000600000030 (r8 = 0x0000000600000000) ``` and ``` FATAL: unhandled exception 0xc0000005 on thread 'Job.Worker 4' rip app.exe+0x17efe13 read of 0x0000000600000004 ``` The other 6 runs (one of them 180 s) ran to their time limit with no fault, no abort and no error line. In the first fault the instruction is `mov rax,[r8+0x30]` in title code (`app.exe+0x17f0796`, right after it stores two 32-bit values to `[rdi+0x1c]` and `[rdi+0x20]`), and `r8` is `0x0000000600000000`: a pointer whose low half is 0 and whose high half is 6, which looks like two adjacent 32-bit fields read as one 64-bit pointer, or a pointer slot that was never written. Both faults are in `Job.Worker 4`, in the same part of `app.exe` (`+0x17efe13` and `+0x17f0796` are 0x983 bytes apart), and both read an address of the form `0x6000000xx`. Not established: what the routine is (Unity's job system, as the thread name suggests), whether the bad pointer comes from a race between workers or from a value our imports return, and why only 2 of 8 runs hit it. I have not tried a build with a different thread or timer setting, and I have not looked at the picture. The same Unity titles Cult of the Lamb and Harmony's Odyssey did not fault in the 150 s runs I made (one run each), so I do not know if it is specific to this title. AI-assisted (Claude Code).
xXPBSXx commented 2026-10-11 19:48:57 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T19:48:57Z.


Cause found, as far as a static read and a control experiment go: this is the red-zone overwrite tracked in #361 and fixed in part by #2054, not a new bug.

  • The faulting code uses the red zone. The routine around app.exe+0x17f0796 reads r8 from [rsp-0x30] (mov r8,[rsp-0x30] at +0x17f0730) and other locals from [rsp-0x3c], [rsp-0x28], [rsp-0x48], and uses vmovups ymm in the same function. The fault itself is mov rax,[r8+0x30] with r8 = 0x600000000, i.e. the slot read back as garbage. That matches the mechanism in #361: a resumed write fault on this thread makes Windows build its exception frame, with the upper AVX state, below rsp and overwrite the slots (the nearest overwritten qword is rsp-0x20 or closer on a host without AVX-512; this host is a Ryzen 7 5800X3D, Zen 3, no AVX-512).
  • It is not one of our mappings. With APS5_TRACE_MEMORY=1 over six 140 s runs under gdb no mapping, reservation or flexible-memory call touches the 0x6_0000_0000 range; the guest ranges are all below 0x2_5000_0000. So 0x600000000 was not returned by our memory calls.
  • Control experiment. With APS5_NO_WRITE_WATCH=1, 8 runs of 60 s: 0 faults. Without it the same build faulted in 2 of 8 earlier runs. 8 clean runs would happen by chance about one time in ten at that rate, so this supports the cause but does not prove it; I did not test #2054's branch.
  • Under gdb with a catch on SIGSEGV (6 runs of 140 s) the fault did not appear at all, which fits a timing-dependent effect.

Both faults are in Job.Worker 4, at +0x17f0796 (the r8 load above) and +0x17efe13 (rax = 0x600000000, a read of 0x600000004).

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6113024996 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3915#issuecomment-6113024996). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T19:48:57Z. --- Cause found, as far as a static read and a control experiment go: this is the red-zone overwrite tracked in #361 and fixed in part by #2054, not a new bug. - **The faulting code uses the red zone.** The routine around `app.exe+0x17f0796` reads `r8` from `[rsp-0x30]` (`mov r8,[rsp-0x30]` at `+0x17f0730`) and other locals from `[rsp-0x3c]`, `[rsp-0x28]`, `[rsp-0x48]`, and uses `vmovups ymm` in the same function. The fault itself is `mov rax,[r8+0x30]` with `r8 = 0x600000000`, i.e. the slot read back as garbage. That matches the mechanism in #361: a resumed write fault on this thread makes Windows build its exception frame, with the upper AVX state, below `rsp` and overwrite the slots (the nearest overwritten qword is `rsp-0x20` or closer on a host without AVX-512; this host is a Ryzen 7 5800X3D, Zen 3, no AVX-512). - **It is not one of our mappings.** With `APS5_TRACE_MEMORY=1` over six 140 s runs under gdb no mapping, reservation or flexible-memory call touches the `0x6_0000_0000` range; the guest ranges are all below `0x2_5000_0000`. So `0x600000000` was not returned by our memory calls. - **Control experiment.** With `APS5_NO_WRITE_WATCH=1`, 8 runs of 60 s: 0 faults. Without it the same build faulted in 2 of 8 earlier runs. 8 clean runs would happen by chance about one time in ten at that rate, so this supports the cause but does not prove it; I did not test #2054's branch. - Under gdb with a catch on `SIGSEGV` (6 runs of 140 s) the fault did not appear at all, which fits a timing-dependent effect. Both faults are in `Job.Worker 4`, at `+0x17f0796` (the `r8` load above) and `+0x17efe13` (`rax = 0x600000000`, a read of `0x600000004`). AI-assisted (Claude Code).
xXPBSXx commented 2026-10-11 21:04:14 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T21:04:14Z.


Rate data for this issue (details on #2054): plain main a11c8f7f7, DREDGE, 20 runs (10 at 60 s, 10 at 120 s): 3 faulted, all at 60 s and all in Job.Worker threads, at app.exe+0x17f05ed (twice, read of 0x00007ff74d268000) and +0x17f0843 (read of 0x40), next to the sites above. With the red-zone fix candidate #2054 rebased onto the same main: 0 of 20. So the crash rate here is about 2 of 8, then 3 of 20 overall on main, and it was not constant between batches. I have not shown that #2054 is the cause or the cure: 3 of 20 against 0 of 20 is p of about 0.12.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6113733262 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3915#issuecomment-6113733262). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T21:04:14Z. --- Rate data for this issue (details on #2054): plain `main` a11c8f7f7, DREDGE, 20 runs (10 at 60 s, 10 at 120 s): 3 faulted, all at 60 s and all in `Job.Worker` threads, at `app.exe+0x17f05ed` (twice, read of `0x00007ff74d268000`) and `+0x17f0843` (read of `0x40`), next to the sites above. With the red-zone fix candidate #2054 rebased onto the same `main`: 0 of 20. So the crash rate here is about 2 of 8, then 3 of 20 overall on `main`, and it was not constant between batches. I have not shown that #2054 is the cause or the cure: 3 of 20 against 0 of 20 is p of about 0.12. AI-assisted (Claude Code).
xXPBSXx commented 2026-10-11 21:24:50 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T21:24:50Z.


Update with more runs (details on #2054): plain main, DREDGE, 60 s runs: 5 of 20 faulted (app.exe+0x17f05ed twice, +0x17f0843 once, +0x17f0796 twice; reads of 0x7ff74d268000, 0x40 and 0x600000030), 120 s runs 0 of 10. With #2054 rebased onto the same main: 1 of 20 at 60 s, at app.exe+0x17efe13 with a read of 0x600000004 (the same site and value as one of the original faults here), 0 of 10 at 120 s. So #2054 lowered the rate in these runs (p of about 0.09, not significant) but did not remove the crash.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6113936271 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3915#issuecomment-6113936271). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T21:24:50Z. --- Update with more runs (details on #2054): plain `main`, DREDGE, 60 s runs: 5 of 20 faulted (`app.exe+0x17f05ed` twice, `+0x17f0843` once, `+0x17f0796` twice; reads of `0x7ff74d268000`, `0x40` and `0x600000030`), 120 s runs 0 of 10. With #2054 rebased onto the same `main`: 1 of 20 at 60 s, at `app.exe+0x17efe13` with a read of `0x600000004` (the same site and value as one of the original faults here), 0 of 10 at 120 s. So #2054 lowered the rate in these runs (p of about 0.09, not significant) but did not remove the crash. AI-assisted (Claude Code).
xXPBSXx commented 2026-10-11 21:57:42 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T21:57:42Z.


Measurements for the red-zone explanation (#361), DREDGE (PPSA09076) on Windows 10, Ryzen 7 5800X3D, main a11c8f7f7. I added a local, uncommitted counter to WindowsMappings::HandleWrite (the resumed write fault on a write-armed shared view) that counts faults per 16 KiB page and prints a summary every 5 s. 60 s runs:

build faults in the run distinct pages pages with >= 100 faults pages with >= 1000 faults
main, run 1 209,202 30,338 not recorded in this build not recorded
main, run 2 209,172 30,347 not recorded not recorded
main, run 3 (this run later faulted fatally) 22,362 at its last summary 17,196 not recorded not recorded
main, new counter build, run 2 205,850 30,300 833 pages, 171,954 faults 11 pages, 20,168 faults
main, new counter build, run 3 211,950 30,321 826 pages, 178,213 faults 15 pages, 27,795 faults
main, new counter build, run 1 (faulted fatally) 19,545 at its last summary 16,831 8 pages, 1,410 faults 0
main + #2054, run 1 and run 2 0 (no summary line) 0 0 0
main + #2054, run 3 212,696 30,407 not recorded not recorded

What this shows: on main the title takes about 3,800 resumed write faults per second (about 210,000 in 55 s, the figure #2054 also gives). Most of the 30,000 pages are hit once; about 830 to 880 pages are hit 20 or more times and carry about 85 % of all faults (about 14 MiB of hot memory), the 11 to 15 hottest pages about 10 to 13 %. With #2054 two of three runs had no fault at all, but the third had as many as main; I did not check why (a guess, not checked: that run's direct memory got mapped a second time, which turns it back into views, and in #2054 only a range mapped once is private). That would also fit the 1 of 20 crash with #2054 in #3915.

From a read of the code by a second reviewer, not measured by me, and marked so: the faults happen on direct-memory section views (GuestArenaMap, GuestArena.cpp:343) that Collect(clear=true) re-arms with VirtualProtect to read-only (WindowsMappings.hpp:249-257); the handler resumes them through ReportCrash and HandleWrite (CrashReport.cpp:244, WindowsMappings.hpp:134-145). Excluding stack pages from the arming would not help, because the fault is on a data page and Windows builds its exception frame at rsp below the System V red zone before any handler runs, and there is no sigaltstack equivalent. A possible mitigation, also read and not tried: pin hot views, as libSceFiber/Export.cpp:191 and UserContext.cpp:60 already do through Pin (WindowsMappings.hpp:109-123), by counting faults per page in HandleWrite and pinning a page after a threshold. A page that is pinned stays writable, so it stops faulting, but Collect then reports it as written every time, so the GPU side would re-process that memory each time; what that costs I have not measured.

One correction to my earlier control experiment: APS5_NO_WRITE_WATCH=1 sets _writeWatched = false (GuestArena.cpp:137), so the 0 of 8 faults with it show that the write-watch path as a whole matters, not that the views alone do.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114251555 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3915#issuecomment-6114251555). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T21:57:42Z. --- Measurements for the red-zone explanation (#361), DREDGE (PPSA09076) on Windows 10, Ryzen 7 5800X3D, `main` a11c8f7f7. I added a local, uncommitted counter to `WindowsMappings::HandleWrite` (the resumed write fault on a write-armed shared view) that counts faults per 16 KiB page and prints a summary every 5 s. 60 s runs: | build | faults in the run | distinct pages | pages with >= 100 faults | pages with >= 1000 faults | |---|---|---|---|---| | `main`, run 1 | 209,202 | 30,338 | not recorded in this build | not recorded | | `main`, run 2 | 209,172 | 30,347 | not recorded | not recorded | | `main`, run 3 (this run later faulted fatally) | 22,362 at its last summary | 17,196 | not recorded | not recorded | | `main`, new counter build, run 2 | 205,850 | 30,300 | 833 pages, 171,954 faults | 11 pages, 20,168 faults | | `main`, new counter build, run 3 | 211,950 | 30,321 | 826 pages, 178,213 faults | 15 pages, 27,795 faults | | `main`, new counter build, run 1 (faulted fatally) | 19,545 at its last summary | 16,831 | 8 pages, 1,410 faults | 0 | | `main` + #2054, run 1 and run 2 | 0 (no summary line) | 0 | 0 | 0 | | `main` + #2054, run 3 | 212,696 | 30,407 | not recorded | not recorded | What this shows: on `main` the title takes about 3,800 resumed write faults per second (about 210,000 in 55 s, the figure #2054 also gives). Most of the 30,000 pages are hit once; about 830 to 880 pages are hit 20 or more times and carry about 85 % of all faults (about 14 MiB of hot memory), the 11 to 15 hottest pages about 10 to 13 %. With #2054 two of three runs had no fault at all, but the third had as many as `main`; I did not check why (a guess, not checked: that run's direct memory got mapped a second time, which turns it back into views, and in #2054 only a range mapped once is private). That would also fit the 1 of 20 crash with #2054 in #3915. From a read of the code by a second reviewer, not measured by me, and marked so: the faults happen on direct-memory section views (`GuestArenaMap`, `GuestArena.cpp:343`) that `Collect(clear=true)` re-arms with `VirtualProtect` to read-only (`WindowsMappings.hpp:249-257`); the handler resumes them through `ReportCrash` and `HandleWrite` (`CrashReport.cpp:244`, `WindowsMappings.hpp:134-145`). Excluding stack pages from the arming would not help, because the fault is on a data page and Windows builds its exception frame at `rsp` below the System V red zone before any handler runs, and there is no `sigaltstack` equivalent. A possible mitigation, also read and not tried: pin hot views, as `libSceFiber/Export.cpp:191` and `UserContext.cpp:60` already do through `Pin` (`WindowsMappings.hpp:109-123`), by counting faults per page in `HandleWrite` and pinning a page after a threshold. A page that is pinned stays writable, so it stops faulting, but `Collect` then reports it as written every time, so the GPU side would re-process that memory each time; what that costs I have not measured. One correction to my earlier control experiment: `APS5_NO_WRITE_WATCH=1` sets `_writeWatched = false` (`GuestArena.cpp:137`), so the 0 of 8 faults with it show that the write-watch path as a whole matters, not that the views alone do. AI-assisted (Claude Code).
xXPBSXx commented 2026-10-11 22:33:20 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T22:33:20Z.


Branch for the pin idea from the previous comment, built and measured: xXPBSXx:fix/libc-pin-hot-shared-views (9906ffeae, based on main ca4ab0d5d, two files). In WindowsMappings::HandleWrite a view is counted per fault and pinned writable (the same pins that libSceFiber uses) after 100 faults; the pin is released when the view is unmapped. Collect reports a pinned page as written every time. New test CheckHotSharedPageStopsFaulting in guest_memory (a range mapped once, written and collected 300 times: after the threshold the page stays PAGE_READWRITE and Collect keeps reporting it); it passes with the change and fails at GuestMemory.cpp:1186 without it (Windows 10, with #4021 merged locally because main ca4ab0d5d did not build on Windows at that moment).

DREDGE, 10 alternating pairs of 60 s runs on the same main libs with and without this change: 2 of 10 faulted without it (Job.Worker 7 at app.exe+0x17f0843, Job.Worker 3 at +0x17f0796), 1 of 10 with it (Job.Worker 1 at +0x17f01a1, the same routine area). So it did not make the crash disappear, and 1 of 10 against 2 of 10 says nothing statistically. Together with the earlier batches of the same comparison the crash rate on plain main is 7 of 30 for 60 s runs and 0 of 10 for 120 s runs (7 of 40 in all).

An estimate, not measured: if every resumed fault has the same small chance of hitting live red-zone data, about 210,000 faults per run at a crash rate near 25 % would be about one chance in a million per fault, and removing the 85 % of faults on the hot pages would leave a rate of a few percent, which is what 1 of 10 and 1 of 20 (with #2054) look like but cannot confirm. About 15 % of the faults are first writes to pages that fault only a few times each (about 29,000 pages), and a threshold cannot remove those. I have not measured the cost of pinning: a pinned page is reported as written on every Collect, so the GPU side may process those pages every time; about 850 pages of 16 KiB is about 14 MiB for this title.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114640619 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3915#issuecomment-6114640619). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T22:33:20Z. --- Branch for the pin idea from the previous comment, built and measured: `xXPBSXx:fix/libc-pin-hot-shared-views` (`9906ffeae`, based on `main` ca4ab0d5d, two files). In `WindowsMappings::HandleWrite` a view is counted per fault and pinned writable (the same `pins` that libSceFiber uses) after 100 faults; the pin is released when the view is unmapped. `Collect` reports a pinned page as written every time. New test `CheckHotSharedPageStopsFaulting` in `guest_memory` (a range mapped once, written and collected 300 times: after the threshold the page stays `PAGE_READWRITE` and `Collect` keeps reporting it); it passes with the change and fails at `GuestMemory.cpp:1186` without it (Windows 10, with #4021 merged locally because `main` ca4ab0d5d did not build on Windows at that moment). DREDGE, 10 alternating pairs of 60 s runs on the same `main` libs with and without this change: 2 of 10 faulted without it (`Job.Worker 7` at `app.exe+0x17f0843`, `Job.Worker 3` at `+0x17f0796`), 1 of 10 with it (`Job.Worker 1` at `+0x17f01a1`, the same routine area). So it did not make the crash disappear, and 1 of 10 against 2 of 10 says nothing statistically. Together with the earlier batches of the same comparison the crash rate on plain `main` is 7 of 30 for 60 s runs and 0 of 10 for 120 s runs (7 of 40 in all). An estimate, not measured: if every resumed fault has the same small chance of hitting live red-zone data, about 210,000 faults per run at a crash rate near 25 % would be about one chance in a million per fault, and removing the 85 % of faults on the hot pages would leave a rate of a few percent, which is what 1 of 10 and 1 of 20 (with #2054) look like but cannot confirm. About 15 % of the faults are first writes to pages that fault only a few times each (about 29,000 pages), and a threshold cannot remove those. I have not measured the cost of pinning: a pinned page is reported as written on every `Collect`, so the GPU side may process those pages every time; about 850 pages of 16 KiB is about 14 MiB for this title. AI-assisted (Claude Code).
xXPBSXx commented 2026-10-12 12:10:29 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-12T12:10:29Z.


DREDGE (PPSA09076) re-measure on current main ffa198407 (Windows 10, GCC Release; fresh work directory, --module-dir Media/Modules --module-dir Media/Plugins; libs built from that commit, libkernel.prx hash 3B72701B identical in the work directory): 5 runs of 150 s, one after the other.

  • 4 of 5 runs without a fatal (13 to 14 stderr lines each).
  • 1 of 5 runs fatal: 0xc0000005 on Job.Worker 2, rip app.exe+0x17f0843 (542 stderr lines in that run). This is the same code offset as the fault I saw once in a 5-run series on main d146ec1b6 with #4186 merged (Job.Worker 9, app.exe+0x17f0843); that series had 0 of 5 fatal on plain main and 1 of 5 with the PR.

Together that is 2 faults in 15 runs of 150 s over three commits and one local merge, all at the same offset, so the rate looks like roughly 1 in 7 to 1 in 5 for 150 s runs; the earlier figure of 5 of 20 at 60 s is of the same order. Difference to this issue's description: the fault here is a read of 0x40 at app.exe+0x17f0843, not a read of 0x6000000xx at app.exe+0x17f0796 as in the title. It is nearby (0xad bytes later, possibly the same routine, not checked) and a different access, so I would not count it as the same signature without a disassembly comparison.

This does not say what the faulting routine is or whether it is the red-zone case of this issue; I did not take a register dump this time.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6123996433 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3915#issuecomment-6123996433). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-12T12:10:29Z. --- DREDGE (PPSA09076) re-measure on current `main` `ffa198407` (Windows 10, GCC Release; fresh work directory, `--module-dir Media/Modules --module-dir Media/Plugins`; libs built from that commit, `libkernel.prx` hash `3B72701B` identical in the work directory): 5 runs of 150 s, one after the other. - 4 of 5 runs without a fatal (13 to 14 stderr lines each). - 1 of 5 runs fatal: `0xc0000005` on `Job.Worker 2`, `rip app.exe+0x17f0843` (542 stderr lines in that run). This is the same code offset as the fault I saw once in a 5-run series on `main` `d146ec1b6` with #4186 merged (`Job.Worker 9`, `app.exe+0x17f0843`); that series had 0 of 5 fatal on plain main and 1 of 5 with the PR. Together that is 2 faults in 15 runs of 150 s over three commits and one local merge, all at the same offset, so the rate looks like roughly 1 in 7 to 1 in 5 for 150 s runs; the earlier figure of 5 of 20 at 60 s is of the same order. Difference to this issue's description: the fault here is a read of `0x40` at `app.exe+0x17f0843`, not a read of `0x6000000xx` at `app.exe+0x17f0796` as in the title. It is nearby (0xad bytes later, possibly the same routine, not checked) and a different access, so I would not count it as the same signature without a disassembly comparison. This does not say what the faulting routine is or whether it is the red-zone case of this issue; I did not take a register dump this time. AI-assisted (Claude Code).
xXPBSXx commented 2026-10-12 14:06:49 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-12T14:06:49Z.


DREDGE (PPSA09076) on main with the libs of 3d8ffeb27, a run started by the user: crashed after about 40 s in the intro (the user saw the picture and says frame 497; no statement about sound or input). Separated into what the files show and what is interpretation.

Shown (log + objdump of the relinked app.exe)

  • FATAL 0xc0000005 on Job.Worker 0, rip app.exe+0x17f05ed, read of 0x7ff6bff18000 = image RVA 0x1dd8000, the first byte of PE section .elf6 (the ELF's flagless PT_LOAD, p_flags 0, which contains DYNAMIC; the relinker gives such pages no read permission, WindowsLoadImage.cpp). rax = 0x7ff6bff0f990 lies 0x8670 bytes before it in the preceding RW section .elf5.
  • The instruction is vmulss xmm1,xmm1,[rax+rbp*4] in a float loop whose loop variables are loaded from slots below rsp ([rsp-0x7c], [rsp-0x70], [rsp-0x68], [rsp-0x60]; 12 such accesses between +0x17f0500 and +0x17f0600). At the fault rsi = 0xffffffffffffdde4 (movsxd of the 32-bit value from [rsp-0x7c]) and rbx = -0x80 (from [rsp-0x70]): both are not plausible loop values.
  • Same function as the faults of this issue: the function runs from app.exe+0x17efa70 (push rbp; sub rsp,0xf8) to its ret at +0x17f08a2; this fault (+0x17f05ed), the issue's +0x17f0796 (a load mov rax,[r8+0x30]) and my earlier +0x17f0843 (a load mov rcx,[r12+0x40], read of 0x40) are all inside it. Three different faulting instructions, three different bad values.

Interpretation (not proven)

  • Locals below rsp being overwritten fits the red-zone mechanism of #361 (a resumed write fault makes Windows build its exception frame at rsp), and the write-watch approach of #2054 is the candidate for it. I have no trace showing a write fault resumed inside this function in the faulting run, so I cannot say the red zone was overwritten here. The .elf6 boundary is only where this wrong index happens to land, not the cause.

Rate on this title so far: 2 faults in 15 runs of 150 s (earlier comment) plus this run at about 40 s.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6125923181 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3915#issuecomment-6125923181). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-12T14:06:49Z. --- DREDGE (PPSA09076) on `main` with the libs of `3d8ffeb27`, a run started by the user: crashed after about 40 s in the intro (the user saw the picture and says frame 497; no statement about sound or input). Separated into what the files show and what is interpretation. **Shown (log + `objdump` of the relinked `app.exe`)** - `FATAL 0xc0000005` on `Job.Worker 0`, `rip app.exe+0x17f05ed`, read of `0x7ff6bff18000` = image RVA `0x1dd8000`, the first byte of PE section `.elf6` (the ELF's flagless `PT_LOAD`, p_flags 0, which contains DYNAMIC; the relinker gives such pages no read permission, `WindowsLoadImage.cpp`). `rax = 0x7ff6bff0f990` lies 0x8670 bytes before it in the preceding RW section `.elf5`. - The instruction is `vmulss xmm1,xmm1,[rax+rbp*4]` in a float loop whose loop variables are loaded from slots below `rsp` (`[rsp-0x7c]`, `[rsp-0x70]`, `[rsp-0x68]`, `[rsp-0x60]`; 12 such accesses between `+0x17f0500` and `+0x17f0600`). At the fault `rsi = 0xffffffffffffdde4` (`movsxd` of the 32-bit value from `[rsp-0x7c]`) and `rbx = -0x80` (from `[rsp-0x70]`): both are not plausible loop values. - Same function as the faults of this issue: the function runs from `app.exe+0x17efa70` (`push rbp; sub rsp,0xf8`) to its `ret` at `+0x17f08a2`; this fault (`+0x17f05ed`), the issue's `+0x17f0796` (a load `mov rax,[r8+0x30]`) and my earlier `+0x17f0843` (a load `mov rcx,[r12+0x40]`, read of 0x40) are all inside it. Three different faulting instructions, three different bad values. **Interpretation (not proven)** - Locals below `rsp` being overwritten fits the red-zone mechanism of #361 (a resumed write fault makes Windows build its exception frame at `rsp`), and the write-watch approach of #2054 is the candidate for it. I have no trace showing a write fault resumed inside this function in the faulting run, so I cannot say the red zone was overwritten here. The `.elf6` boundary is only where this wrong index happens to land, not the cause. Rate on this title so far: 2 faults in 15 runs of 150 s (earlier comment) plus this run at about 40 s. AI-assisted (Claude Code).
oneandonlydean commented 2026-10-13 23:52:59 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-13T23:52:59Z.


Closing as a duplicate of #361: the faulting function keeps its locals below rsp, which is the red-zone overwrite tracked there. The DREDGE rates are useful on #361; if it still faults after that's fixed, comment here.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6157675832 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3915#issuecomment-6157675832). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-13T23:52:59Z. --- Closing as a duplicate of #361: the faulting function keeps its locals below `rsp`, which is the red-zone overwrite tracked there. The DREDGE rates are useful on #361; if it still faults after that's fixed, comment here.
Sign in to join this conversation.
No labels
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.

Reference
boykopovar/AnyPS5#3915
No description provided.