On Thu, Dec 20, 2018 at 4:04 AM QR <zhbingyin@sina.com> wrote:
Could you tell me how to reproduce this? Thanks in advance.
You need to take this tirpc fix first https://github.com/nfs-ganesha/ntirpc/pull/155
Then run your script.

I run the below script for more than 12 hours, but fail to reproduce this with ganesha 2.6.3.
-------------------------------------------------------------------------------------------------------------------------
set -e

i=1
while :
do
echo $(date) $i
mount -t nfs -o vers=4,minorversion=0,tcp 10.226.138.235:/ /mnt/235/
umount /mnt/235/
let "i++"
done


--------------------------------


----- 原始邮件 -----
发件人:Daniel Gryniewicz <dang@redhat.com>
收件人:devel@lists.nfs-ganesha.org
主题:[NFS-Ganesha-Devel] Re: Depleting fds security issue
日期:2018年12月19日 22点11分

We've been able to reproduce and debug this, and have a fix here:
https://github.com/nfs-ganesha/ntirpc/pull/161
Daniel
On 12/17/2018 06:19 AM, gaurav gangalwar wrote:
>
> On Fri, Dec 14, 2018 at 9:18 PM William Allen Simpson
> <william.allen.simpson@gmail.com
> <mailto:william.allen.simpson@gmail.com>> wrote:
>
> On 12/11/18 12:30 AM, gaurav gangalwar wrote:
> > As we can see in the log highlighted we are still left with one
> ref even after SVC_DESTROY in UMNT and all SVC_RELEASE.
> >
> [...]
>
> > I tried with SVC_RELEASE instead of SVC_DESTROY in same patch, it
> worked at least for connection on which UMNT came, we are releasing
> the xprt for it.
> >
> Then it would seem that there already is another SVC_DESTROY
> somewhere else. The whole
> point of SVC_DESTROY is once-only.  So your SVC_DESTROY didn't do
> anything.
>
> So  do we need any fix in Ganesha code for this issue?
> We do SVC_DESTROY in svc_vc_recv if there is connection close from
> client, so I don't think we need to do it on UMNT in Ganesha.
>
>
> [...]
>
> > As we can see in the logs refcnt is going to zero for the
> connection on which UMNT came.
> > But there are logs for other connections also, which we are not
> cleaning up as there is no UMNT on them, but we are polling on them
> and they are getting closed,
> > I just have single client and running same script, looks like
> client is opening multiple connections and closing them on UMNT.
> >
> What client is running multiple connections on the same fd?
>
> There are no multiple connections on same fd, there are multiple
> fds/connections from client which are getting closed without UMNT call
> on them so they will not get cleaned from server. I pasted the logs for it.
> Point is doing SVC_RELEASE in UMNT is not fixing the issue, we are still
> left with uncleaned connections.
> As per discussion here
> https://github.com/nfs-ganesha/ntirpc/pull/160
> Looks like we need fix in tirpc only.
> Regards,
> Gaurav
>
>
>
>
>
>
> _______________________________________________
> Devel mailing list -- devel@lists.nfs-ganesha.org
> To unsubscribe send an email to devel-leave@lists.nfs-ganesha.org
>
_______________________________________________
Devel mailing list -- devel@lists.nfs-ganesha.org
To unsubscribe send an email to devel-leave@lists.nfs-ganesha.org
_______________________________________________
Devel mailing list -- devel@lists.nfs-ganesha.org
To unsubscribe send an email to devel-leave@lists.nfs-ganesha.org