GoogleCloudPlatform/compute-image-tools

Import error

KhorZL opened this issue · 5 comments

Hi

I'm trying to import an OVA file but get the following error from logs:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x12b5746]

goroutine 1 [running]:
github.com/GoogleCloudPlatform/compute-image-tools/cli_tools/gce_ovf_import/ovf_utils.GetOSId(0xc000130930, 0xc000166aa0, 0xc000392140, 0x41, 0xc000130930)
	/workspace/cli_tools/gce_ovf_import/ovf_utils/ovf_utils.go:261 +0xe6
github.com/GoogleCloudPlatform/compute-image-tools/cli_tools/gce_ovf_import/ovf_importer.(*OVFImporter).setUpImportWorkflow(0xc0001d6000, 0x193ffbe, 0x1d, 0x5)
	/workspace/cli_tools/gce_ovf_import/ovf_importer/ovf_importer.go:431 +0x395
github.com/GoogleCloudPlatform/compute-image-tools/cli_tools/gce_ovf_import/ovf_importer.(*OVFImporter).Import(0xc0001d6000, 0xc0001d6000, 0x0, 0x0)
	/workspace/cli_tools/gce_ovf_import/ovf_importer/ovf_importer.go:474 +0x6f
main.runImport(0x0, 0x0, 0x0, 0x0)
	/workspace/cli_tools/gce_ovf_import/main.go:114 +0x8b
github.com/GoogleCloudPlatform/compute-image-tools/cli_tools/common/utils/logging/service.(*Logger).runWithServerLogging(0xc0000e6fc0, 0x197b5c0, 0xc000549250, 0x0, 0xc000118900, 0x0)
	/workspace/cli_tools/common/utils/logging/service/logger.go:207 +0xa3
github.com/GoogleCloudPlatform/compute-image-tools/cli_tools/common/utils/logging/service.RunWithServerLogging(0x191ea0b, 0xe, 0x0, 0x0, 0xc000118900, 0x0, 0xc000549250, 0x197b5c0, 0x1, 0xc000076058)
	/workspace/cli_tools/common/utils/logging/service/logger.go:244 +0x86
main.main()
	/workspace/cli_tools/gce_ovf_import/main.go:133 +0xe4
ERROR
ERROR: build step 0 "gcr.io/compute-image-tools/gce_ovf_import:release" failed: step exited with non-zero status: 2

The VM specifications are as follows:

Virtualization: oracle
Operating System: Debian GNU/Linux 9 (stretch)
Kernel: Linux 4.9.0-8-amd64
Architecture: x86-64

I was hoping to understand what is causing the seg-fault.

Thanks in advance!

Hi,
Can you please attach the OVF descriptor file (*.ovf) to this issue, if it doesn't contain any proprietary information?

In the mean time, you can try specifying OS using the --os flag. E.g. --os=debian-9. This will avoid using the code where the bug occurred.

Hi @zoran15

Thanks for the quick response! It seems that specifying the OS did solve the issue. Thank you so much for your help!

Cheers!

That's good to hear.

Since the original error surfaced up when our code tried to interpret the OVF descriptor, could you please paste the OperatingSystem section from the descriptor so we can reproduce it and fix it? Thanks.

Of course.

    <OperatingSystemSection ovf:id="96">
      <Info>The kind of installed guest operating system</Info>
      <Description>Debian_64</Description>
      <vbox:OSType ovf:required="false">Debian_64</vbox:OSType>
    </OperatingSystemSection>

Hope this helps.

Of course.

    <OperatingSystemSection ovf:id="96">
      <Info>The kind of installed guest operating system</Info>
      <Description>Debian_64</Description>
      <vbox:OSType ovf:required="false">Debian_64</vbox:OSType>
    </OperatingSystemSection>

Hope this helps.

I assume Oracle VM VirtualBox was used to export this OVF?