Description
- Packer version = 1.4.1
- Host platform = Kubernetes GCP Gitlab CI Runner
- Debug Log:
==> googlecompute: Provisioning with powershell script: /tmp/powershell-provisioner447813243
2019/08/15 14:30:33 [INFO] 82 bytes written for 'uploadData'
2019/08/15 14:30:33 packer: 2019/08/15 14:30:33 Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5d55681c-f64e-f04e-35cc-ee5c21d2ec34.ps1'
2019/08/15 14:30:37 packer: #< CLIXML
2019/08/15 14:30:40 packer: System.Management.Automation.PSCustomObjectSystem.Object1Preparing modules for first use.0-1-1Completed-1 #< CLIXML
2019/08/15 14:30:40 packer: 2019/08/15 14:30:40 [INFO] 11 bytes written for 'uploadData'
2019/08/15 14:30:40 [INFO] 11 bytes written for 'uploadData'
2019/08/15 14:30:40 packer: System.Management.Automation.PSCustomObjectSystem.Object1Preparing modules for first use.0-1-1Completed-1 2019/08/15 14:30:40 Uploading file to 'c:/Windows/Temp/script-5d55681c-db19-091e-1171-387f8375a66b.ps1'
Build 'googlecompute' errored: unexpected EOF
==> Some builds didn't complete successfully and had errors:
--> googlecompute: unexpected EOF
==> Builds finished but no artifacts were created.
2019/08/15 14:30:59 packer: panic: runtime error: invalid memory address or nil pointer dereference
2019/08/15 14:30:59 packer: [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x6aafd6]
2019/08/15 14:30:59 packer:
2019/08/15 14:30:59 packer: goroutine 1778 [running]:
2019/08/15 14:30:59 packer: net/http.redirectBehavior(0x36414d2, 0x4, 0x0, 0xc0006e8b00, 0x0, 0x0, 0x0)
2019/08/15 14:30:59 packer: /usr/local/Cellar/go/1.12.5/libexec/src/net/http/client.go:422 +0x26
2019/08/15 14:30:59 packer: net/http.(*Client).do(0xc000897e60, 0xc0006e8b00, 0x0, 0x0, 0x0)
2019/08/15 14:30:59 packer: /usr/local/Cellar/go/1.12.5/libexec/src/net/http/client.go:655 +0x2f1
2019/08/15 14:30:59 packer: net/http.(*Client).Do(...)
2019/08/15 14:30:59 packer: /usr/local/Cellar/go/1.12.5/libexec/src/net/http/client.go:509
2019/08/15 14:30:59 packer: github.com/hashicorp/packer/vendor/github.com/masterzen/winrm.clientRequest.Post(0x3b83180, 0xc0007ed2f0, 0xc000602a80, 0xc000601ae0, 0x0, 0x0, 0x0, 0x0)
2019/08/15 14:30:59 packer: /Users/azr/go/src/github.com/hashicorp/packer/vendor/github.com/masterzen/winrm/http.go:82 +0x3e8
2019/08/15 14:30:59 packer: github.com/hashicorp/packer/vendor/github.com/masterzen/winrm.ClientNTLM.Post(...)
2019/08/15 14:30:59 packer: /Users/azr/go/src/github.com/hashicorp/packer/vendor/github.com/masterzen/winrm/ntlm.go:22
2019/08/15 14:30:59 packer: github.com/hashicorp/packer/vendor/github.com/masterzen/winrm.(*Client).sendRequest(...)
2019/08/15 14:30:59 packer: /Users/azr/go/src/github.com/hashicorp/packer/vendor/github.com/masterzen/winrm/client.go:102
2019/08/15 14:30:59 packer: github.com/hashicorp/packer/vendor/github.com/masterzen/winrm.(*Client).CreateShell(0xc000602a80, 0x0, 0x0, 0x0)
2019/08/15 14:30:59 packer: /Users/azr/go/src/github.com/hashicorp/packer/vendor/github.com/masterzen/winrm/client.go:81 +0xa8
2019/08/15 14:30:59 packer: github.com/hashicorp/packer/vendor/github.com/packer-community/winrmcp/winrmcp.uploadChunks(0xc000602a80, 0xc0004fe340, 0x37, 0xf, 0x3b83d80, 0xc000810780, 0x0, 0x0, 0x0)
2019/08/15 14:30:59 packer: /Users/azr/go/src/github.com/hashicorp/packer/vendor/github.com/packer-community/winrmcp/winrmcp/cp.go:66 +0x53
2019/08/15 14:30:59 packer: github.com/hashicorp/packer/vendor/github.com/packer-community/winrmcp/winrmcp.uploadContent(0xc000602a80, 0xf, 0xc0004fe340, 0x37, 0x3b83d80, 0xc000810780, 0x37, 0xc0000d6fcb)
2019/08/15 14:30:59 packer: /Users/azr/go/src/github.com/hashicorp/packer/vendor/github.com/packer-community/winrmcp/winrmcp/cp.go:56 +0x6e
2019/08/15 14:30:59 packer: github.com/hashicorp/packer/vendor/github.com/packer-community/winrmcp/winrmcp.doCopy(0xc000602a80, 0xc000204000, 0x3b83d80, 0xc000810780, 0xc0004fe240, 0x3f, 0x0, 0x53)
2019/08/15 14:30:59 packer: /Users/azr/go/src/github.com/hashicorp/packer/vendor/github.com/packer-community/winrmcp/winrmcp/cp.go:26 +0x241
2019/08/15 14:30:59 packer: github.com/hashicorp/packer/vendor/github.com/packer-community/winrmcp/winrmcp.(*Winrmcp).Write(0xc0007ed300, 0xc0000d6fc0, 0x3f, 0x3b83d80, 0xc000810780, 0xc000810780, 0x0)
2019/08/15 14:30:59 packer: /Users/azr/go/src/github.com/hashicorp/packer/vendor/github.com/packer-community/winrmcp/winrmcp/winrmcp.go:89 +0x7b
2019/08/15 14:30:59 packer: github.com/hashicorp/packer/communicator/winrm.(*Communicator).Upload(0xc0004e22e0, 0xc0000d6fc0, 0x3f, 0x3b83d80, 0xc000810780, 0x0, 0x2b6e940, 0x1)
2019/08/15 14:30:59 packer: /Users/azr/go/src/github.com/hashicorp/packer/communicator/winrm/communicator.go:136 +0x216
2019/08/15 14:30:59 packer: github.com/hashicorp/packer/packer/rpc.(*CommunicatorServer).Upload(0xc0004e3fa0, 0xc0006218e0, 0xc0008abcb0, 0x0, 0x0)
2019/08/15 14:30:59 packer: /Users/azr/go/src/github.com/hashicorp/packer/packer/rpc/communicator.go:297 +0x148
2019/08/15 14:30:59 packer: reflect.Value.call(0xc000202660, 0xc00055c378, 0x13, 0x3641306, 0x4, 0xc0000e0f18, 0x3, 0x3, 0xc00080c2c0, 0x5, ...)
2019/08/15 14:30:59 packer: /usr/local/Cellar/go/1.12.5/libexec/src/reflect/value.go:447 +0x461
2019/08/15 14:30:59 packer: reflect.Value.Call(0xc000202660, 0xc00055c378, 0x13, 0xc000019f18, 0x3, 0x3, 0xc0004a6578, 0xc0000c8000, 0xc000019f30)
2019/08/15 14:30:59 packer: /usr/local/Cellar/go/1.12.5/libexec/src/reflect/value.go:308 +0xa4
2019/08/15 14:30:59 packer: net/rpc.(*service).call(0xc0002f17c0, 0xc0003b8370, 0xc0001d0d30, 0xc0001d0d40, 0xc00013e580, 0xc0001d6bc0, 0x2af59c0, 0xc0006218e0, 0x16, 0x2b6e940, ...)
2019/08/15 14:30:59 packer: /usr/local/Cellar/go/1.12.5/libexec/src/net/rpc/server.go:384 +0x14e
2019/08/15 14:30:59 packer: created by net/rpc.(*Server).ServeCodec
2019/08/15 14:30:59 packer: /usr/local/Cellar/go/1.12.5/libexec/src/net/rpc/server.go:481 +0x42b
2019/08/15 14:30:59 /bin/packer: plugin process exited
2019/08/15 14:30:59 [INFO] (telemetry) ending googlecompute
2019/08/15 14:30:59 ui error: Build 'googlecompute' errored: unexpected EOF
2019/08/15 14:30:59 machine readable: error-count []string{"1"}
2019/08/15 14:30:59 ui error:
==> Some builds didn't complete successfully and had errors:
2019/08/15 14:30:59 machine readable: googlecompute,error []string{"unexpected EOF"}
2019/08/15 14:30:59 ui error: --> googlecompute: unexpected EOF
==> Builds finished but no artifacts were created.
2019/08/15 14:30:59 [INFO] (telemetry) Finalizing.
2019/08/15 14:30:59 packer: 2019/08/15 14:30:59 Retryable error: Error uploading script: unexpected EOF
2019/08/15 14:31:01 [WARN] (telemetry) Error finalizing report. This is safe to ignore. Post https://checkpoint-api.hashicorp.com/v1/telemetry/packer: context deadline exceeded
2019/08/15 14:31:01 waiting for all plugin processes to complete...
2019/08/15 14:31:01 [INFO] (telemetry) ending powershell
2019/08/15 14:31:01 /bin/packer: plugin process exited
2019/08/15 14:31:01 /bin/packer: plugin process exited
2019/08/15 14:31:01 /bin/packer: plugin process exited
2019/08/15 14:31:01 /bin/packer: plugin process exited
ERROR: Job failed: command terminated with exit code 1
- The simplest example template and scripts needed to reproduce the bug: <gist_url_pending>