Skip to content

Fix handling of panics in ORPC servers#224

Open
arthurp wants to merge 2 commits intomainfrom
arthurp/better-panics
Open

Fix handling of panics in ORPC servers#224
arthurp wants to merge 2 commits intomainfrom
arthurp/better-panics

Conversation

@arthurp
Copy link
Copy Markdown
Contributor

@arthurp arthurp commented May 5, 2026

Previously, catch_unwind did not work in kernel/. It did work in ktests, which was confusing. It turns out that passing -C panic=unwind to rustc is the only way to make it generate correct unwind landing pads to implement catch_unwind. OSDK already forced this when running ktests, but not in other modes.

These changes:

  • Add -C panic=unwind in all cases. This is not ideal, but is what we want for ORPC for the moment. We may need to reevaluate this for performance.
  • Improve the panic handling and catching code to correctly pass information from the panic site to the catch site where the panic is converted to an Err. This should make error context much better and avoid silent panics within servers.

@arthurp arthurp requested a review from tewaro May 5, 2026 22:40
@arthurp arthurp marked this pull request as ready for review May 5, 2026 22:41
@arthurp arthurp requested a review from a team as a code owner May 5, 2026 22:41
@arthurp arthurp force-pushed the arthurp/better-panics branch from 5abe179 to 351e4e8 Compare May 5, 2026 22:48
@arthurp arthurp force-pushed the arthurp/better-panics branch from 351e4e8 to c96bcf6 Compare May 5, 2026 22:53
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