Repository navigation
feat: drain in-flight requests when a PHP thread segfaults - #2842
Draft
nicolas-grekas wants to merge 1 commit into
Draft
nicolas-grekas wants to merge 1 commit into
nicolas-grekas wants to merge 1 commit into
Conversation
Prototype for php#2836, as a standalone cgo program.
This branch has not been deployed
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.
Prototype for #2836, FrankenPHP itself doesn't use it yet. It's a standalone cgo program in
prototypes/segv-drain/: 4 C threads call into Go like PHP threads do, and thread 2 faults during its second request.The 3 other threads finish their request, then the process dies by SIGSEGV (exit status 139). That's what happens today for a fault in PHP code.
The prototype also shows one change. Today, when C code called from Go faults, Go prints its traceback and exits with status 2 (modes 3 and 4, compare with
DRAIN=0). With the handler, these crashes die by a plain SIGSEGV too. Installing the handler after Go's and calling Go's handler from it should keep that output. But the handler would then have to tell C faults from Go faults by itself.Status: needs work