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

EC2 Elastic IP panic fix #749

Merged
merged 2 commits into from
Apr 27, 2023

Conversation

PumpkinSeed
Copy link
Contributor

Problem

Elastic IP run into this nil panic because of an unhandled pointer dereference.

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

goroutine 16 [running]:
github.com/tailwarden/komiser/providers/aws/ec2.ElasticIps({0x3564dd0, 0xc000126048}, {0xc000ff5d40, 0x0, {0x0, 0x0}, 0x0, 0x0, 0x0, 0x0, ...})
        /home/runner/work/komiser/komiser/providers/aws/ec2/elastic_ips.go:67 +0x449
github.com/tailwarden/komiser/providers/aws.FetchResources({_, _}, {0xc000ff5d40, 0x0, {0x0, 0x0}, 0x0, 0x0, 0x0, 0x0, ...}, ...)
        /home/runner/work/komiser/komiser/providers/aws/aws.go:96 +0x555
github.com/tailwarden/komiser/internal.fetchResources.func1({0x3564dd0?, 0xc000126048?}, {0xc000ff5d40, 0x0, {0x0, 0x0}, 0x0, 0x0, 0x0, 0x0, ...}, ...)
        /home/runner/work/komiser/komiser/internal/internal.go:270 +0x1e9
created by github.com/tailwarden/komiser/internal.fetchResources
        /home/runner/work/komiser/komiser/internal/internal.go:264 +0x109e

Solution

Handle the pointer dereference with an error in cause of nil value.

@mlabouardy mlabouardy added the aws label Apr 27, 2023
@mlabouardy mlabouardy added this to the v3.0.14 milestone Apr 27, 2023
@mlabouardy mlabouardy merged commit 6400171 into tailwarden:master Apr 27, 2023
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 this pull request may close these issues.

2 participants