Your message dated Mon, 13 Mar 2023 10:50:20 +0000
with message-id <[email protected]>
and subject line Bug#1032525: fixed in packer 1.6.6+ds2-1
has caused the Debian Bug report #1032525,
regarding packer: crashes on a very simple template
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1032525: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1032525
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: packer
Version: 1.6.6+ds1-7
Severity: grave

Hello.

I'm using packer and ansible to create images for GCP.

After upgrading to Debian bookworm, packer crashes on
the most simple template:

$ packer build sample.pkr.hcl
panic: ConfigSpec failed: gob: type cty.Type has no exported fields [recovered]
        panic: ConfigSpec failed: gob: type cty.Type has no exported fields

goroutine 1 [running]:
log.Panic({0xc00083e8e8?, 0x0?, 0x0?})
        log/log.go:388 +0x65
github.com/hashicorp/packer/packer/plugin.(*cmdBuilder).checkExit(0xc0005e0490?,
 {0x314b860, 0xc0005e04c0}, 0x0)
        github.com/hashicorp/packer/packer/plugin/builder.go:47 +0x7f
github.com/hashicorp/packer/packer/plugin.(*cmdBuilder).ConfigSpec.func1()
        github.com/hashicorp/packer/packer/plugin/builder.go:19 +0x39
panic({0x314b860, 0xc0005e04c0})
        runtime/panic.go:884 +0x212
github.com/hashicorp/packer/packer-plugin-sdk/rpc.(*commonClient).ConfigSpec(0xc00068e9e0)
        github.com/hashicorp/packer/packer-plugin-sdk/rpc/common.go:44 +0x297
github.com/hashicorp/packer/packer/plugin.(*cmdBuilder).ConfigSpec(0xc00047f0d0?)
        github.com/hashicorp/packer/packer/plugin/builder.go:22 +0x65
github.com/hashicorp/packer/hcl2template.decodeHCL2Spec({0x4447708, 
0xc000483650}, 0xd?, {0x7fc2746a1680?, 0xc0004728a0?})
        github.com/hashicorp/packer/hcl2template/decode.go:17 +0x39
github.com/hashicorp/packer/hcl2template.(*PackerConfig).startBuilder(0x3379060?,
 {{0xc000792540, 0xd}, {0xc000792570, 0xa}, 0xc0004cd1e0, {0x0, 0x0}, {0x0, 
0x0}}, ...)
        github.com/hashicorp/packer/hcl2template/types.source.go:110 +0x16a
github.com/hashicorp/packer/hcl2template.(*PackerConfig).GetBuilds(0xc00077f320,
 {{0x0, 0x0, 0x0}, {0x0, 0x0, 0x0}, 0x0, 0x0, {0x0, ...}})
        github.com/hashicorp/packer/hcl2template/types.packer_config.go:396 
+0xb48
github.com/hashicorp/packer/command.(*BuildCommand).RunContext(0xc000053920, 
{0x4447120?, 0xc0000aa540}, 0xc000782120)
        github.com/hashicorp/packer/command/build.go:156 +0x1b5
github.com/hashicorp/packer/command.(*BuildCommand).Run(0xc000053920, 
{0xc000112170, 0x1, 0x1})
        github.com/hashicorp/packer/command/build.go:40 +0xc5
github.com/mitchellh/cli.(*CLI).Run(0xc000748640)
        github.com/mitchellh/cli/cli.go:261 +0x5f8
main.wrappedMain()
        github.com/hashicorp/packer/main.go:249 +0xb11
main.realMain()
        github.com/hashicorp/packer/main.go:50 +0xf5
main.main()
        github.com/hashicorp/packer/main.go:36 +0x19



!!!!!!!!!!!!!!!!!!!!!!!!!!! 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 !!!!!!!!!!!!!!!!!!!!!!!!!!!!

This is the template I'm using:

-----------------------------------------------------------------
locals { timestamp = regex_replace(timestamp(), "[- TZ:]", "") }

source "googlecompute" "buildd-gce" {
  account_file        = "my-account-file.json"
  image_family        = "debian-12-buildd"
  image_name          = "debian-12-buildd-amd64-${local.timestamp}"
  machine_type        = "n1-standard-1"
  disk_size           = 10
  project_id          = "my-project-id"
  source_image_family = "debian-11"
  ssh_username        = "packer"
  tags                = ["ssh"]
  zone                = "us-central1-f"
}

build {
  sources = ["source.googlecompute.buildd-gce"]

  provisioner "ansible" {
    extra_arguments = ["--become"]
    groups          = ["buildd"]
    playbook_file   = "playbooks/buildd-gce.yml"
  }

}
-----------------------------------------------------------------

I'm also attaching the crash.log file.


For completeness: Version 1.8.6 from github does not crash, but it has
two subtle incompatibilities with openssh-client in bookworm:

https://github.com/hashicorp/packer-plugin-ansible/issues/140
https://github.com/hashicorp/packer/issues/11783

I was going to report those issues here for documentation purposes,
as both of them have workarounds. but then I found the Debian
version seems not to work at all.

Thanks.
2023/03/08 18:30:02 [INFO] Packer version: 1.6.6 [go1.19.6 linux amd64]
2023/03/08 18:30:02 Checking 'PACKER_CONFIG' for a config file path
2023/03/08 18:30:02 'PACKER_CONFIG' not set; checking the default config file path
2023/03/08 18:30:02 Attempting to open config file: /home/bluser/.packerconfig
2023/03/08 18:30:02 [WARN] Config file doesn't exist: /home/bluser/.packerconfig
2023/03/08 18:30:02 Setting cache directory: /home/bluser/packer_cache
2023/03/08 18:30:02 [TRACE] validateValue: not active for timestamp, so skipping
2023/03/08 18:30:02 [TRACE] validateValue: not active for timestamp, so skipping
2023/03/08 18:30:02 [TRACE] validateValue: not active for timestamp, so skipping
2023/03/08 18:30:02 Creating plugin client for path: /usr/bin/packer
2023/03/08 18:30:02 Starting plugin: /usr/bin/packer []string{"/usr/bin/packer", "plugin", "packer-builder-googlecompute"}
2023/03/08 18:30:02 Waiting for RPC address for: /usr/bin/packer
2023/03/08 18:30:02 packer-builder-googlecompute plugin: [INFO] Packer version: 1.6.6 [go1.19.6 linux amd64]
2023/03/08 18:30:02 packer-builder-googlecompute plugin: Checking 'PACKER_CONFIG' for a config file path
2023/03/08 18:30:02 packer-builder-googlecompute plugin: 'PACKER_CONFIG' not set; checking the default config file path
2023/03/08 18:30:02 packer-builder-googlecompute plugin: Attempting to open config file: /home/bluser/.packerconfig
2023/03/08 18:30:02 packer-builder-googlecompute plugin: [WARN] Config file doesn't exist: /home/bluser/.packerconfig
2023/03/08 18:30:02 packer-builder-googlecompute plugin: Setting cache directory: /home/bluser/packer_cache
2023/03/08 18:30:02 packer-builder-googlecompute plugin: args: []string{"packer-builder-googlecompute"}
2023/03/08 18:30:02 packer-builder-googlecompute plugin: Plugin address: unix /tmp/packer-plugin1605207489
2023/03/08 18:30:02 packer-builder-googlecompute plugin: Waiting for connection...
2023/03/08 18:30:02 Received unix RPC address for /usr/bin/packer: addr is /tmp/packer-plugin1605207489
2023/03/08 18:30:02 packer-builder-googlecompute plugin: Serving a plugin connection...
2023/03/08 18:30:02 ConfigSpec failed: gob: type cty.Type has no exported fields
2023/03/08 18:30:02 waiting for all plugin processes to complete...
2023/03/08 18:30:02 /usr/bin/packer: plugin process exited
panic: ConfigSpec failed: gob: type cty.Type has no exported fields [recovered]
	panic: ConfigSpec failed: gob: type cty.Type has no exported fields

goroutine 1 [running]:
log.Panic({0xc00083e8e8?, 0x0?, 0x0?})
	log/log.go:388 +0x65
github.com/hashicorp/packer/packer/plugin.(*cmdBuilder).checkExit(0xc0005e0490?, {0x314b860, 0xc0005e04c0}, 0x0)
	github.com/hashicorp/packer/packer/plugin/builder.go:47 +0x7f
github.com/hashicorp/packer/packer/plugin.(*cmdBuilder).ConfigSpec.func1()
	github.com/hashicorp/packer/packer/plugin/builder.go:19 +0x39
panic({0x314b860, 0xc0005e04c0})
	runtime/panic.go:884 +0x212
github.com/hashicorp/packer/packer-plugin-sdk/rpc.(*commonClient).ConfigSpec(0xc00068e9e0)
	github.com/hashicorp/packer/packer-plugin-sdk/rpc/common.go:44 +0x297
github.com/hashicorp/packer/packer/plugin.(*cmdBuilder).ConfigSpec(0xc00047f0d0?)
	github.com/hashicorp/packer/packer/plugin/builder.go:22 +0x65
github.com/hashicorp/packer/hcl2template.decodeHCL2Spec({0x4447708, 0xc000483650}, 0xd?, {0x7fc2746a1680?, 0xc0004728a0?})
	github.com/hashicorp/packer/hcl2template/decode.go:17 +0x39
github.com/hashicorp/packer/hcl2template.(*PackerConfig).startBuilder(0x3379060?, {{0xc000792540, 0xd}, {0xc000792570, 0xa}, 0xc0004cd1e0, {0x0, 0x0}, {0x0, 0x0}}, ...)
	github.com/hashicorp/packer/hcl2template/types.source.go:110 +0x16a
github.com/hashicorp/packer/hcl2template.(*PackerConfig).GetBuilds(0xc00077f320, {{0x0, 0x0, 0x0}, {0x0, 0x0, 0x0}, 0x0, 0x0, {0x0, ...}})
	github.com/hashicorp/packer/hcl2template/types.packer_config.go:396 +0xb48
github.com/hashicorp/packer/command.(*BuildCommand).RunContext(0xc000053920, {0x4447120?, 0xc0000aa540}, 0xc000782120)
	github.com/hashicorp/packer/command/build.go:156 +0x1b5
github.com/hashicorp/packer/command.(*BuildCommand).Run(0xc000053920, {0xc000112170, 0x1, 0x1})
	github.com/hashicorp/packer/command/build.go:40 +0xc5
github.com/mitchellh/cli.(*CLI).Run(0xc000748640)
	github.com/mitchellh/cli/cli.go:261 +0x5f8
main.wrappedMain()
	github.com/hashicorp/packer/main.go:249 +0xb11
main.realMain()
	github.com/hashicorp/packer/main.go:50 +0xf5
main.main()
	github.com/hashicorp/packer/main.go:36 +0x19

--- End Message ---
--- Begin Message ---
Source: packer
Source-Version: 1.6.6+ds2-1
Done: Shengjing Zhu <[email protected]>

We believe that the bug you reported is fixed in the latest version of
packer, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Shengjing Zhu <[email protected]> (supplier of updated packer package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Mon, 13 Mar 2023 18:34:54 +0800
Source: packer
Architecture: source
Version: 1.6.6+ds2-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Go Packaging Team <[email protected]>
Changed-By: Shengjing Zhu <[email protected]>
Closes: 1032525
Changes:
 packer (1.6.6+ds2-1) unstable; urgency=medium
 .
   * Vendor github.com/zclconf/go-cty
     v1.11+ drops encoding/gob support. (Closes: #1032525)
Checksums-Sha1:
 b971159d22f36634c26db65a6fc88a7e8c28a751 4680 packer_1.6.6+ds2-1.dsc
 994614a8e734e2bdaec0a9a77457e70f26455a15 3746058 packer_1.6.6+ds2.orig.tar.gz
 5b5637f4459dc9d34162770246bb0df4e3bcb40a 16488 packer_1.6.6+ds2-1.debian.tar.xz
 8e5b5974472c51c4abeba651d52de1dec010b76c 14431 
packer_1.6.6+ds2-1_amd64.buildinfo
Checksums-Sha256:
 91c9269acc55f419485e6e1918dde05067c63c1f77c6a7c3d73d9f9b6e586e49 4680 
packer_1.6.6+ds2-1.dsc
 7d86a5e95ef7f9464137288ded4f9efdb99dea100d66c64072c1b44a9fe17274 3746058 
packer_1.6.6+ds2.orig.tar.gz
 15b31d885fa77ebeb7e72b8481ef59c35120f75c11d75a8c4f938183dd3379bc 16488 
packer_1.6.6+ds2-1.debian.tar.xz
 9d385162c4c00a0b178ef6f66911e64cf55fd90df31a428b1922487721a05cb5 14431 
packer_1.6.6+ds2-1_amd64.buildinfo
Files:
 44d0096a26b536c6865b0f383bc4fea6 4680 utils optional packer_1.6.6+ds2-1.dsc
 1e156c83b7788facac88f208fd1c5acf 3746058 utils optional 
packer_1.6.6+ds2.orig.tar.gz
 ff29e0dd8ddaa9cfcbe21a34805cbc23 16488 utils optional 
packer_1.6.6+ds2-1.debian.tar.xz
 a6247503e1e8706b599e4e7d70280f21 14431 utils optional 
packer_1.6.6+ds2-1_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iHUEARYIAB0WIQSRhdT1d2eu7mxV1B5/RPol6lUUywUCZA7+PAAKCRB/RPol6lUU
y9e6APwKQxv1T0kJvKbQkT8Dns1sJLbiadUBE1xbggNEcoJfrgEAseVip2hrtFoD
nYnaCCqhWKmpfVaQY6KGq3D4vf2B7Qk=
=GVDy
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to