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

azurerm_storage_share_file: upload 2.5GB file crashed the plugin #12925

Closed
morks opened this issue Aug 10, 2021 · 8 comments · Fixed by #16460
Closed

azurerm_storage_share_file: upload 2.5GB file crashed the plugin #12925

morks opened this issue Aug 10, 2021 · 8 comments · Fixed by #16460

Comments

@morks
Copy link

morks commented Aug 10, 2021

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 "me too" comments, 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 (and AzureRM Provider) Version

Terraform v1.0.4
on darwin_amd64

  • provider registry.terraform.io/hashicorp/azurerm v2.71.0

Affected Resource(s)

  • azurerm_storage_share_file

Terraform Configuration Files

resource "azurerm_storage_account" "doddeployment" {
    name                        = "doddeployment"
    resource_group_name         = var.resource_group
    location                    = var.location 
    account_tier                = "Standard"
    account_replication_type    = "LRS"
}

resource "azurerm_storage_share" "dodcode" {
    name                 = "dodcode"
    storage_account_name = azurerm_storage_account.doddeployment.name
}

resource "azurerm_storage_share_file" "dodplaybooks" {
  name             = "playbooks.tar.gz"
  storage_share_id = azurerm_storage_share.dodcode.id
  source           = "../../ansible/playbooks.tar.gz"
  timeouts {
    create = "45m"
  }
}

Debug Output

Panic Output

azurerm_storage_share_file.dodplaybooks: Still creating... [8m30s elapsed]
╷
│ Error: Plugin did not respond
│ 
│   with azurerm_storage_share_file.dodplaybooks,
│   on filestore.tf line 22, in resource "azurerm_storage_share_file" "dodplaybooks":22: resource "azurerm_storage_share_file" "dodplaybooks" {
│ 
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details.
╵

Stack trace from the terraform-provider-azurerm_v2.71.0_x5 plugin:
panic: sync: negative WaitGroup counter

goroutine 588 [running]:
sync.(*WaitGroup).Add(0xc0016615a0, 0xffffffffffffffff)
        /opt/goenv/versions/1.16.6/src/sync/waitgroup.go:74 +0x147
sync.(*WaitGroup).Done(...)
        /opt/goenv/versions/1.16.6/src/sync/waitgroup.go:99
github.com/tombuildsstuff/giovanni/storage/2019-12-12/file/files.Client.PutFile.func1(0x226, 0xc001661598, 0x89659cf7, 0xc001a066e0, 0x73865f8, 0xc000898660, 0xc000976108, 0xd, 0xc00097612c, 0x7, ...)
        /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/tombuildsstuff/giovanni/storage/2019-12-12/file/files/range_put_file.go:52 +0x285
created by github.com/tombuildsstuff/giovanni/storage/2019-12-12/file/files.Client.PutFile
        /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/tombuildsstuff/giovanni/storage/2019-12-12/file/files/range_put_file.go:40 +0x2f7

Error: The terraform-provider-azurerm_v2.71.0_x5 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.

Expected Behaviour

Upload the file to the fileshare

Actual Behaviour

file upload crashed after 8 minutes

Steps to Reproduce

Use the code above to upload a file with 2.5GB

  1. terraform apply

Important Factoids

  • The size of the file is 2.5GB
  • "location": "West Europe"
@bartek1
Copy link

bartek1 commented Oct 8, 2021

I have similar issue with provider 2.80.0.

Code:

terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "2.80.0"
}
}
}

provider "azurerm" {
subscription_id = "XXXXXXX"
skip_provider_registration = "true"
features {}

}

resource "azurerm_resource_group" "example" {
name = "example-share"
location = "West Europe"
}

resource "azurerm_storage_account" "example" {
name = "exampleterra"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
account_tier = "Standard"
account_replication_type = "LRS"
}

resource "azurerm_storage_share" "example" {
name = "sharename"
storage_account_name = azurerm_storage_account.example.name
quota = 50
}

resource "azurerm_storage_share_file" "example" {
name = "Files.zip"
storage_share_id = azurerm_storage_share.example.id
source = "Files.zip"

}

Error:

│ Error: Plugin did not respond

│ with azurerm_storage_share_file.example,
│ on main.tf line 39, in resource "azurerm_storage_share_file" "example":
│ 39: resource "azurerm_storage_share_file" "example" {

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

Stack trace from the terraform-provider-azurerm_v2.80.0_x5.exe plugin:

panic: sync: negative WaitGroup counter

goroutine 182 [running]:
sync.(*WaitGroup).Add(0xc0026ea080, 0xffffffffffffffff)
/opt/goenv/versions/1.16.7/src/sync/waitgroup.go:74 +0x147
sync.(*WaitGroup).Done(...)
/opt/goenv/versions/1.16.7/src/sync/waitgroup.go:99
github.com/tombuildsstuff/giovanni/storage/2020-08-04/file/files.Client.PutFile.func1(0x74, 0xc0026ea078, 0x1cee0580, 0xc00108f5e0, 0x736fbb8, 0xc0017a3140, 0xc00113f208, 0xc, 0xc00113f22b, 0x9, ...)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/tombuildsstuff/giovanni/storage/2020-08-04/file/files/range_put_file.go:52 +0x2a5
created by github.com/tombuildsstuff/giovanni/storage/2020-08-04/file/files.Client.PutFile
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/tombuildsstuff/giovanni/storage/2020-08-04/file/files/range_put_file.go:40 +0x309

Error: The terraform-provider-azurerm_v2.80.0_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.

@malcolmtylerfil

This comment was marked as off-topic.

@steven-visagie

This comment was marked as off-topic.

@tombuildsstuff
Copy link
Contributor

@magodo since you were making related changes to blob uploads recently, any chance you could take a look into this one?

@magodo
Copy link
Collaborator

magodo commented Apr 20, 2022

@tombuildsstuff This is the same issue as #15895, which is fixed in tombuildsstuff/giovanni#56. Once a new release is made for the giovanni, we can upgrade the dependency and get the issue fixed.

@tombuildsstuff
Copy link
Contributor

👍 oh cool, I think that got released yesterday fwiw, let me check

@tombuildsstuff
Copy link
Contributor

PR to update the dependencies: #16460

@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 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
7 participants