Skip to content
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: stack overflow in KernelHost.run() #780

Merged
merged 1 commit into from
Sep 16, 2019

Conversation

ddinu
Copy link
Contributor

@ddinu ddinu commented Sep 13, 2019

Fixes #778. This PR eliminates the mutual recursion between KernelHost.run() and KernelHost.processRequest() by scheduling the recursive KernelHost.run() call to run on the next iteration of the event loop.

The code change has been tested as follows:

  • by running the stress-test script with and without the change to confirm that the crash occurs without the change and does not occur with the change;
  • by running the unit tests to confirm that behavior is consistent;
  • by synthesizing our internal CDK stack and confirming that the crash does not occur and that resources are generated correctly.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ddinu ddinu requested a review from a team as a code owner September 13, 2019 18:59
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Contributor

@eladb eladb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please explain how this fixes the issue in the PR description as well as how tested it

@ddinu
Copy link
Contributor Author

ddinu commented Sep 14, 2019

I have updated the description. Please let me know if anything else is needed.

Copy link
Contributor

@eladb eladb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. See minor comment

packages/jsii-runtime/lib/host.ts Outdated Show resolved Hide resolved
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

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.

Stack overflow in KernelHost.run()
5 participants