You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current situation
We use os.NewFile() when receiving an fds, as seen here. Tricks to keep a reference alban was using, when I tested with a different agent at least, fail if the agent runs for a long time.
Impact
The go runtime can close the fd if considers we are not using it anymore. See the notes here: https://pkg.go.dev/os#NewFile.
That is totally legit for the go runtime to believe, as we are not using that object, but just the fd number.
The result is the target container will stop working and will need to be restarted.
Ideal future situation
Don't return an object that can be garbage collected and that would mean closing the fd
Implementation options
Just returning an uintptr should be enough, and addapting the functions signatures. Should be trivial, but I don't have the time to test it now, so opening an issue so we don't forget.
The text was updated successfully, but these errors were encountered:
Current situation
We use
os.NewFile()
when receiving an fds, as seen here. Tricks to keep a reference alban was using, when I tested with a different agent at least, fail if the agent runs for a long time.Impact
The go runtime can close the fd if considers we are not using it anymore. See the notes here: https://pkg.go.dev/os#NewFile.
That is totally legit for the go runtime to believe, as we are not using that object, but just the fd number.
The result is the target container will stop working and will need to be restarted.
Ideal future situation
Don't return an object that can be garbage collected and that would mean closing the fd
Implementation options
Just returning an uintptr should be enough, and addapting the functions signatures. Should be trivial, but I don't have the time to test it now, so opening an issue so we don't forget.
The text was updated successfully, but these errors were encountered: