Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

svc_dg_rendezvous: Bad message sa_family is 0xffff when receiving a NULL PROC over UDP #326

Open
oliviergaraud opened this issue Nov 27, 2024 · 2 comments

Comments

@oliviergaraud
Copy link

Tested with NFS Ganesha 6.3

I'm running the following command rpcinfo -u 127.0.0.1 nfs 4 to send a NULL RPC over UDP to ganesha.

The server shows the following log in a loop and the CPU consumption increase drastically.
ganesha.nfsd-144552[svc_34] rpc :TIRPC :CRIT :svc_dg_rendezvous: Bad message sa_family is 0xffff

If I revert #302 the problem is not visible anymore.

oliviergaraud added a commit to scality/nfs-ganesha that referenced this issue Nov 27, 2024
@oliviergaraud
Copy link
Author

I made some progress on this:

close was not called if xprt->xp_flags didn't have SVC_XPRT_FLAG_CLOSE
https://github.com/nfs-ganesha/ntirpc/pull/302/files#diff-37072503703dc62cb86cabc70ea232df164ce3f724e4972f8779104ef5e49bf6L521

in svc_dg_rendezvous the CLOSE flag is not set for newxprt: https://github.com/nfs-ganesha/ntirpc/blob/next/src/svc_dg.c#L247 but the fd is shutdown in any case.

At this line https://github.com/nfs-ganesha/ntirpc/blob/next/ntirpc/rpc/svc.h#L565 we should probably have something like if ((flags & SVC_XPRT_FLAG_CLOSE) && xprt->xp_fd != RPC_ANYFD) {

@oliviergaraud
Copy link
Author

Looks like fixed in #318

oliviergaraud added a commit to scality/nfs-ganesha that referenced this issue Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants