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

[Bug]: Error: The terraform-provider-aws_v5.0.1_x5.exe plugin crashed! #31644

Closed
VijayKeerthan opened this issue May 30, 2023 · 4 comments · Fixed by #31718
Closed

[Bug]: Error: The terraform-provider-aws_v5.0.1_x5.exe plugin crashed! #31644

VijayKeerthan opened this issue May 30, 2023 · 4 comments · Fixed by #31718
Assignees
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@VijayKeerthan
Copy link

VijayKeerthan commented May 30, 2023

Terraform Core Version

1.4.5

AWS Provider Version

5.0.1

Affected Resource(s)

data source: aws_ami

Expected Behavior

terraform plan should be generated with a valid ami id

Actual Behavior

data.aws_ami.example: Reading...
data.aws_ami.example: Still reading... [10s elapsed]
data.aws_ami.example: Still reading... [20s elapsed]
data.aws_ami.example: Still reading... [30s elapsed]

Planning failed. Terraform encountered an error while generating this plan.


│ Error: Plugin did not respond

│ with data.aws_ami.example,
│ on main.tf line 16, in data "aws_ami" "example":
│ 16: data "aws_ami" "example" {

│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadDataSource call. The plugin logs may contain more details.

Relevant Error/Panic Output Snippet

data.aws_ami.example: Reading...
data.aws_ami.example: Still reading... [10s elapsed]
data.aws_ami.example: Still reading... [20s elapsed]
data.aws_ami.example: Still reading... [30s elapsed]

Planning failed. Terraform encountered an error while generating this plan.

╷
│ Error: Plugin did not respond
│
│   with data.aws_ami.example,
│   on main.tf line 16, in data "aws_ami" "example":
│   16: data "aws_ami" "example" {
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadDataSource call. The plugin logs may contain more details.
╵

Stack trace from the terraform-provider-aws_v5.0.1_x5.exe plugin:

fatal error: out of memory

goroutine 364 [running]:
runtime.throw({0xc98788a, 0xd})
        runtime/panic.go:1047 +0x4d fp=0x291ce694 sp=0x291ce680 pc=0xd189ad
runtime.(*mcache).allocLarge(0xb40088, 0x10000000, 0x1)
        runtime/mcache.go:235 +0x208 fp=0x291ce6bc sp=0x291ce694 pc=0xcf4928
runtime.mallocgc(0x10000000, 0x0, 0x0)
        runtime/malloc.go:1029 +0x446 fp=0x291ce704 sp=0x291ce6bc pc=0xcebaf6
runtime.growslice(0xabbc040, {0x0, 0x0, 0x0}, 0x10000000)
        runtime/slice.go:284 +0x3d7 fp=0x291ce730 sp=0x291ce704 pc=0xd2d017
bytes.growSlice({0x47780000, 0x8000000, 0x8000000}, 0x1000)
        bytes/buffer.go:240 +0xa2 fp=0x291ce768 sp=0x291ce730 pc=0xde4c42
bytes.(*Buffer).grow(0x29155ce0, 0x1000)
        bytes/buffer.go:142 +0x119 fp=0x291ce790 sp=0x291ce768 pc=0xde4689
bytes.(*Buffer).Write(0x29155ce0, {0x291d9000, 0x1000, 0x1000})
        bytes/buffer.go:170 +0x4c fp=0x291ce7a4 sp=0x291ce790 pc=0xde482c
io.(*teeReader).Read(0x291acc90, {0x291d9000, 0x1000, 0x1000})
        io/io.go:575 +0x88 fp=0x291ce7d0 sp=0x291ce7a4 pc=0xdb0878
github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2.(*teeReaderCloser).Read(0x291acca0, {0x291d9000, 0x1000, 0x1000})
        <autogenerated>:1 +0x45 fp=0x291ce7f0 sp=0x291ce7d0 pc=0x84e6275
bufio.(*Reader).fill(0x291be990)
        bufio/bufio.go:106 +0xe9 fp=0x291ce814 sp=0x291ce7f0 pc=0xde8b39
bufio.(*Reader).ReadByte(0x291be990)
        bufio/bufio.go:265 +0x2e fp=0x291ce820 sp=0x291ce814 pc=0xde925e
encoding/xml.(*Decoder).getc(0x291c1c20)
        encoding/xml/xml.go:913 +0x46 fp=0x291ce838 sp=0x291ce820 pc=0x15fa9f6
encoding/xml.(*Decoder).rawToken(0x291c1c20)
        encoding/xml/xml.go:564 +0x5a fp=0x291ce988 sp=0x291ce838 pc=0x15f88aa
encoding/xml.(*Decoder).Token(0x291c1c20)
        encoding/xml/xml.go:287 +0xa3 fp=0x291cea70 sp=0x291ce988 pc=0x15f7483
github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil.XMLToStruct(0x291c1c20, 0x5b70bca0)
        github.com/aws/aws-sdk-go@v1.44.266/private/protocol/xml/xmlutil/xml_to_struct.go:51 +0x48 fp=0x291ceb84 sp=0x291cea70 pc=0x1606248
github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil.XMLToStruct(0x291c1c20, 0x5b70bbc0)
        github.com/aws/aws-sdk-go@v1.44.266/private/protocol/xml/xmlutil/xml_to_struct.go:79 +0x313 fp=0x291cec98 sp=0x291ceb84 pc=0x1606513
github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil.XMLToStruct(0x291c1c20, 0x5b70bb60)
        github.com/aws/aws-sdk-go@v1.44.266/private/protocol/xml/xmlutil/xml_to_struct.go:79 +0x313 fp=0x291cedac sp=0x291cec98 pc=0x1606513
github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil.XMLToStruct(0x291c1c20, 0x5b70ab60)
        github.com/aws/aws-sdk-go@v1.44.266/private/protocol/xml/xmlutil/xml_to_struct.go:79 +0x313 fp=0x291ceec0 sp=0x291cedac pc=0x1606513
github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil.XMLToStruct(0x291c1c20, 0x291c4600)
        github.com/aws/aws-sdk-go@v1.44.266/private/protocol/xml/xmlutil/xml_to_struct.go:79 +0x313 fp=0x291cefd4 sp=0x291ceec0 pc=0x1606513
github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil.XMLToStruct(0x291c1c20, 0x291c44a0)
        github.com/aws/aws-sdk-go@v1.44.266/private/protocol/xml/xmlutil/xml_to_struct.go:79 +0x313 fp=0x291cf0e8 sp=0x291cefd4 pc=0x1606513
github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil.XMLToStruct(0x291c1c20, 0x0)
        github.com/aws/aws-sdk-go@v1.44.266/private/protocol/xml/xmlutil/xml_to_struct.go:79 +0x313 fp=0x291cf1fc sp=0x291cf0e8 pc=0x1606513
github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil.UnmarshalXML({0xb903c40, 0x291ac8f0}, 0x291c1c20, {0x0, 0x0})
        github.com/aws/aws-sdk-go@v1.44.266/private/protocol/xml/xmlutil/unmarshal.go:40 +0x30 fp=0x291cf274 sp=0x291cf1fc pc=0x1603c60
github.com/aws/aws-sdk-go/private/protocol/ec2query.Unmarshal(0x2913db80)
        github.com/aws/aws-sdk-go@v1.44.266/private/protocol/ec2query/unmarshal.go:28 +0xe7 fp=0x291cf2d4 sp=0x291cf274 pc=0x4fea1c7
github.com/aws/aws-sdk-go/aws/request.(*HandlerList).Run(0x2913dcb8, 0x2913db80)
        github.com/aws/aws-sdk-go@v1.44.266/aws/request/handlers.go:267 +0x66 fp=0x291cf31c sp=0x291cf2d4 pc=0x155c5c6
github.com/aws/aws-sdk-go/aws/request.(*Request).sendRequest(0x2913db80)
        github.com/aws/aws-sdk-go@v1.44.266/aws/request/request.go:620 +0x10d fp=0x291cf36c sp=0x291cf31c pc=0x155f92d
github.com/aws/aws-sdk-go/aws/request.(*Request).Send(0x2913db80)
        github.com/aws/aws-sdk-go@v1.44.266/aws/request/request.go:555 +0x13a fp=0x291cf3bc sp=0x291cf36c pc=0x155f1da
github.com/aws/aws-sdk-go/aws/request.(*Pagination).Next(0x291cf400)
        github.com/aws/aws-sdk-go@v1.44.266/aws/request/request_pagination.go:107 +0xb6 fp=0x291cf3ec sp=0x291cf3bc pc=0x1560786
github.com/aws/aws-sdk-go/service/ec2.(*EC2).DescribeImagesPagesWithContext(0x292602b0, {0xddb8120, 0x29155890}, 0x29149140, 0x291cf4a0, {0x0, 0x0, 0x0})
        github.com/aws/aws-sdk-go@v1.44.266/service/ec2/api.go:21829 +0xf8 fp=0x291cf464 sp=0x291cf3ec pc=0x50234a8
github.com/hashicorp/terraform-provider-aws/internal/service/ec2.FindImages({0xddb8120, 0x29155890}, 0x292602b0, 0x29149140)
        github.com/hashicorp/terraform-provider-aws/internal/service/ec2/find.go:876 +0x97 fp=0x291cf4b8 sp=0x291cf464 pc=0x8878597
github.com/hashicorp/terraform-provider-aws/internal/service/ec2.dataSourceAMIRead({0xddb8120, 0x29155890}, 0x291a0c80, {0xc91c660, 0x25c53800})
        github.com/hashicorp/terraform-provider-aws/internal/service/ec2/ec2_ami_data_source.go:251 +0x2aa fp=0x291cf864 sp=0x291cf4b8 pc=0x87cedaa
github.com/hashicorp/terraform-provider-aws/internal/provider.interceptedHandler[...].func1(0x291a0c80, {0xc91c660, 0x25c53800})
        github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:108 +0x188 fp=0x291cf908 sp=0x291cf864 pc=0x9eeacf8
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0x25847880, {0xddb8120, 0x291555f0}, 0x291a0c80, {0xc91c660, 0x25c53800})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/resource.go:719 +0x80 fp=0x291cf93c sp=0x291cf908 pc=0x144b7f0
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).ReadDataApply(0x25847880, {0xddb8120, 0x291555f0}, 0x291a0be0, {0xc91c660, 0x25c53800})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/resource.go:943 +0x12f fp=0x291cf97c sp=0x291cf93c pc=0x144d31f
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadDataSource(0x27443580, {0xddb8120, 0x29155590}, 0x291ac190)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/grpc_provider.go:1195 +0x3f5 fp=0x291cf9fc sp=0x291cf97c pc=0x1446275
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.muxServer.ReadDataSource({0x2747c7c0, 0x2747c800, {0x28147700, 0x2, 0x2}, {0x0, 0x0, 0x0}, {0x0, 0x0, ...}, ...}, ...)
        github.com/hashicorp/terraform-plugin-mux@v0.10.0/tf5muxserver/mux_server_ReadDataSource.go:27 +0x151 fp=0x291cfa40 sp=0x291cf9fc pc=0x132cc41
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ReadDataSource(0x26ea5380, {0xddb8120, 0x291554a0}, 0x291ac190)
        <autogenerated>:1 +0x6d fp=0x291cfb0c sp=0x291cfa40 pc=0x132e05d
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadDataSource(0x251ad270, {0xddb8120, 0x291551e8}, 0x2913f650)
        github.com/hashicorp/terraform-plugin-go@v0.15.0/tfprotov5/tf5server/server.go:658 +0x436 fp=0x291cfcd4 sp=0x291cfb0c pc=0x1253306
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadDataSource_Handler({0xc7a5e00, 0x251ad270}, {0xddb8120, 0x291551e8}, 0x29148e00, 0x0)
        github.com/hashicorp/terraform-plugin-go@v0.15.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:455 +0x18a fp=0x291cfd08 sp=0x291cfcd4 pc=0x123d09a
google.golang.org/grpc.(*Server).processUnaryRPC(0x27796c60, {0xddbe100, 0x252e6000}, 0x29126b40, 0x2832c438, 0x14480778, 0x0)
        google.golang.org/grpc@v1.54.0/server.go:1345 +0xed7 fp=0x291cff2c sp=0x291cfd08 pc=0x11c2107
google.golang.org/grpc.(*Server).handleStream(0x27796c60, {0xddbe100, 0x252e6000}, 0x29126b40, 0x0)
        google.golang.org/grpc@v1.54.0/server.go:1722 +0xa17 fp=0x291cffb8 sp=0x291cff2c pc=0x11c6927
google.golang.org/grpc.(*Server).serveStreams.func1.2()
        google.golang.org/grpc@v1.54.0/server.go:966 +0xb1 fp=0x291cfff0 sp=0x291cffb8 pc=0x11bfb21
runtime.goexit()
        runtime/asm_386.s:1326 +0x1 fp=0x291cfff4 sp=0x291cfff0 pc=0xd45311
created by google.golang.org/grpc.(*Server).serveStreams.func1
        google.golang.org/grpc@v1.54.0/server.go:964 +0x25f

goroutine 1 [select]:
runtime.gopark(0xcbe34c8, 0x0, 0x9, 0x18, 0x1)
        runtime/proc.go:363 +0xff fp=0x252f5ac8 sp=0x252f5ab4 pc=0xd1b80f
runtime.selectgo(0x252f5d34, 0x26f37c58, 0x0, 0x0, 0x2, 0x1)
        runtime/select.go:328 +0xbe8 fp=0x252f5bbc sp=0x252f5ac8 pc=0xd2a428
github.com/hashicorp/go-plugin.Serve(0x27de3620)
        github.com/hashicorp/go-plugin@v1.4.9/server.go:474 +0x1530 fp=0x252f5e4c sp=0x252f5bbc pc=0x11f1b20
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.Serve({0xca9e11f, 0x23}, 0x26ea5140, {0x0, 0x0, 0x0})
        github.com/hashicorp/terraform-plugin-go@v0.15.0/tfprotov5/tf5server/server.go:312 +0xc3f fp=0x252f5f84 sp=0x252f5e4c pc=0x12501bf
main.main()
        github.com/hashicorp/terraform-provider-aws/main.go:32 +0x1f9 fp=0x252f5fc4 sp=0x252f5f84 pc=0x9eebbe9

Error: The terraform-provider-aws_v5.0.1_x5.exe plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.

Terraform Configuration Files

terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "5.0.1"
    }
  }
  required_version = ">=1.4.5"
}

provider "aws" {
  region = "us-east-1"
}

data "aws_ami" "example" {
  most_recent = true
}

resource "aws_instance" "my_ec2_instance" {
  ami           = data.aws_ami.example.id
  instance_type = "t2.micro"
}

Steps to Reproduce

terraform plan

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@VijayKeerthan VijayKeerthan added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels May 30, 2023
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/ec2 Issues and PRs that pertain to the ec2 service. label May 30, 2023
@ewbankkit ewbankkit added crash Results from or addresses a Terraform crash or kernel panic. and removed needs-triage Waiting for first response or review from a maintainer. labels May 30, 2023
@ewbankkit
Copy link
Contributor

Similar: #31570.

@github-actions
Copy link

github-actions bot commented Jun 1, 2023

This functionality has been released in v5.1.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Jul 2, 2023

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants