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

Crash: panic: value is marked, so must be unmarked first #28535

Closed
syphernl opened this issue Apr 28, 2021 · 4 comments · Fixed by #28539
Closed

Crash: panic: value is marked, so must be unmarked first #28535

syphernl opened this issue Apr 28, 2021 · 4 comments · Fixed by #28539
Assignees
Labels
bug confirmed a Terraform Core team member has reproduced this issue core

Comments

@syphernl
Copy link

Terraform Version

Terraform v0.15.1
on linux_amd64
+ provider registry.terraform.io/gitlabhq/gitlab v3.6.0
+ provider registry.terraform.io/hashicorp/archive v2.1.0
+ provider registry.terraform.io/hashicorp/aws v3.37.0
+ provider registry.terraform.io/hashicorp/github v3.0.0
+ provider registry.terraform.io/hashicorp/local v2.1.0
+ provider registry.terraform.io/hashicorp/null v3.1.0
+ provider registry.terraform.io/hashicorp/random v2.3.1
+ provider registry.terraform.io/hashicorp/template v2.2.0

Terraform Configuration Files

module "cloudfront" {
  source = "git::https://github.com/cloudposse/terraform-aws-cloudfront-s3-cdn.git?ref=0.61.0"
}

Debug Output

Crash Output

2021-04-28T13:17:48.468+0200 [TRACE] planDataSource: module.cloudfront.data.aws_iam_policy_document.origin_website[0] configuration not fully known yet, so deferring to apply phase
2021-04-28T13:17:48.468+0200 [INFO]  ReferenceTransformer: reference not found: "local.using_existing_cloudfront_origin"
2021-04-28T13:17:48.468+0200 [INFO]  ReferenceTransformer: reference not found: "var.cloudfront_origin_access_identity_path"
2021-04-28T13:17:48.468+0200 [INFO]  ReferenceTransformer: reference not found: "aws_cloudfront_origin_access_identity.default"
2021-04-28T13:17:48.468+0200 [INFO]  ReferenceTransformer: reference not found: "var.origin_ssl_protocols"
2021-04-28T13:17:48.468+0200 [INFO]  ReferenceTransformer: reference not found: "var.acm_certificate_arn"
2021-04-28T13:17:48.468+0200 [INFO]  ReferenceTransformer: reference not found: "var.acm_certificate_arn"
2021-04-28T13:17:48.468+0200 [INFO]  ReferenceTransformer: reference not found: "var.acm_certificate_arn"
2021-04-28T13:17:48.468+0200 [TRACE] vertex "module.cloudfront.data.aws_iam_policy_document.origin_website[0]": visit complete

panic: value is marked, so must be unmarked first

goroutine 57011 [running]:
github.com/zclconf/go-cty/cty.Value.assertUnmarked(...)
	/go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/marks.go:141
github.com/zclconf/go-cty/cty.Value.LengthInt(0x2c37160, 0xc011b8faa0, 0x24e9360, 0xc000a7a978, 0x0)
	/go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/value_ops.go:1050 +0x4f
github.com/hashicorp/terraform/plans/objchange.proposedNewNestedBlock(0xc005ba4b40, 0x2c37160, 0xc00e9e2b30, 0x23d1100, 0x3cefe80, 0x2c37160, 0xc011b8faa0, 0x24e9360, 0xc000a7a978, 0xc000a7a978, ...)
	/home/circleci/project/project/plans/objchange/objchange.go:217 +0x11cc
github.com/hashicorp/terraform/plans/objchange.proposedNew(0xc005ba4af0, 0x2c37128, 0xc00e9e2b60, 0x23d1100, 0x3cefe80, 0x2c37128, 0xc011b8fd00, 0x23fab60, 0xc005f5a1b0, 0x2c37128, ...)
	/home/circleci/project/project/plans/objchange/objchange.go:89 +0x33c
github.com/hashicorp/terraform/plans/objchange.ProposedNew(0xc005ba4af0, 0x2c37128, 0xc00e9e2b60, 0x23d1100, 0x3cefe80, 0x2c37128, 0xc011b8fd00, 0x23fab60, 0xc005f5a1b0, 0xc00e9e2b60, ...)
	/home/circleci/project/project/plans/objchange/objchange.go:42 +0x11f
