-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: localmode subprocess parent process not sending SIGTERM to child #2572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: localmode subprocess parent process not sending SIGTERM to child #2572
Conversation
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
145aef2
to
9207f5b
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
I believe this broke version 2.58.0. In a fresh environment with 2.58.0 installed, the command
It appears that |
@ranzvi Can you create a separate PR to solve the issue you had without adding any required packages? |
Sure, here is the fixed PR |
* update required packages * revert #2572 * remove psutil
Issue #, if available:
Description of changes:
Due to an unknown issue, on some machines executing
predictor.delete_endpoint()
simply hangs.This is because the
SIGTERM
sent to thesubprocess
doesn't propagate to the child process.E.g
pid 7521
doesn't propagateSIGTERM
to child7522
.This means that
self.container.join()
is waiting for a container which hasn't received a signal to stop execution and hangs indefinitely.By sending
SIGTERM
to all child processes of thesubprocess.Popen
process, we can guarantee that the container will be Gracefully stopped...Testing done:
Merge Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.General
Tests
unique_name_from_base
to create resource names in integ tests (if appropriate)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.