Fix unbounded growth of panic hook after each new sandbox#827
Merged
ludfjig merged 1 commit intohyperlight-dev:mainfrom Aug 28, 2025
Merged
Fix unbounded growth of panic hook after each new sandbox#827ludfjig merged 1 commit intohyperlight-dev:mainfrom
ludfjig merged 1 commit intohyperlight-dev:mainfrom
Conversation
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
adamperlin
approved these changes
Aug 27, 2025
Contributor
adamperlin
left a comment
There was a problem hiding this comment.
Someone else should definitely sign off here, but from my reading this seems like a simple and reasonable fix!
simongdavies
approved these changes
Aug 28, 2025
Contributor
simongdavies
left a comment
There was a problem hiding this comment.
Do you think we should add a test where we have a host that has an existing signal handler to make sure that our hooking works as expected? I realise this is not something that is needed because of your change but since we are improving/fixing this area it would be a nice thing to add
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.
setup_signal_handlersis called once per new sandbox (this is needed due to the possibility of different sandboxes using different signal # to cancel executions). This also caused the panic hook to be set unnecessarily for each new sandbox. This PR fixes it by introducing a simpleOnce.I confirmed locally that this fixes the long stacktraces we've been seeing, since it's non-trivial to add a test for it.
Closes #816