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: The terraform-provider-aws_v3.71.0_x5 plugin crashed! #22542

Closed
jorenvh1 opened this issue Jan 12, 2022 · 4 comments · Fixed by #23039
Closed

Error: The terraform-provider-aws_v3.71.0_x5 plugin crashed! #22542

jorenvh1 opened this issue Jan 12, 2022 · 4 comments · Fixed by #23039
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/rds Issues and PRs that pertain to the rds service.

Comments

@jorenvh1
Copy link

jorenvh1 commented Jan 12, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • 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
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider Version

Terraform v1.1.3
on darwin_amd64
+ provider registry.terraform.io/hashicorp/archive v2.2.0
+ provider registry.terraform.io/hashicorp/aws v3.71.0
+ provider registry.terraform.io/hashicorp/local v2.1.0
+ provider registry.terraform.io/hashicorp/template v2.2.0

Affected Resource(s)

All

Debug Output

https://gist.github.com/jorenvh1/5c6c592f3efead35a0276faa201e318c

Panic Output

https://gist.github.com/jorenvh1/5c6c592f3efead35a0276faa201e318c

Expected Behavior

Tf apply default output (prompt to apply)

Steps to Reproduce

  1. terraform apply
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jan 12, 2022
@ewbankkit
Copy link
Contributor

ewbankkit commented Jan 12, 2022

Stack trace from the terraform-provider-aws_v3.71.0_x5 plugin:

panic: runtime error: slice bounds out of range [:35] with capacity 32

goroutine 187 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/rds.compareActualEngineVersion(0xc001bc9180, 0xc001b933e0, 0x22, 0xc00115f818, 0x17)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-aws/internal/service/rds/cluster.go:1544 +0x28a
github.com/hashicorp/terraform-provider-aws/internal/service/rds.rdsClusterSetResourceDataEngineVersionFromCluster(0xc001bc9180, 0xc001c28b00)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-aws/internal/service/rds/cluster.go:1540 +0x9c
github.com/hashicorp/terraform-provider-aws/internal/service/rds.resourceClusterRead(0xc001bc9180, 0x8d5d680, 0xc0005fca80, 0xfb29500, 0xc000780900)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-aws/internal/service/rds/cluster.go:1084 +0xabb
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xc000d915e0, 0xafc3db8, 0xc0006fd100, 0xc001bc9180, 0x8d5d680, 0xc0005fca80, 0x0, 0x0, 0x0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.10.1/helper/schema/resource.go:346 +0x1ee
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc000d915e0, 0xafc3db8, 0xc0006fd100, 0xc001bdb790, 0x8d5d680, 0xc0005fca80, 0xc001d090b0, 0x0, 0x0, 0x0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.10.1/helper/schema/resource.go:635 +0x1cb
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc000390888, 0xafc3db8, 0xc0006fd100, 0xc0006fd140, 0xa0814a9, 0x12, 0x0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.10.1/helper/schema/grpc_provider.go:576 +0x47d
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0xc00019eb80, 0xafc3e60, 0xc0006fd100, 0xc001be4360, 0x0, 0x0, 0x0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.5.0/tfprotov5/tf5server/server.go:553 +0x322
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler(0x9decc80, 0xc00019eb80, 0xafc3e60, 0xc001e98240, 0xc001be4300, 0x0, 0xafc3e60, 0xc001e98240, 0xc001e9e000, 0x7cf)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.5.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:344 +0x214
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000eea000, 0xaff0338, 0xc0007d9500, 0xc001b8c400, 0xc000830540, 0xfae9bf0, 0x0, 0x0, 0x0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:1194 +0x52b
google.golang.org/grpc.(*Server).handleStream(0xc000eea000, 0xaff0338, 0xc0007d9500, 0xc001b8c400, 0x0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:1517 +0xd0c
google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000fdee70, 0xc000eea000, 0xaff0338, 0xc0007d9500, 0xc001b8c400)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:859 +0xab
created by google.golang.org/grpc.(*Server).serveStreams.func1
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:857 +0x1fd

Error: The terraform-provider-aws_v3.71.0_x5 plugin crashed!

func rdsClusterSetResourceDataEngineVersionFromCluster(d *schema.ResourceData, c *rds.DBCluster) {
oldVersion := d.Get("engine_version").(string)
newVersion := aws.StringValue(c.EngineVersion)
compareActualEngineVersion(d, oldVersion, newVersion)
}
func compareActualEngineVersion(d *schema.ResourceData, oldVersion string, newVersion string) {
if oldVersion != newVersion && string(append([]byte(oldVersion), []byte(".")...)) != string([]byte(newVersion)[0:len(oldVersion)+1]) {
d.Set("engine_version", newVersion)
}
d.Set("engine_version_actual", newVersion)
}

@ewbankkit ewbankkit added bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/rds Issues and PRs that pertain to the rds service. and removed needs-triage Waiting for first response or review from a maintainer. labels Jan 12, 2022
@ewbankkit
Copy link
Contributor

@jorenvh1 Thanks for raising this issue.
Do you know the old and new values of engine_version?

@ewbankkit ewbankkit added the waiting-response Maintainers are waiting on response from community or contributor. label Jan 12, 2022
@jorenvh1
Copy link
Author

@ewbankkit Ah right, that's the issue. Well, since I'm using aurora serverless I tried to change the engine version.
At first it was: 5.7.mysql_aurora.2.08.3 in my tf config but every apply it would say that it couldn't find a valid upgrade path from 5.7.mysql_aurora.2.07 to 5.7.mysql_aurora.2.08.3. I thought I made a mistake in the engine versions since there are also serverless specific engine version. I tried 5.7.serverless_mysql_aurora.2.08.3 this one as well as just 5.7. Really confused on what TF/aws expects here.

@github-actions github-actions bot removed the waiting-response Maintainers are waiting on response from community or contributor. label Jan 12, 2022
@github-actions
Copy link

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 May 14, 2022
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/rds Issues and PRs that pertain to the rds service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants