Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Panic - configtest v0.10.8 #441

Closed
dcloud9 opened this issue Aug 6, 2020 · 2 comments · Fixed by #443
Closed

Panic - configtest v0.10.8 #441

dcloud9 opened this issue Aug 6, 2020 · 2 comments · Fixed by #443
Assignees
Milestone

Comments

@dcloud9
Copy link

dcloud9 commented Aug 6, 2020

We've upgraded from v0.10.4 to v0.10.8 and no breaking change apart from the -configtest. Panic output below

# /usr/local/bin/cloudprober -configtest -config_file=/etc/cloudprober/cloudprober.cfg
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x9cd2f6]
goroutine 1 [running]:
github.com/google/cloudprober/logger.(*Logger).Debugf(0x0, 0x12ebb99, 0x29, 0xc00063fab8, 0x1, 0x1)
        /home/runner/work/cloudprober/cloudprober/logger/logger.go:298 +0x26
github.com/google/cloudprober/sysvars.addGceNicInfo(0xc00002f9e0, 0x0)
        /home/runner/work/cloudprober/cloudprober/sysvars/sysvars_gce.go:145 +0x28c
github.com/google/cloudprober/sysvars.glob..func2(0xc00002f9e0, 0x0, 0x3, 0x1, 0x0)
        /home/runner/work/cloudprober/cloudprober/sysvars/sysvars_gce.go:87 +0x3c3
github.com/google/cloudprober/sysvars.initCloudMetadata(0x12c495f, 0x4, 0x12c92f3, 0x8)
        /home/runner/work/cloudprober/cloudprober/sysvars/sysvars.go:110 +0x240
github.com/google/cloudprober/sysvars.Init(0x0, 0xc00002f9b0, 0x0, 0x0)
        /home/runner/work/cloudprober/cloudprober/sysvars/sysvars.go:152 +0x28c
main.main()
        /home/runner/work/cloudprober/cloudprober/cmd/cloudprober.go:169 +0x377
@manugarg
Copy link
Contributor

manugarg commented Aug 6, 2020

Much thanks for this bug report.

The problem seems to be here:

if l.debugLog {

Logger is always supposed to work even when uninitialized, but here we're checking for the debugLog property being set. This can be easily fixed.

(As an aside, I am kind of surprised why we haven't run into this issue yet internally. I'll continue to look into that.)

@manugarg manugarg self-assigned this Aug 6, 2020
@manugarg manugarg added this to the v0.10.9 milestone Aug 6, 2020
@manugarg
Copy link
Contributor

manugarg commented Aug 6, 2020

(As an aside, I am kind of surprised why we haven't run into this issue yet internally. I'll continue to look into that.)

I guess you're running this configtest on GCE, while we've never do that. Regardless, I'll get it fixed soon. We'll also release v0.10.9 in a couple of days.

manugarg added a commit that referenced this issue Aug 6, 2020
This is to fix #441.

PiperOrigin-RevId: 325283544
manugarg added a commit that referenced this issue Aug 6, 2020
This is to fix #441.

PiperOrigin-RevId: 325283544
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants