Skip to content

Possible errors with fd leak detection with gotip (future 1.23) #11

@mauri870

Description

@mauri870

I just noticed that there is some fd leak detection logic here:

vm.Errorf = logger.Printf
start := nfds()
defer func() {
http.DefaultClient.CloseIdleConnections()
end := nfds()
if end > start {
logger.Printf("warning: file descriptor leak: exiting with %d > %d", end, start)
}

With Go 1.23 this will probably break since it will make use of pidfd on Linux, see https://www.github.com/golang/go/issues/62654.

The fix should be similar to what I submitted to containerd here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions