terraform-provider-azuredevops icon indicating copy to clipboard operation
terraform-provider-azuredevops copied to clipboard

Error: Plugin did not respond

Open ankek opened this issue 2 years ago • 4 comments

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

Stack trace from the terraform-provider-azuredevops_v0.2.1 plugin:

fatal error: concurrent map writes

goroutine 47 [running]: runtime.throw(0x1986acf, 0x15) runtime/panic.go:1117 +0x79 fp=0xc0002c0bf0 sp=0xc0002c0bc0 pc=0xe79a39 runtime.mapassign_faststr(0x183b720, 0xc0002e1560, 0x197b859, 0x9, 0x17d4fc0) runtime/map_faststr.go:291 +0x3f8 fp=0xc0002c0c58 sp=0xc0002c0bf0 pc=0xe54e98 github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/service/core.getProjectFeatureNameMapReverse(0xc00030a4f0) github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/service/core/resource_project_features.go:116 +0xf7 fp=0xc0002c0d00 sp=0xc0002c0c58 pc=0x16bb6b7 github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/service/core.getProjectFeatureID(...) github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/service/core/resource_project_features.go:123 github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/service/core.validateProjectFeatures(0x18403a0, 0xc000344600, 0x197abf6, 0x8, 0xc0002c0ec0, 0xc0002c0e60, 0xee7bb9, 0x181dca0, 0x0, 0xc0002c0eb0)
github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/service/core/resource_project_features.go:87 +0x18c fp=0xc0002c0e18 sp=0xc0002c0d00 pc=0x16baecc github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Schema).validateFunc(0xc000457cc0, 0x18403a0, 0xc000344600, 0x197abf6, 0x8, 0xc0006ad680, 0x1, 0x1, 0x0, 0x0, ...) github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/schema.go:441 +0xa2 fp=0xc0002c0f90 sp=0xc0002c0e18 pc=0x11ca6a2 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.validateMap(0xc000454240, 0x197abf6, 0x8, 0x18403a0, 0xc000344600, 0xc000457cc0, 0xc000344210, 0xc0006ad680, 0x1, 0x1, ...) github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/schema.go:1824 +0xad2 fp=0xc0002c11f8 sp=0xc0002c0f90 pc=0x11d6272 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.validateType(0xc000454240, 0x197abf6, 0x8, 0x18403a0, 0xc000344600, 0xc000457cc0, 0xc000344210, 0xc0006ad680, 0x1, 0x1, ...) github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/schema.go:2111 +0x4e7 fp=0xc0002c12f8 sp=0xc0002c11f8 pc=0x11d9587 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.validate(0xc000454240, 0x197abf6, 0x8, 0xc000457cc0, 0xc000344210, 0xc0006ad680, 0x1, 0x1, 0x0, 0x0, ...) github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/schema.go:1534 +0x8c9 fp=0xc0002c15e8 sp=0xc0002c12f8 pc=0x11d2a49 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.validateObject(0xc000454240, 0x0, 0x0, 0xc000454240, 0xc000344210, 0x1fe1418, 0x0, 0x0, 0xc00068e760, 0xc000034408, ...) github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/schema.go:1970 +0x2bc fp=0xc0002c18a8 sp=0xc0002c15e8 pc=0x11d78bc github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.Validate(...) github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/schema.go:649 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Validate(0xc000458380, 0xc000344210, 0xc0000342b8, 0x13, 0xc0001f3300) github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:542 +0x75 fp=0xc0002c1970 sp=0xc0002c18a8 pc=0x11be275 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Provider).ValidateResource(0xc000163800, 0xc0000342b8, 0x13, 0xc000344210, 0xc000557ce0, 0xc000344210, 0xc0000ac010) github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/provider.go:254 +0x16c fp=0xc0002c19d8 sp=0xc0002c1970 pc=0x11ba78c github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ValidateResourceTypeConfig(0xc000005878, 0x1aa8bf8, 0xc000304b80, 0xc0006a25e8, 0x1983331, 0x12, 0x0) github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:230 +0x1e7 fp=0xc0002c1a50 sp=0xc0002c19d8 pc=0x11ae367 github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ValidateResourceTypeConfig(0xc000616100, 0x1aa8ca0, 0xc000304b80, 0xc0001fc480, 0x0, 0x0, 0x0) github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:503 +0x2e8 fp=0xc0002c1b40 sp=0xc0002c1a50 pc=0x1550228 github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ValidateResourceTypeConfig_Handler(0x19320e0, 0xc000616100, 0x1aa8ca0, 0xc000562330, 0xc000092900, 0x0, 0x1aa8ca0, 0xc000562330, 0xc00058a500, 0xfa) github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:272 +0x222 fp=0xc0002c1bb0 sp=0xc0002c1b40 pc=0x153bac2 google.golang.org/grpc.(*Server).processUnaryRPC(0xc00027cfc0, 0x1ab5d58, 0xc00058c600, 0xc00033a900, 0xc000302360, 0x1f8ebb0, 0x0, 0x0, 0x0) google.golang.org/[email protected]/server.go:1194 +0x52b fp=0xc0002c1e50 sp=0xc0002c1bb0 pc=0x14e5f0b google.golang.org/grpc.(*Server).handleStream(0xc00027cfc0, 0x1ab5d58, 0xc00058c600, 0xc00033a900, 0x0) google.golang.org/[email protected]/server.go:1517 +0xd0c fp=0xc0002c1f68 sp=0xc0002c1e50 pc=0x14ea10c google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc00030a190, 0xc00027cfc0, 0x1ab5d58, 0xc00058c600, 0xc00033a900) google.golang.org/[email protected]/server.go:859 +0xb2 fp=0xc0002c1fb8 sp=0xc0002c1f68 pc=0x14f82b2 runtime.goexit() runtime/asm_amd64.s:1371 +0x1 fp=0xc0002c1fc0 sp=0xc0002c1fb8 pc=0xeadb21 created by google.golang.org/grpc.(*Server).serveStreams.func1 google.golang.org/[email protected]/server.go:857 +0x1fd

goroutine 1 [select]: github.com/hashicorp/go-plugin.Serve(0xc0003ade88) github.com/hashicorp/[email protected]/server.go:469 +0x954 github.com/hashicorp/terraform-plugin-sdk/v2/plugin.Serve(0xc000163740) github.com/hashicorp/terraform-plugin-sdk/[email protected]/plugin/serve.go:147 +0x125 main.main() github.com/microsoft/terraform-provider-azuredevops/main.go:10 +0x4c

goroutine 9 [select]: github.com/hashicorp/go-plugin.(*gRPCBrokerServer).Recv(0xc000112bd0, 0x0, 0x0, 0x0) github.com/hashicorp/[email protected]/grpc_broker.go:121 +0x8d github.com/hashicorp/go-plugin.(*GRPCBroker).Run(0xc000068af0) github.com/hashicorp/[email protected]/grpc_broker.go:411 +0x85 created by github.com/hashicorp/go-plugin.(*GRPCServer).Init github.com/hashicorp/[email protected]/grpc_server.go:85 +0x3af

goroutine 10 [syscall, locked to thread]: syscall.Syscall6(0x7fff7f2a4ee0, 0x5, 0x1c4, 0xc0001c9000, 0x1000, 0xc000327d1c, 0x0, 0x0, 0x0, 0x0, ...) runtime/syscall_windows.go:343 +0xf2 syscall.ReadFile(0x1c4, 0xc0001c9000, 0x1000, 0x1000, 0xc000327d1c, 0x0, 0x7ffff800000, 0x2) syscall/zsyscall_windows.go:1006 +0x105 syscall.Read(0x1c4, 0xc0001c9000, 0x1000, 0x1000, 0x0, 0x0, 0x8) syscall/syscall_windows.go:369 +0x6f internal/poll.(*FD).Read(0xc00042a000, 0xc0001c9000, 0x1000, 0x1000, 0x0, 0x0, 0x0) internal/poll/fd_windows.go:427 +0x225 os.(*File).read(...) os/file_posix.go:31 os.(*File).Read(0xc00075c010, 0xc0001c9000, 0x1000, 0x1000, 0x400, 0x17f9ac0, 0x1) os/file.go:117 +0x85 bufio.(*Reader).Read(0xc000327f50, 0xc000140400, 0x400, 0x400, 0x0, 0x0, 0x0) bufio/bufio.go:227 +0x238 github.com/hashicorp/go-plugin.copyChan(0x1aba708, 0xc000154f00, 0xc00003c9c0, 0x1a93a40, 0xc00075c010) github.com/hashicorp/[email protected]/grpc_stdio.go:181 +0xd0 created by github.com/hashicorp/go-plugin.newGRPCStdioServer github.com/hashicorp/[email protected]/grpc_stdio.go:37 +0xbc

syscall.Syscall6(0x7fff7f2a4ee0, 0x5, 0x1b4, 0xc0001d1000, 0x1000, 0xc0006c3d1c, 0x0, 0x0, 0x0, 0x0, ...) runtime/syscall_windows.go:343 +0xf2 syscall.ReadFile(0x1b4, 0xc0001d1000, 0x1000, 0x1000, 0xc0006c3d1c, 0x0, 0x7ffff800000, 0x2) syscall/zsyscall_windows.go:1006 +0x105 syscall.Read(0x1b4, 0xc0001d1000, 0x1000, 0x1000, 0x74b92a619e60c624, 0xc455a91dff1aa77, 0x8) syscall/syscall_windows.go:369 +0x6f internal/poll.(*FD).Read(0xc00042a500, 0xc0001d1000, 0x1000, 0x1000, 0x0, 0x0, 0x0) internal/poll/fd_windows.go:427 +0x225 os.(*File).read(...) os/file_posix.go:31 os.(*File).Read(0xc00075c028, 0xc0001d1000, 0x1000, 0x1000, 0x400, 0x17f9ac0, 0xeb723e549b99bf01) os/file.go:117 +0x85 bufio.(*Reader).Read(0xc0006c3f50, 0xc0002c2000, 0x400, 0x400, 0x53ea1991e2bd5fc9, 0x338089f01756fa87, 0x62a27db9a4b876ae) bufio/bufio.go:227 +0x238 github.com/hashicorp/go-plugin.copyChan(0x1aba708, 0xc000154f00, 0xc00003ca20, 0x1a93a40, 0xc00075c028) github.com/hashicorp/[email protected]/grpc_stdio.go:181 +0xd0 created by github.com/hashicorp/go-plugin.newGRPCStdioServer github.com/hashicorp/[email protected]/grpc_stdio.go:38 +0x109

Error: The terraform-provider-azuredevops_v0.2.1 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.

ankek avatar May 25 '22 13:05 ankek

Failing on plan and apply

ankek avatar May 25 '22 13:05 ankek

dup with #593. #595 PR: #596 will fix this issue

xuzhang3 avatar May 26 '22 08:05 xuzhang3

I had the exact same error and wanted to log an issue but this has a similar log fatal error: concurrent map writes, and my log trace shows the same function causing troubles. In the meanwhile, since no new release is available yet, my workaround was to remove the features block from the azuredevops_project resource.

@xuzhang3 not sure whether you're related to Microsoft, but is there any reason why these fixes have not been released yet?

VincentVerweij avatar Jun 24 '22 10:06 VincentVerweij

@VincentVerweij new version will coming soon, sorry for the delay.

xuzhang3 avatar Jun 30 '22 07:06 xuzhang3