diag: report nearest guest mapping on unhandled host faults #1740

Closed
github-bot wants to merge 1 commit from gh-pr/1740/head into gh-pr/1740/base
Owner

@⁠theantipopau on GitHub · 2026-10-20 00:40 UTC · original
theantipopau:diag/fault-nearest-mapping → main · +63 −0 · 6 files · 1 commits · closed without merging

Follow-up to the Saros #1626 triage: the new log's store-loop overrun took hand-decoding to diagnose because the fault report prints only the fault address. This prints the nearest known guest mapping (or "(none known)") for access violations that HandleGpuFault declines, so the next report answers overrun-vs-short-mapping directly. No behavior change on the fault path itself.

**@⁠theantipopau** on GitHub · 2026-10-20 00:40 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1740) `theantipopau:diag/fault-nearest-mapping` → `main` · +63 −0 · 6 files · 1 commits · closed without merging Follow-up to the Saros #1626 triage: the new log's store-loop overrun took hand-decoding to diagnose because the fault report prints only the fault address. This prints the nearest known guest mapping (or "(none known)") for access violations that HandleGpuFault declines, so the next report answers overrun-vs-short-mapping directly. No behavior change on the fault path itself.
Saros #1626's new log shows a guest store loop writing 12 bytes past the
end of its mapping, but the fault report only prints the fault address —
triage required hand-decoding the faulting bytes and guessing the mapping.
Add RangeSet::Nearest, plumb it through RenderContext and the kernel
Memory wrapper, and print the nearest known mapping (or "(none known)")
in KytyExceptionHandler for access violations HandleGpuFault declines.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:04:07 +00:00
github-bot closed this pull request 2026-11-26 10:04:07 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-20 00:45 UTC · original · edited 2026-10-20 01:36 UTC

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0a386c52-d188-4cae-85d2-ada226d8e130
📥 Commits

Reviewing files that changed from the base of the PR and between 7c6b4e91584abb427afb891e1fc4249dee81b613 and e45dcc0504.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8a3be8ab-53fa-4e04-b74f-b2433baeea9d
📥 Commits

Reviewing files that changed from the base of the PR and between 742fe17173 and 7c6b4e91584abb427afb891e1fc4249dee81b613.

📒 Files selected for processing: 6
  • src/graphics/host_gpu/rangeSet.h
  • src/graphics/host_gpu/renderer/renderContext.cpp
  • src/graphics/host_gpu/renderer/renderContext.h
  • src/kernel/memory.cpp
  • src/kernel/memory.h
  • src/loader/runtimeLinker.cpp

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

📝 Walkthrough

The change adds nearest-range lookup to RangeSet and exposes it through RenderContext and the kernel memory API. On access violations, KytyExceptionHandler reports the nearest known guest GPU mapping range or indicates that no mapping is known.

Suggested reviewers: nmzik

Priority: ⬇️ Low

Change: Feature

Merge Risk: ⚪ Minimal · up to 7c6b4

The diagnostic change has no identified issue requiring correction before merge.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 18.18% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 6 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: reporting the nearest guest mapping for unhandled host faults.
Description check Passed The description directly explains the diagnostic purpose, reported output, affected fault path, and absence of behavior changes.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

