Thread (45 messages) 45 messages, 6 authors, 2023-03-02

RE: Zombie / Orphan open files

From: Frank Filz <hidden>
Date: 2023-01-31 21:31:47

On Tue, Jan 31, 2023 at 1:19 PM Frank Filz [off-list ref] wrote:
quoted
quoted
On Mon, Jan 30, 2023 at 5:44 PM Andrew J. Romero [off-list ref]
wrote:
quoted
quoted
quoted
Hi

This is a quick general NFS server question.

Does the NFSv4x  specification require or recommend that:   the NFS
server,
quoted
quoted
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.
quoted
quoted
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.
Oh, OK, I see now I was confused, I see Andrew responded with a theory of what might be happening.

And yea, if the client is allowing credentials to expire while a file is still open, that's a problem.

Frank
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help