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

Error initializing provisioner 'shell' on packer version 1.6.2 and 1.6.3 due to OOM #10005

Open
ture-karlsson opened this issue Sep 28, 2020 · 7 comments
Labels
bug regression sync to jira For issues that need to be imported to Packer internal JIRA backlog

Comments

@ture-karlsson
Copy link

After upgrading packer from version 1.6.0 to 1.6.2, we started experiencing the following kind of errors in our builds:

error initializing provisioner 'shell': EOF

and

error initializing provisioner 'shell': timeout while waiting for plugin to start

We experience the same error after upgrading to 1.6.3, but when downgrading to 1.6.0, we can run our builds again without issues.

Are there any changes in versions later than 1.6.0 that can cause these issues?

@sylviamoss
Copy link
Contributor

sylviamoss commented Sep 28, 2020

Hey there, thanks for reaching out! Could you provide us more information on what builder you're using and a simplified template and steps we can use to reproduce the issue?
Are you only experiencing issues with the shell provisioner? If so do you have any custom plugins in your plugin directory?

@ture-karlsson
Copy link
Author

ture-karlsson commented Sep 29, 2020

Hello!

We are using the google compute builder and running it in cloud build. We are only experiencing this with the shell provisioner and don't use any custom plugins.

Simplified template looks something like this:

{
  "builders": [
    {
      "type": "googlecompute",
      "name": "example-name",
      "project_id": "example-project",
      "image_name": "example-image",
      ...
    }
  ],
  "provisioners": [
    {
      "type": "shell",
      "script": "path/to/script.sh"
    }
  ]
}

I will try to come up with a reproducer.

@ture-karlsson
Copy link
Author

Hello!

I have tried to reproduce the error without running our full build, but with no success. As I said, this is in GCP Cloud Build and we have 20+ steps running in parallel and the errors does not appear on the same step every time and does not appear when I run any of the steps individually, nor if I create a simple mock template like the one above and run it in 30 parallel steps.

Do you have any suggestions on how we can narrow this down?

@SwampDragons
Copy link
Contributor

Hi, it sounds to me like you're hitting some kind of compute limit of the instance you're building on. Try splitting your Packer run across multiple cloud builds, or running on a more powerful instance. Here's some documentation about available instance types: https://cloud.google.com/compute/docs/machine-types#n1_machine_type

@SwampDragons SwampDragons modified the milestones: 1.6.4, 1.6.5 Sep 30, 2020
@ture-karlsson
Copy link
Author

Yes, I think you are correct! Running on a bigger machine worked fine:

gcloud builds submit --config=config.yaml ---machine-type=n1-highcpu-32

Are there any changes between 1.6.0 and 1.6.2/1.6.3 that would make the builds require more resources?

@SwampDragons
Copy link
Contributor

I'm definitely going to look into that based on this report.

@SwampDragons SwampDragons removed this from the 1.6.5 milestone Oct 9, 2020
@nywilken nywilken changed the title error initializing provisioner 'shell' on packer version 1.6.2 and 1.6.3 Error initializing provisioner 'shell' on packer version 1.6.2 and 1.6.3 due to OOM Sep 30, 2022
@nywilken nywilken added sync to jira For issues that need to be imported to Packer internal JIRA backlog and removed track-internal labels Sep 30, 2022
@github-actions
Copy link

This issue has been synced to JIRA for planning.

JIRA ID: HPR-767

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug regression sync to jira For issues that need to be imported to Packer internal JIRA backlog
Projects
None yet
Development

No branches or pull requests

5 participants