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

BucketDeployment: SIGKILL 9 during S3 sync step #33512

Open
1 task
TrevorBurnham opened this issue Feb 19, 2025 · 2 comments
Open
1 task

BucketDeployment: SIGKILL 9 during S3 sync step #33512

TrevorBurnham opened this issue Feb 19, 2025 · 2 comments
Labels
@aws-cdk/aws-s3 Related to Amazon S3 bug This issue is a bug. effort/medium Medium work item – several days of effort p3

Comments

@TrevorBurnham
Copy link
Contributor

Describe the bug

After a recent CDK update, I started seeing this error on some deploys when using BucketDeployment:

cfn_error: b"Command '['/opt/awscli/aws', 's3', 'sync', '/tmp/tmps02annce/contents', 's3://beta-us-east-1-main-assets-v1/']' died with <Signals.SIGKILL: 9>."

The error seems to occur at random, forcing me to frequently retry failed deploys.

I've searched for this same error message but haven't been able to find it. The closest I've found is the issue described at #29862, which is also a SIGKILL but occurs when running the 'aws s3 cp' command rather than 'aws s3 sync'. Also, I'm not sure why I'd be running out of memory: The total size of the files I'm deploying is only about 30MB, so I'd expect the 128MB default to be plenty.

I can't say definitively whether this error is caused by a change in CDK or in some other piece of AWS infrastructure.

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Version

No response

Expected Behavior

Deploys using BucketDeployment should either work or provide a clear error message in the logs when something goes wrong.

Current Behavior

The error message above is all I see in the logs. It's followed up by a report that says:

Memory Size: 128 MB Max Memory Used: 128 MB

That suggests that the default memory limit may be the issue… except that I see the same values in the logs when the deploy succeeded. And, again, the files I'm uploading total only 30MB, so what could be using all that memory?

Reproduction Steps

It's unclear how to reproduce, since the bug is non-deterministic.

Possible Solution

The improvement proposed at #29898 might address this.

Additional Information/Context

I'm going to try raising memoryLimit to see if it prevents the issue for me. At this point, I don't know.

CDK CLI Version

2.178.2 (build 89c49cc)

Framework Version

No response

Node.js Version

20.16.0

OS

macOS

Language

Java

Language Version

Java (17)

Other information

No response

@TrevorBurnham TrevorBurnham added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 19, 2025
@github-actions github-actions bot added the @aws-cdk/aws-s3 Related to Amazon S3 label Feb 19, 2025
@pahud
Copy link
Contributor

pahud commented Feb 20, 2025

Yes, related to #29898

I think the long-term solution is to implement it using SDK with better retry/backoff control.

@pahud pahud added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. p3 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Feb 20, 2025
@TrevorBurnham
Copy link
Contributor Author

Update: After adding memoryLimit(1024), I got a successful deploy with this message in the REPORT:

Memory Size: 1024 MB Max Memory Used: 272 MB

That certainly suggests that the default 128MB memory limit was exceeded. But if that's the case, that raises a few mysteries:

  1. Why is uploading ~30MB of files using 272MB of memory in the Lambda?
  2. Why is it happening inconsistently (that is, uploading the same files uses <128MB of memory sometimes)?
  3. Why can't I find any instances of the same error message on the internet? (I can find plenty of reports of a SIGKILL during aws s3 cp, but none during aws s3 sync.)
  4. Why did this only start happening in my project last week?

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-s3 Related to Amazon S3 bug This issue is a bug. effort/medium Medium work item – several days of effort p3
Projects
None yet
Development

No branches or pull requests

2 participants