One source of “fd leaks” is that the global fd, which is used for getattrs, is 
no longer well managed. I have some ideas in progress on how to better manage 
this, but discussion has stalled due to folks involvement in Bakeathon.



If there is also a genuine leak of state_t associated with fids, that would be 
an issue. You might try running under Valgrind memcheck to look for leaks.



Frank



From: DENIEL Philippe [mailto:philippe.den...@cea.fr]
Sent: Wednesday, September 27, 2017 7:38 AM
To: Frank Filz <ffilz...@mindspring.com>; LUCAS Patrice 601375 
<patrice.lu...@cea.fr>
Subject: fid cloned in 9p and fd leak



Hi Frank & Patrice,

I am back to this matter of fd leak that I have seen in Ganesha 2.5. Symptoms 
are:

*       kernel compilation failed through 9p because the "Futility count" is 
reached (there are clearly too many opened fds);
*       kernel compilation fails though NFSv4.1 with a different symptom : link 
edition, which involves mmap() fails

As the Ganesha 2.5 server is used, I noticed that the number of opened fd was 
increasing and decreasing, it's not so as 9p is used. I suspect someting wrong 
in 9p as it was ported to support_ex.

What I suspect is this:

*       9p states are handled on the server handside as "fids". A fid is 
basically associated to a thread inside a process on a client that does 
something with the FS
*       fids can be "cloned" (via the WALK message)

*       currently, a new fid is created and the 1st one is memcpy-ed to the new 
one
*       the clone fid can handle an opened file (and I know that such fids are 
cloned)

*       fids are released via a CLUNK message

*       open2 is called to close the openend FD if the fid handles an opened 
file

Question is : the fid with an opened fd has a SAL state or a FSAL state 
somewhere. It is roughly copied. What if it is released/closed twice ? Won't 
this result in a FD never closed ?

    Regards

        Philippe



PS: I hope that everything is OK at FALL BAT'17



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel

Reply via email to