github.com/hashicorp/terraform/plans/objchange.proposedNewNestedBlock(0xc005ba4af0, 0x2c370b8, 0xc00e9e2b70, 0x23d1100, 0x3cefe80, 0x2c370b8, 0xc011b8ff20, 0x22e1560, 0xc00423c138, 0xc00423c138, ...)
	/home/circleci/project/project/plans/objchange/objchange.go:121 +0x432
github.com/hashicorp/terraform/plans/objchange.proposedNew(0xc0052c2330, 0x2c37128, 0xc00e9e2b80, 0x23d1100, 0x3cefe80, 0x2c37128, 0xc011b8ff30, 0x23fab60, 0xc005150780, 0x97, ...)
	/home/circleci/project/project/plans/objchange/objchange.go:89 +0x33c
github.com/hashicorp/terraform/plans/objchange.PlannedDataResourceObject(0xc0052c2330, 0x2c37128, 0xc011b8ff30, 0x23fab60, 0xc005150780, 0x1, 0x0, 0x0, 0x0)
	/home/circleci/project/project/plans/objchange/objchange.go:64 +0x89
github.com/hashicorp/terraform/terraform.(*NodeAbstractResourceInstance).planDataSource(0xc006390380, 0x2c6cc70, 0xc00c09a340, 0xc003aa8120, 0x1, 0x1, 0x0, 0x0, 0x0)
	/home/circleci/project/project/terraform/node_resource_abstract_instance.go:1361 +0x7aa
github.com/hashicorp/terraform/terraform.(*NodePlannableResourceInstance).dataResourceExecute(0xc007e72ef0, 0x2c6cc70, 0xc00c09a340, 0x28f33d0, 0xc00007b000, 0xc009785c50)
	/home/circleci/project/project/terraform/node_resource_plan_instance.go:74 +0x478
github.com/hashicorp/terraform/terraform.(*NodePlannableResourceInstance).Execute(0xc007e72ef0, 0x2c6cc70, 0xc00c09a340, 0xc0000c4002, 0xc009785ce8, 0x40bb05, 0x2444540)
	/home/circleci/project/project/terraform/node_resource_plan_instance.go:44 +0x10d
github.com/hashicorp/terraform/terraform.(*ContextGraphWalker).Execute(0xc0044fc0c0, 0x2c6cc70, 0xc00c09a340, 0x7f01e8e1c490, 0xc007e72ef0, 0x0, 0x0, 0x0)
	/home/circleci/project/project/terraform/graph_walk_context.go:127 +0xbf
github.com/hashicorp/terraform/terraform.(*Graph).walk.func1(0x2774800, 0xc007e72ef0, 0x0, 0x0, 0x0)
	/home/circleci/project/project/terraform/graph.go:59 +0xbd3
github.com/hashicorp/terraform/dag.(*Walker).walkVertex(0xc0028f8b40, 0x2774800, 0xc007e72ef0, 0xc00732ad00)
	/home/circleci/project/project/dag/walk.go:381 +0x288
created by github.com/hashicorp/terraform/dag.(*Walker).Update
	/home/circleci/project/project/dag/walk.go:304 +0x1246

Expected Behavior

No crash

Actual Behavior

Crash.

Steps to Reproduce

  • Update https://github.com/cloudposse/terraform-aws-cloudfront-s3-cdn from 0.60.0 to 0.61.0 (diff)
  • Run terraform init and terraform apply
  • Crash occurs.

Additional Context

References

@syphernl syphernl added bug new new issue not yet triaged labels Apr 28, 2021
@jwefers
Copy link

jwefers commented Apr 28, 2021

same here on 0.15.1 for updating an azurerm_api_management_api with imported openAPI file:

panic: value is marked, so must be unmarked first

goroutine 88 [running]:
github.com/zclconf/go-cty/cty.Value.assertUnmarked(...)
	/go/pkg/mod/github.com/zclconf/go-cty@v1.8.1/cty/marks.go:123
github.com/zclconf/go-cty/cty.Value.ElementIterator(0x2c2e840, 0xc001125370, 0x24e3220, 0xc00075b7d0, 0x1, 0xc001125960)
	/go/pkg/mod/github.com/zclconf/go-cty@v1.8.1/cty/value_ops.go:1111 +0x4f
github.com/hashicorp/terraform/terraform.getValMarks(0xc001428120, 0x2c2e808, 0xc001125830, 0x23f4a00, 0xc001a3fd10, 0x0, 0x0, 0x0, 0x8020102, 0x3, ...)
	/home/circleci/project/project/terraform/evaluate.go:998 +0x748