**@⁠coderabbitai[bot]** on GitHub · 2026-10-20 00:45 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1740#issuecomment-6280631585) · edited 2026-10-20 01:36 UTC <!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- review_stack_entry_start --> <a href="https://app.coderabbit.ai/change-stack/KytyPS5/KytyPS5/pull/1740?scope=ghh_OusAJGA4HG8ljoOV0wJvVx8NmnZIjc2DdjmxOu0xZWA&amp;cs_source=review_comment"><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui-dark.svg?v=3"><source media="(prefers-color-scheme: light)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg?v=3"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg?v=3" alt="Review in Change Stack →" height="32"></picture></a> <!-- review_stack_entry_end --> <!-- This is an auto-generated comment: skip review by coderabbit.ai --> > [!IMPORTANT] > ## Review skipped > > Review was skipped as selected files did not have any reviewable changes. > > > > > > <details> > <summary><strong>⚙️ Run configuration</strong></summary> > <dl> > <dd> > > - **Configuration used**: Repository: KytyPS5/KytyPS5/.coderabbit.yaml > - **Review profile**: CHILL > - **Plan**: Advanced > - **Run ID**: `0a386c52-d188-4cae-85d2-ada226d8e130` > > </dd> > </dl> > </details> > > <details> > <summary><strong>📥 Commits</strong></summary> > <dl> > <dd> > > Reviewing files that changed from the base of the PR and between 7c6b4e91584abb427afb891e1fc4249dee81b613 and e45dcc05040955a0d2aba0b7cb9d61564dea56b5. > > </dd> > </dl> > </details> > > You can disable this status message by setting the `reviews.review_status` to `false` in the CodeRabbit configuration file. > > Use the checkbox below for a quick retry: > - [ ] <!-- {"checkboxId":"e9bb8d72-00e8-4f67-9cb2-caf3b22574fe"} --> 🔍 Trigger review <!-- end of auto-generated comment: skip review by coderabbit.ai --> <!-- recent_review_start --> No actionable comments were generated in the recent review. 🎉 <details> <summary><strong>ℹ️ Recent review info</strong></summary> <dl> <dd> <details> <summary><strong>⚙️ Run configuration</strong></summary> <dl> <dd> - **Configuration used**: Repository: KytyPS5/KytyPS5/.coderabbit.yaml - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `8a3be8ab-53fa-4e04-b74f-b2433baeea9d` </dd> </dl> </details> <details> <summary><strong>📥 Commits</strong></summary> <dl> <dd> Reviewing files that changed from the base of the PR and between 742fe171736e4f0cd9fc454c45b8d962f995be62 and 7c6b4e91584abb427afb891e1fc4249dee81b613. </dd> </dl> </details> <details> <summary><strong>📒 Files selected for processing: 6</strong></summary> <dl> <dd> * `src/graphics/host_gpu/rangeSet.h` * `src/graphics/host_gpu/renderer/renderContext.cpp` * `src/graphics/host_gpu/renderer/renderContext.h` * `src/kernel/memory.cpp` * `src/kernel/memory.h` * `src/loader/runtimeLinker.cpp` </dd> </dl> </details> **Included review availability:** This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review. </dd> </dl> </details> <!-- recent_review_end --> <!-- walkthrough_start --> <details> <summary><strong>📝 Walkthrough</strong></summary> <dl> <dd> The change adds nearest-range lookup to `RangeSet` and exposes it through `RenderContext` and the kernel memory API. On access violations, `KytyExceptionHandler` reports the nearest known guest GPU mapping range or indicates that no mapping is known. **Suggested reviewers:** `nmzik` </dd> </dl> </details> <!-- walkthrough_end --> <!-- change_assessment_start --> **Priority:** ⬇️ Low <!-- change_assessment_commit:"7c6b4e91584abb427afb891e1fc4249dee81b613" --> **Change:** Feature <!-- change_assessment_end --> <details> <summary><strong>Merge Risk:</strong> <strong>⚪ Minimal</strong> · up to <code>7c6b4</code></summary> <dl> <dd> <!-- final_review_risk_start --> <!-- final_review_risk_label **Merge Risk:** **⚪ Minimal** · up to `7c6b4` --> <!-- final_review_risk_coverage:{"sourceCommitId":"7c6b4e91584abb427afb891e1fc4249dee81b613","coveredCommitId":"7c6b4e91584abb427afb891e1fc4249dee81b613","kind":"reviewed"} --> The diagnostic change has no identified issue requiring correction before merge. <!-- final_review_risk_end --> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_start --> <details> <summary><strong>Pre-merge checks: <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-passed-14-v2.svg" width="14" height="14" align="middle" alt="Passed" title="Passed"></picture></sup> 4 · <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-failed-14-v2.svg" width="14" height="14" align="middle" alt="Failed" title="Failed"></picture></sup> 1</strong></summary> <dl> <dd> <strong><sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-failed-14-v2.svg" width="14" height="14" align="middle" alt="Failed" title="Failed"></picture></sup> Failed checks: 1 warning</strong> | Check name | Status | Explanation | Resolution | | :---------------- | :----------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------------------- | | Docstring Coverage | ![Warning](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-warning.svg) | Docstring coverage is 18.18% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 6 files. | Write docstrings for the functions missing them to satisfy the coverage threshold. | <details> <summary><strong><sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-passed-14-v2.svg" width="14" height="14" align="middle" alt="Passed" title="Passed"></picture></sup> Passed checks: 4 passed</strong></summary> <dl> <dd> | Check name | Status | Explanation | | :------------------------ | :--------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------- | | Title check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The title clearly and concisely describes the main change: reporting the nearest guest mapping for unhandled host faults. | | Description check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The description directly explains the diagnostic purpose, reported output, affected fault path, and absence of behavior changes. | | Linked Issues check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | </dd> </dl> </details> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- autopilot:start --> - [ ] <!-- {"checkboxId":"2708ad07-9f24-4260-9c11-7dc76a49f2e3"} --> <strong title="Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts">Autofix</strong> · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts <!-- autopilot:end --> <!-- tips_start --> Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=KytyPS5/KytyPS5&utm_content=1740)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary><strong>❤️ Share</strong></summary> <dl> <dd> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </dd> </dl> </details> <sub>Comment `@coderabbitai help` to get the list of available commands.</sub> <!-- tips_end -->

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.