compute/metadata: retryer tries to get the status code from the resource that does not exist #4713
Labels
api: compute
Issues related to the Compute Engine API.
priority: p1
Important issue which blocks shipping the next release. Will be fixed prior to next release.
status: investigating
The issue is under investigation, which is determined to be non-trivial.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
In/go/pkg/mod/cloud.google.com/go@v0.94.0/compute/metadata/metadata.go on line 318
status code wants to be retrived from "res" but in case of an error res is nil and it panics
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xa5a9b7]
goroutine 1 [running]:
cloud.google.com/go/compute/metadata.(*Client).getETag(0x24eba88, 0xc00011c480, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/go/pkg/mod/cloud.google.com/go@v0.94.0/compute/metadata/metadata.go:318 +0x417
cloud.google.com/go/compute/metadata.(*Client).Get(...)
/go/pkg/mod/cloud.google.com/go@v0.94.0/compute/metadata/metadata.go:349
cloud.google.com/go/compute/metadata.(*Client).InstanceAttributeValue(0x24eba88, 0x172e0b2, 0xc, 0x0, 0x0, 0x203000, 0x60)
/go/pkg/mod/cloud.google.com/go@v0.94.0/compute/metadata/metadata.go:454 +0x79
cloud.google.com/go/compute/metadata.InstanceAttributeValue(...)
/go/pkg/mod/cloud.google.com/go@v0.94.0/compute/metadata/metadata.go:248
cloud.google.com/go/logging.isKubernetesEngine(0x40f800)
/go/pkg/mod/cloud.google.com/go/logging@v1.4.2/resource.go:143 +0x45
cloud.google.com/go/logging.detectResource.func1()
/go/pkg/mod/cloud.google.com/go/logging@v1.4.2/resource.go:222 +0xd1
sync.(*Once).doSlow(0x251a1d8, 0x17af868)
/usr/local/go/src/sync/once.go:68 +0xec
sync.(*Once).Do(...)
/usr/local/go/src/sync/once.go:59
cloud.google.com/go/logging.detectResource(0xc00039fd48)
/go/pkg/mod/cloud.google.com/go/logging@v1.4.2/resource.go:212 +0x59
cloud.google.com/go/logging.(*Client).Logger(0xc000289080, 0x1718138, 0x2, 0x0, 0x0, 0x0, 0x2)
/go/pkg/mod/cloud.google.com/go/logging@v1.4.2/logging.go:347 +0x34
bitbucket.org/endai/gobg/modules/bg/logging.Init(0x1d36e78, 0xc00053c340, 0x171ebda, 0x6)
/opt/atlassian/pipelines/agent/build/modules/bg/logging/logging.go:27 +0x208
main.main()
/opt/atlassian/pipelines/agent/build/bg.go:46 +0x2bd
time="Sep 1 11:23:48.513" level=info msg="BG process [585942] starting at 2021-09-01 15:23:48.505785215 +0000 UTC UTC"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xa5a9b7]
goroutine 1 [running]:
cloud.google.com/go/compute/metadata.(*Client).getETag(0x24eba88, 0xc00056e5a0, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/go/pkg/mod/cloud.google.com/go@v0.94.0/compute/metadata/metadata.go:318 +0x417
cloud.google.com/go/compute/metadata.(*Client).Get(...)
/go/pkg/mod/cloud.google.com/go@v0.94.0/compute/metadata/metadata.go:349
cloud.google.com/go/compute/metadata.(*Client).InstanceAttributeValue(0x24eba88, 0x172e0b2, 0xc, 0x0, 0x0, 0x203000, 0x60)
/go/pkg/mod/cloud.google.com/go@v0.94.0/compute/metadata/metadata.go:454 +0x79
cloud.google.com/go/compute/metadata.InstanceAttributeValue(...)
/go/pkg/mod/cloud.google.com/go@v0.94.0/compute/metadata/metadata.go:248
cloud.google.com/go/logging.isKubernetesEngine(0x40f800)
/go/pkg/mod/cloud.google.com/go/logging@v1.4.2/resource.go:143 +0x45
cloud.google.com/go/logging.detectResource.func1()
/go/pkg/mod/cloud.google.com/go/logging@v1.4.2/resource.go:222 +0xd1
sync.(*Once).doSlow(0x251a1d8, 0x17af868)
/usr/local/go/src/sync/once.go:68 +0xec
sync.(*Once).Do(...)
/usr/local/go/src/sync/once.go:59
cloud.google.com/go/logging.detectResource(0xc0003b7d48)
/go/pkg/mod/cloud.google.com/go/logging@v1.4.2/resource.go:212 +0x59
cloud.google.com/go/logging.(*Client).Logger(0xc0005453e0, 0x1718138, 0x2, 0x0, 0x0, 0x0, 0x2)
/go/pkg/mod/cloud.google.com/go/logging@v1.4.2/logging.go:347 +0x34
bitbucket.org/endai/gobg/modules/bg/logging.Init(0x1d36e78, 0xc0001fc140, 0x171ebda, 0x6)
/opt/atlassian/pipelines/agent/build/modules/bg/logging/logging.go:27 +0x208
main.main()
/opt/atlassian/pipelines/agent/build/bg.go:46 +0x2bd
The text was updated successfully, but these errors were encountered: