Merged
Conversation
c96bcf6 to
86c840b
Compare
tewaro
approved these changes
May 7, 2026
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 in no_std. OSDK already forced this when running ktests, but not in other modes. This is not ideal, but is what we want for ORPC for the moment. We may need to reevaluate this for performance in the future. Previously, catch_unwind did not work outside of `ktest` mode. This was deeply confusing, because code would pass unit tests, but then fail in actual kernel runs and integration tests.
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.
Add a kernel command line parameters `kernel.abort_on_panic` to control if panics are caught and converted into `Err`, or if they always abort the kernel immediately.
86c840b to
dbd0b97
Compare
arthurp
added a commit
that referenced
this pull request
May 7, 2026
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 in no_std. OSDK already forced this when running ktests, but not in other modes. This is not ideal, but is what we want for ORPC for the moment. We may need to reevaluate this for performance in the future. Previously, catch_unwind did not work outside of `ktest` mode. This was deeply confusing, because code would pass unit tests, but then fail in actual kernel runs and integration tests.
arthurp
added a commit
that referenced
this pull request
May 7, 2026
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously,
catch_unwinddid not work inkernel/. It did work inktests, which was confusing. It turns out that passing-C panic=unwindto rustc is the only way to make it generate correct unwind landing pads to implementcatch_unwind. OSDK already forced this when runningktests, but not in other modes.These changes:
-C panic=unwindin all cases. This is not ideal, but is what we want for ORPC for the moment. We may need to reevaluate this for performance.Err. This should make error context much better and avoid silent panics within servers.