-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
critical failure in 1.9.3: panic: runtime error: invalid memory address or nil pointer dereference #12591
Comments
There is no crash.log to found on the server. |
working around for now by pinning to 1.9.2, but would prefer not to have to pin. |
Thanks for reporting @okamilobo this looks like a crash related to the recent bundle plugins telemetry check. The provide information is helpful and I suspect others will have similar issues. Are you using a Packer JSON template? Looking at the provided error I suspect that the Azure DevOps pipeline may be running with the CHECKPOINT_DISABLE env variable set. I have to setup a test DevOps pipeline on Azure to test this. But locally I am able to reproduce this error by removing any externally installed versions of the Azure plugin, causing Packer to use the bundled version of Azure, and disabling checkpoint. The use of bundled plugins is surprising as I would expect Azure DevOps to use an external Azure plugin seeing as the one bundled with Packer is out of date. We will get this fixed as soon as possible. Again, I am not yet familiar with the Azure Packer task but it does look like the task allows you to run a repro steps ~> rm -rf ~/.packer.d/plugins/github.com
~> CHECKPOINT_DISABLE=1 packer validate ../packer-templates/azure-arm/azure-arm_custom_key_vault.json
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x50 pc=0x104ea5944]
goroutine 1 [running]:
github.com/hashicorp/packer/packer.(*CheckpointTelemetry).SetBundledUsage(...)
/Users/dev/Development/packer-local-dev/packer/telemetry.go:135
github.com/hashicorp/packer/command.(*Meta).DetectBundledPlugins(0x106179e38?, {0x10617cc50?, 0x1400049eb00?})
/Users/dev/Development/packer-local-dev/command/meta.go:199 +0xf4
github.com/hashicorp/packer/command.(*ValidateCommand).RunContext(0x14000950150, {0x1400011a1a0?, 0x1?}, 0x1400049e780)
/Users/dev/Development/packer-local-dev/command/validate.go:77 +0xd8
github.com/hashicorp/packer/command.(*ValidateCommand).Run(0x14000950150, {0x1400011a1a0, 0x1, 0x1})
/Users/dev/Development/packer-local-dev/command/validate.go:28 +0xac
github.com/mitchellh/cli.(*CLI).Run(0x140003e4280)
/Users/dev/Development/go/pkg/mod/github.com/mitchellh/cli@v1.1.2/cli.go:262 +0x4a8
main.wrappedMain()
/Users/dev/Development/packer-local-dev/main.go:265 +0xb40
main.realMain()
/Users/dev/Development/packer-local-dev/main.go:52 +0xb8
main.main()
/Users/dev/Development/packer-local-dev/main.go:38 +0x1c
!!!!!!!!!!!!!!!!!!!!!!!!!!! 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.
[1]: https://github.com/hashicorp/packer/issues
!!!!!!!!!!!!!!!!!!!!!!!!!!! PACKER CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!! Checkpoint enabled does not trigger this panic
|
The fix for this has been merged in #12592 we will get a release out soon. I’ll keep this issue open for now incase another folks run into this issue. |
I'm using hcl files, not json for configuration. I gave Init a chance and it did not help the validate step. |
Thanks for trying out init. We have a fix that will be released today. Could you share a template for reproduction. Is there a way to check if the env. variable CHECKPOINT_DISABLE is being set? As we looked into the issue further we found that even if you are using external plugins and at least one bundled plugin you will hit this error if CHECKPOINT_DISABLE is set. |
This issue has been resolved in Packer 1.9.4. |
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. |
Community Note
When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.
Overview of the Issue
The Azure Devops Packer Tool Installer just started pulling in 1.9.3 version a few minutes ago.
Error message:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0x262681a]
goroutine 1 [running]:
github.com/hashicorp/packer/packer.(*CheckpointTelemetry).SetBundledUsage(...)
github.com/hashicorp/packer/packer/telemetry.go:135
github.com/hashicorp/packer/command.(*Meta).DetectBundledPlugins(0xc0003e2140?, {0x38d9320?, 0xc0003e2140?})
github.com/hashicorp/packer/command/meta.go:199 +0x11a
github.com/hashicorp/packer/command.(*ValidateCommand).RunContext(0xc0006ee900, {0xc000112360?, 0xb?}, 0xc0005fa000)
github.com/hashicorp/packer/command/validate.go:77 +0x109
github.com/hashicorp/packer/command.(*ValidateCommand).Run(0xc0006ee900, {0xc000112360, 0xb, 0xb})
github.com/hashicorp/packer/command/validate.go:28 +0xc5
github.com/mitchellh/cli.(*CLI).Run(0xc00038bcc0)
github.com/mitchellh/cli@v1.1.2/cli.go:262 +0x5f8
main.wrappedMain()
github.com/hashicorp/packer/main.go:265 +0xcc5
main.realMain()
github.com/hashicorp/packer/main.go:52 +0xf5
main.main()
github.com/hashicorp/packer/main.go:38 +0x19
Reproduction Steps
Task : Packer
Description : Build Automated Machine Images
Version : 1.185.2019
Author : Manuel Riezebosch
Help : More information
Packer version
From
packer version
##[debug]isExplicit: 1.9.3
Simplified Packer Template
If the file is longer than a few dozen lines, please include the URL to the
gist of the log or use the Github detailed
format
instead of posting it directly in the issue.
Operating system and Environment details
AWS - AMI latest version of: ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server
OS, Architecture, and any other information you can provide about the
environment.
Log Fragments and crash.log files
Will attach when I find it.
Include appropriate log fragments. If the log is longer than a few dozen lines,
please include the URL to the gist of the log or
use the Github detailed format instead of posting it directly in the issue.
Set the env var
PACKER_LOG=1
for maximum log detail.The text was updated successfully, but these errors were encountered: