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

Invalid memory address after updating to v0.2.3 #87

Closed
ondrejmo opened this issue Oct 15, 2024 · 3 comments
Closed

Invalid memory address after updating to v0.2.3 #87

ondrejmo opened this issue Oct 15, 2024 · 3 comments
Assignees

Comments

@ondrejmo
Copy link

Hi, after I updated to version 0.2.3 the webhook started crashing with following error message, I am not sure if am using an unsupported annotation (ttl) of if it's a bug. Please let me know you need any other information about the environment. Thank you

{"level":"debug","msg":"RecordType set to: A","time":"2024-10-15T06:05:52Z"}
{"level":"debug","msg":"Targets set to: 192.168.8.1","time":"2024-10-15T06:05:52Z"}
{"level":"debug","msg":"Converting Mikrotik TTL to Endpoint TTL: 1d","time":"2024-10-15T06:05:52Z"}
2024/10/15 06:05:52 http: panic serving 127.0.0.1:41884: runtime error: invalid memory address or nil pointer dereference
goroutine 155 [running]:
net/http.(*conn).serve.func1()
        /opt/hostedtoolcache/go/1.23.2/x64/src/net/http/server.go:1947 +0xbe
panic({0xc1f960?, 0x14df280?})
        /opt/hostedtoolcache/go/1.23.2/x64/src/runtime/panic.go:785 +0x132
github.com/mirceanton/external-dns-provider-mikrotik/internal/mikrotik.(*MikrotikProvider).Records(0xc00018f220, {0xc000000005?, 0xc0004b5848?})
        /home/runner/work/external-dns-provider-mikrotik/external-dns-provider-mikrotik/internal/mikrotik/provider.go:46 +0x195
github.com/mirceanton/external-dns-provider-mikrotik/pkg/webhook.(*Webhook).Records(0xc0001b3370, {0xf33f80, 0xc00045e0e0}, 0xc000468500)
        /home/runner/work/external-dns-provider-mikrotik/external-dns-provider-mikrotik/pkg/webhook/webhook.go:103 +0x4ba
net/http.HandlerFunc.ServeHTTP(0xc0001b0690?, {0xf33f80?, 0xc00045e0e0?}, 0xc00050a0f4?)
        /opt/hostedtoolcache/go/1.23.2/x64/src/net/http/server.go:2220 +0x29
github.com/go-chi/chi/v5.(*Mux).routeHTTP(0xc000702ae0, {0xf33f80, 0xc00045e0e0}, 0xc000468500)
        /home/runner/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:459 +0x2e2
net/http.HandlerFunc.ServeHTTP(0xf35b58?, {0xf33f80?, 0xc00045e0e0?}, 0x14df0d0?)
        /opt/hostedtoolcache/go/1.23.2/x64/src/net/http/server.go:2220 +0x29
github.com/go-chi/chi/v5.(*Mux).ServeHTTP(0xc000702ae0, {0xf33f80, 0xc00045e0e0}, 0xc0004683c0)
        /home/runner/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:90 +0x2ee
net/http.serverHandler.ServeHTTP({0xc000880570?}, {0xf33f80?, 0xc00045e0e0?}, 0x6?)
        /opt/hostedtoolcache/go/1.23.2/x64/src/net/http/server.go:3210 +0x8e
net/http.(*conn).serve(0xc0003a9050, {0xf35b20, 0xc0004c0120})
        /opt/hostedtoolcache/go/1.23.2/x64/src/net/http/server.go:2092 +0x5d0
created by net/http.(*Server).Serve in goroutine 21
        /opt/hostedtoolcache/go/1.23.2/x64/src/net/http/server.go:3360 +0x485
@mircea-pavel-anton
Copy link
Collaborator

mircea-pavel-anton commented Oct 15, 2024

Hi!

Yep, definitely a bug... Sorry about that... I am currently working on fixing this while also doing #85 to prevent future occurrences of this

In the meantime, I recommend staying on v0.1.4 until I get this properly sorted out 😅
I'll make sure to mark the releases as broken in GitHub too

@mircea-pavel-anton
Copy link
Collaborator

@ondrejmo I think this should now be fixed by #88 in v0.2.4

Mind giving it a try and closing this if the problem is resolved?

@ondrejmo
Copy link
Author

@ondrejmo I think this should now be fixed by #88 in v0.2.4

Mind giving it a try and closing this if the problem is resolved?

it's fixed, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants