Skip to content
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

Poller crashes with segmentation violation #53

Closed
weilhr opened this issue Aug 6, 2020 · 5 comments · Fixed by #54
Closed

Poller crashes with segmentation violation #53

weilhr opened this issue Aug 6, 2020 · 5 comments · Fixed by #54
Assignees
Labels

Comments

@weilhr
Copy link

weilhr commented Aug 6, 2020

Hi,

great project which I'm looking forward to use in our small environment to keep an eye on resources and VM's. Unfortunately the poller crash once one of our two vCenters is polled by vSummary. I've created an external poller and the last famous words are when the vCenter with polling issue is configured :

# docker run -ti --rm  --network vsummary_bridge --name vsummary-poller -v /data/docker/container/vsummary/server/vsummary-poller.yaml:/opt/vsummary/vsummary-poller.yaml gbolo/vsummary:latest sh
> Executed entrypoint-base on: Thu Aug  6 12:25:14 UTC 2020
> Version Information:
BASEOS_BUILD_DATE=2020-04-07
BASEOS_BUILD_REF=b94c63e
> Executing as uid [65534]: sh
/opt/vsummary $ vsummary-poller daemonize --config /opt/vsummary/vsummary-poller.yaml --log-level DEBUG
I 2020-08-06 12:25:30 vsummary-poller[15]: 00001 config.go:94 ConfigInitPoller using config file: /opt/vsummary/vsummary-poller.yaml
Setting vSummary Server Base URL: http://vsummary-server:8080
I 2020-08-06 12:25:30 vsummary-poller[15]: 00002 external_poller.go:218 Daemonize start interval polling (60m) of https://10.11.12.13/sdk
D 2020-08-06 12:25:32 vsummary-poller[15]: 00003 util.go:29 ExecutionTime pollVcenter took 8.910987ms
I 2020-08-06 12:25:33 vsummary-poller[15]: 00004 poll_esxi.go:146 GetEsxi poller fetched summary of 6 esxi hosts, 35 pNICS, 7 standard vswitches, 14 standard portgroups
D 2020-08-06 12:25:33 vsummary-poller[15]: 00005 util.go:29 ExecutionTime pollEsxi took 983.254703ms
I 2020-08-06 12:25:33 vsummary-poller[15]: 00006 util.go:72 GetBool error parsing json: Key path not found
I 2020-08-06 12:25:33 vsummary-poller[15]: 00007 util.go:72 GetBool error parsing json: Key path not found
I 2020-08-06 12:25:33 vsummary-poller[15]: 00008 util.go:72 GetBool error parsing json: Key path not found
I 2020-08-06 12:25:33 vsummary-poller[15]: 00009 util.go:72 GetBool error parsing json: Key path not found
I 2020-08-06 12:25:33 vsummary-poller[15]: 00010 util.go:72 GetBool error parsing json: Key path not found
D 2020-08-06 12:25:33 vsummary-poller[15]: 00011 util.go:29 ExecutionTime pollVirtualMachine took 293.365265ms
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x128 pc=0xb64213]
 
goroutine 9 [running]:
github.com/gbolo/vsummary/poller.(*Poller).GetVirtualMachines(0xc0001c6750, 0xc000485800, 0x1f, 0x21, 0xc00061e000, 0x8b, 0x92, 0xc0004a6000, 0x3e, 0x40, ...)
        /opt/gopath/src/github.com/gbolo/vsummary/poller/poll_virtualmachines.go:53 +0x6e3
github.com/gbolo/vsummary/poller.(*Poller).GetPollResults(0xc0001c6750, 0xc000104120, 0x24, 0xc000024c88, 0xd, 0xc000026ef0, 0x5, 0xc0001c3500, 0x6, 0x8, ...)
        /opt/gopath/src/github.com/gbolo/vsummary/poller/poller.go:150 +0x5f6
github.com/gbolo/vsummary/poller.(*ExternalPoller).PollThenSend(0xc0001c6750, 0xa, 0xc0003ee070, 0xc0003da120)
        /opt/gopath/src/github.com/gbolo/vsummary/poller/external_poller.go:182 +0x45
github.com/gbolo/vsummary/poller.(*ExternalPoller).Daemonize(0xc0001c6750)
        /opt/gopath/src/github.com/gbolo/vsummary/poller/external_poller.go:222 +0x1d7
created by github.com/gbolo/vsummary/cmd/vsummary-poller/command.daemonize
        /opt/gopath/src/github.com/gbolo/vsummary/cmd/vsummary-poller/command/daemonize.go:48 +0x85

Any idea, what could cause the issue. It happened with vCenter version 6.7.0.44000 and persists after upgrading to 7.0.0.10400

Thanks

@gbolo gbolo added the bug label Aug 12, 2020
@gbolo gbolo self-assigned this Aug 12, 2020
@gbolo
Copy link
Owner

gbolo commented Aug 12, 2020

Hi @weilhr sorry to hear that. I will take a look when I get a chance. Does this happen to all your vcenters? Most likely I'm trying to access a property that does not exist, so it's certainly a bug.

@weilhr
Copy link
Author

weilhr commented Aug 12, 2020

Hi @gbolo, many thanks for your response. Right now I'm aware of 2 vcenters which I cannot discover and failing with same message. P,lease let me know if I can provide you more information for your research.

@gbolo
Copy link
Owner

gbolo commented Aug 12, 2020

@weilhr no problem.

Can you run this when you get a chance? docker run -t --rm gbolo/vsummary:latest vsummary-poller version

do you have any vcenters that poll successfully? or they all fail like this? Do these vcenters have any VMs in a "strange" state? I looked over poller.go and I'm certainly assuming some properties must be present (not good code on my part). Im going try a fix and give you a new docker image to test shortly

@gbolo
Copy link
Owner

gbolo commented Aug 12, 2020

@weilhr can you try polling again with this new docker image? gbolo/vsummary:issue-53-rev1

@gbolo
Copy link
Owner

gbolo commented Sep 4, 2020

@weilhr did you get a chance to try it out yet?

gbolo added a commit that referenced this issue Dec 20, 2021
@gbolo gbolo closed this as completed in #54 Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants