coredns / coredns

CoreDNS is a DNS server that chains plugins
https://coredns.io
Apache License 2.0
12.28k stars 2.13k forks source link

coremain: unclosed caddyFile in Run #5679

Open odeke-em opened 1 year ago

odeke-em commented 1 year ago

Reported by Static Major from Orijtech Inc, we can see this

/github.com/coredns/coredns/coremain/run.go:74:1: leaking resource created on line 63

which translates to https://github.com/coredns/coredns/blob/2f24b512d3999e9687ffbfaf8f8226c64185dca1/coremain/run.go#L56-L60 and after instance.Wait() returns, that file will be unclosed hence leak.

Kindly FYI-ing @willpoint @jhusdero @elias-orijtech @kirbyquerby

yongtang commented 1 year ago

I am not able to find an obvious leak there. Tends to believe the leak may be inside upstream caddy.

chrisohaver commented 1 year ago

I tried transfer this to coredns/caddy but that repo doesn't have issues enabled - and I don't have admin privs, so I cannot enable them.

yongtang commented 1 year ago

coredns/caddy is a fork of caddy v1 and the issue is not under active maintenance. Let's keep the issue here to make sure it can be addressed.