Re: Zombie / Orphan open files
From: Olga Kornievskaia <hidden>
Date: 2023-01-31 19:20:11
On Tue, Jan 31, 2023 at 1:19 PM Frank Filz [off-list ref] wrote:
quoted
On Mon, Jan 30, 2023 at 5:44 PM Andrew J. Romero [off-list ref] wrote:quoted
Hi This is a quick general NFS server question. Does the NFSv4x specification require or recommend that: the NFS server,after some reasonable time,quoted
should / must close orphan / zombie open files ?Why should the server be responsible for a badly behaving client? It seems like you are advocating for the world where a problem is hidden rather than solved. But because bugs do occur and some customers want a quick solution, some storage providers do have ways of dealing with releasing resources (like open state) that the client will never ask for again. Why should we excuse bad user behaviour? For things like long running jobs users have to be educated that their credentials must stay valid for the duration of their usage. Why should we excuse poor application behaviour that doesn't close files? But in a way we do, the OS will make sure that the file is closed when the application exists without explicitly closing the file. So I'm curious how do you get in a state with zombie?Don't automatically assume this is bad application behavior, though it may be behavior we don't all like, sometimes it may be for a reason. Applications may be keeping a file open to protect the file (works best when share deny modes are available, i.e. most likely a Windows client). Also, won't an executable be kept open for the lifetime of the process, especially if the executable is large enough that it will be paged in/out from the file? This assures the same executable is available for the lifetime of the process even if deleted and replaced with a new version.
Aren't you describing is a long running job (a file that needs to be kept opened -- and not closed -- for a long period of time)? And it's a user's responsibility to have creds that are long enough (or a system of renewal) that covers the duration of the job. To be clear you are talking about a long running process that keeps a file opened. You are not talking about a process that starts, opens a file and the process exits without closing a file. That's poor application behaviour I was referring too. Regardless in that situation OS cleans up. So I'm very curious how these zombie/orphan files are being created, how does it happens that the OS doesn't clean up.
Now whether this kind of activity is desirable via NFS may be another question... Frank