Comment 1 for bug 1952942

Revision history for this message
John A Meinel (jameinel) wrote :

We had an idea floated that Go might not be reaping file descriptors when the File objects were being garbage collected, but Arnaud specifically located the code in Go where it sets a finalizer.
https://cs.opensource.google/go/go/+/refs/tags/go1.17.3:src/os/file_unix.go;l=187;drc=refs%2Ftags%2Fgo1.17.3

And that has been true for quite some time:
https://cs.opensource.google/go/go/+/refs/tags/go1.8:src/os/file_unix.go;l=57

So it is likely that something inside Juju itself is clearly holding on to the File objects. (My personal guess is that we leak State objects as part of the workers restarting, but I wouldn't expect State objects to be holding onto the files that we are using for logging.)