packer-community / packer-windows-plugins

A suite of Packer plugins for provisioning Windows machines
112 stars 20 forks source link

Packer Crash: panic: runtime error: invalid memory address or nil pointer dereference #41

Closed qmfrederik closed 9 years ago

qmfrederik commented 9 years ago

Hi,

I've just encountered a packer crash. I've uploaded the crash log file at https://gist.github.com/qmfrederik/47d62e631a15df5f0ca9

Hope it helps,

Frederik.

mefellows commented 9 years ago

Thanks @qmfrederik, we'll take a look. I couldn't see from the logs - what Windows Guest OS + version was that?

It seems to be an issue during the upload, out of interest did you try multiple times and did you always get the same result?

qmfrederik commented 9 years ago

Hi @mefellows ,

That was Windows 7 (sp1), x86 as the guest os, host was Server 2008 R2 x64.

The issue occurred only once and I've not been able to reproduce it so far, yet the error message kindly asked to report an issue so here you are ;-)

Frederik.

mefellows commented 9 years ago

You did the right thing sir - much appreciated! This looks to be related to issue #25 but we'll leave this open for now until we verify it.

fivetanley commented 9 years ago

Here's my crash.log, using windows server 2012 R2 as the host on Amazon AWS EC2. https://gist.github.com/fivetanley/bd6da439e720858fa7f4

mefellows commented 9 years ago

Thanks @fivetanley , so does that mean then that you resolved your WinRM timeout issues from #11? Looking at the output logs, the Communicator failed early so the command that copies stdout/stderr (go io.Copy(...) ). Are you able to please share the contents of the script you are running, or if sensitive we can discuss offline (Slack/Twitter)?

fivetanley commented 9 years ago

Hey @mefellows, I was able to run the scripts using "powershell" as the provisioner instead of "shell", should have read the instructions more carefully.

mefellows commented 9 years ago

OK, yes that could explain a few things. Is your script running nicely now or are you still getting the panic?

fivetanley commented 9 years ago

Things are running nicely now. For some reason chocolatey hangs on installing virtualbox but that is unrelated to this project. Thanks for taking the time to respond!

timsutton commented 9 years ago

This happened to me once recently, when I'd taken an old template from earlier experiments with this project, and it had still used 'shell' - I hadn't yet updated it since the provisioner had been renamed to 'windows-shell'.

mefellows commented 9 years ago

Excellent to hear! Sorry Tim, we figured it would be best not to hijack the upstream shell provisioner ;)

I'm going to close this one off for now, I believe the original issue is related to #25 which we are tracking independently.

Thanks for your help gents.