Packer: Packer 1.4.3 crash when building windows instances

Created on 8 Sep 2019  ยท  10Comments  ยท  Source: hashicorp/packer

When building windows images with packer v1.4.3, we are encountering an error at the Creating windows user for instance... stage.

  • Packer version: v1.4.3 : Has been tested with v1.4.2 and v1.4.1 and the error did not occur.
    The packer instance that we are using also works fine when building other OS images (tested with rhel/CentOS).
  • Crash.log gist
  • The main issue appears to be as follows:

```==> Builds finished but no artifacts were created.
panic: runtime error: invalid memory address or nil pointer dereference
2019/09/03 15:05:33 packer: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1cc79f7]
2019/09/03 15:05:33 packer:
2019/09/03 15:05:33 packer: goroutine 211 [running]:
2019/09/03 15:05:33 packer: github.com/hashicorp/packer/builder/googlecompute.(StepCreateWindowsPassword).Run(0xc0002ce1e0, 0x3fadba0, 0xc000372f40, 0x3f936a0, 0xc00079c480, 0x0)
2019/09/03 15:05:33 packer: /Users/mmarsh/Projects/packer/builder/googlecompute/step_create_windows_password.go:63 +0x657
2019/09/03 15:05:33 packer: github.com/hashicorp/packer/helper/multistep.(
BasicRunner).Run(0xc00079c510, 0x3fadba0, 0xc000372f40, 0x3f936a0, 0xc00079c480)
2019/09/03 15:05:33 packer: /Users/mmarsh/Projects/packer/helper/multistep/basic_runner.go:67 +0x1ec
2019/09/03 15:05:33 packer: github.com/hashicorp/packer/builder/googlecompute.(Builder).Run(0xc00038e0a0, 0x3fadba0, 0xc000372f40, 0x3fc97a0, 0xc0002ce0a0, 0x3f46f40, 0xc00063e020, 0x40b9b9, 0xc000479890, 0x30, ...)
2019/09/03 15:05:33 packer: /Users/mmarsh/Projects/packer/builder/googlecompute/builder.go:86 +0x95a
2019/09/03 15:05:33 packer: github.com/hashicorp/packer/packer/rpc.(
BuilderServer).Run(0xc0001de2d0, 0x1, 0xc0007749b0, 0x0, 0x0)
2019/09/03 15:05:33 packer: /Users/mmarsh/Projects/packer/packer/rpc/builder.go:109 +0x231
2019/09/03 15:05:33 packer: reflect.Value.call(0xc0003ad380, 0xc0003c43e8, 0x13, 0x3998dd5, 0x4, 0xc0000d5f18, 0x3, 0x3, 0xc000388000, 0x0, ...)
2019/09/03 15:05:33 packer: /usr/local/go/src/reflect/value.go:447 +0x461
2019/09/03 15:05:33 packer: reflect.Value.Call(0xc0003ad380, 0xc0003c43e8, 0x13, 0xc00024a718, 0x3, 0x3, 0x0, 0xc00082cf60, 0x20)
2019/09/03 15:05:33 packer: /usr/local/go/src/reflect/value.go:308 +0xa4
2019/09/03 15:05:33 packer: net/rpc.(service).call(0xc0003b3180, 0xc0000ca370, 0xc000492010, 0xc000492020, 0xc0003bc580, 0xc00079a0e0, 0x2ecd180, 0xc0007749ac, 0x18a, 0x2e1fce0, ...)
2019/09/03 15:05:33 packer: /usr/local/go/src/net/rpc/server.go:384 +0x14e
2019/09/03 15:05:33 packer: created by net/rpc.(
Server).ServeCodec
2019/09/03 15:05:33 packer: /usr/local/go/src/net/rpc/server.go:481 +0x42b
2019/09/03 15:05:33 [INFO] (telemetry) ending googlecompute
2019/09/03 15:05:33 ui error: 2019-09-03T15:05:33Z: Build 'googlecompute' errored: unexpected EOF
2019/09/03 15:05:33 machine readable: error-count []string{"1"}
2019/09/03 15:05:33 ui error:
==> Some builds didn't complete successfully and had errors:
2019/09/03 15:05:33 machine readable: googlecompute,error []string{"unexpected EOF"}
2019/09/03 15:05:33 ui error: --> googlecompute: unexpected EOF
2019/09/03 15:05:33 ui:
==> Builds finished but no artifacts were created.
2019/09/03 15:05:33 /bin/packer: plugin process exited
2019/09/03 15:05:33 [INFO] (telemetry) Finalizing.
2019/09/03 15:05:33 waiting for all plugin processes to complete...
2019/09/03 15:05:33 /bin/packer: plugin process exited
2019/09/03 15:05:33 /bin/packer: plugin process exited
2019/09/03 15:05:33 /bin/packer: plugin process exited
2019/09/03 15:05:33 /bin/packer: plugin process exited
2019/09/03 15:05:33 /bin/packer: plugin process exited
2019/09/03 15:05:33 /bin/packer: plugin process exited
2019/09/03 15:05:33 /bin/packer: plugin process exited
2019/09/03 15:05:33 /bin/packer: plugin process exited
2019/09/03 15:05:33 /bin/packer: plugin process exited
2019/09/03 15:05:33 /bin/packer: plugin process exited
2019/09/03 15:05:33 /bin/packer: plugin process exited

!!!!!!!!!!!!!!!!!!!!!!!!!!! PACKER CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Packer crashed! This is always indicative of a bug within Packer.
A crash log has been placed at "crash.log" relative to your current
working directory. It would be immensely helpful if you could please
report the crash with Packer[1] so that we can fix this.

!!!!!!!!!!!!!!!!!!!!!!!!!!! PACKER CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
```

Any assistance would be appreciated, and please let me know if there is any further details that would help.

Thanks.

buildegoogle crash

All 10 comments

Can you please share the simplest possible packer template that reproduces the issue?

Hi,

I have added the packer template to the gist.

Thanks.

This was likely introduced by https://github.com/hashicorp/packer/pull/7835

Can you test the build here? https://circleci.com/gh/hashicorp/packer/12207#artifacts/containers/0

I think this should solve the problem.

This fixed the issue - thank you very much!

Oopsie, raised a duplicate issue #8173

Hello! Could you please let me know approximate time when new packer version will be released with fix of this issue?

Hello there, 1.4.4 was recently released and contains the fix ! https://packer.io/downloads.html

Hello there, 1.4.4 was recently released and contains the fix ! https://packer.io/downloads.html

Great! Thanks!

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brettswift picture brettswift  ยท  3Comments

mvermaes picture mvermaes  ยท  3Comments

wduncanfraser picture wduncanfraser  ยท  3Comments

shashanksinha89 picture shashanksinha89  ยท  3Comments

mwhooker picture mwhooker  ยท  3Comments