github.com/hashicorp/terraform/terraform.markProviderSensitiveAttributes(0xc001428120, 0x2c2e808, 0xc001125830, 0x23f4a00, 0xc001a3fd10, 0x0, 0x13, 0xc00076a9b0, 0xb)
	/home/circleci/project/project/terraform/evaluate.go:960 +0x6e
github.com/hashicorp/terraform/terraform.(*evaluationStateData).GetResource(0xc0003061b0, 0x4d, 0xc000053ec0, 0x13, 0xc00076a9b0, 0xb, 0xc000053d88, 0x17, 0x18, 0x26, ...)
	/home/circleci/project/project/terraform/evaluate.go:787 +0x1333
github.com/hashicorp/terraform/lang.(*Scope).evalContext(0xc000e6a690, 0xc0005ecd20, 0x4, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x30)
	/home/circleci/project/project/lang/eval.go:360 +0x206d
github.com/hashicorp/terraform/lang.(*Scope).EvalContext(...)
	/home/circleci/project/project/lang/eval.go:238
github.com/hashicorp/terraform/lang.(*Scope).EvalBlock(0xc000e6a690, 0x2c2d298, 0xc001504540, 0xc001504810, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, ...)
	/home/circleci/project/project/lang/eval.go:51 +0xf3
github.com/hashicorp/terraform/terraform.(*BuiltinEvalContext).EvaluateBlock(0xc000ff05b0, 0x2c2d538, 0xc001504540, 0xc001504810, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/home/circleci/project/project/terraform/eval_context_builtin.go:273 +0x1ad
github.com/hashicorp/terraform/terraform.(*NodeAbstractResourceInstance).plan(0xc0008e0540, 0x2c64590, 0xc000ff05b0, 0xc000368f00, 0xc000ac9800, 0x0, 0x0, 0x0, 0x0, 0xc000acc7f8, ...)
	/home/circleci/project/project/terraform/node_resource_abstract_instance.go:577 +0x3d5
github.com/hashicorp/terraform/terraform.(*NodeApplyableResourceInstance).managedResourceExecute(0xc000c1c1c0, 0x2c64590, 0xc000ff05b0, 0x0, 0x0, 0xc000e3bc10)
	/home/circleci/project/project/terraform/node_resource_apply_instance.go:235 +0x63d
github.com/hashicorp/terraform/terraform.(*NodeApplyableResourceInstance).Execute(0xc000c1c1c0, 0x2c64590, 0xc000ff05b0, 0x7fa91d4cb001, 0xc000e3bd18, 0x40bb05, 0x243e3e0)
	/home/circleci/project/project/terraform/node_resource_apply_instance.go:129 +0xbc
github.com/hashicorp/terraform/terraform.(*ContextGraphWalker).Execute(0xc000478fc0, 0x2c64590, 0xc000ff05b0, 0x7fa91d4cb0f8, 0xc000c1c1c0, 0x0, 0x0, 0x0)
	/home/circleci/project/project/terraform/graph_walk_context.go:127 +0xbf
github.com/hashicorp/terraform/terraform.(*Graph).walk.func1(0x278a1c0, 0xc000c1c1c0, 0x0, 0x0, 0x0)
	/home/circleci/project/project/terraform/graph.go:59 +0xba2
github.com/hashicorp/terraform/dag.(*Walker).walkVertex(0xc000ac9020, 0x278a1c0, 0xc000c1c1c0, 0xc000a14f40)
	/home/circleci/project/project/dag/walk.go:381 +0x288
created by github.com/hashicorp/terraform/dag.(*Walker).Update
	/home/circleci/project/project/dag/walk.go:304 +0x1246

@jbardin jbardin added confirmed a Terraform Core team member has reproduced this issue core and removed new new issue not yet triaged labels Apr 28, 2021
@jbardin
Copy link
Member

jbardin commented Apr 28, 2021

Hi @jwefers, the output you have is a different stack trace from this issue, but it also cannot be from v0.15.1. I would double check that you have correctly updated to the latest release.

@jwefers
Copy link

jwefers commented May 5, 2021

You are right, it was on 0.15.0, my bad - It was the Build Agent

@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2021

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 Jun 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug confirmed a Terraform Core team member has reproduced this issue core
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants