socket state questions
Rick Macklem <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.net |
|---|---|
| Message-ID | <CAM5tNy4i7e+kXC06WfEbm4ddYNP6-ya=ro+JqRLzCDFPS6AJVw@mail.gmail.com> |
Hi,
I'm trying to figure out what might be causing the
crashes reported by bugzilla PR#293127.
When I look in svc_vc.c I find this:
svc_vc_create(SVCPOOL *pool, struct socket *so, size_t sendsize,
size_t recvsize)
{
SVCXPRT *xprt;
int error;
SOCK_LOCK(so);
if (so->so_state & (SS_ISCONNECTED|SS_ISDISCONNECTED)) {
This "if" is testing to see if the socket should be used for listening or
if it one returned from "accept". For NFS, this should always be true.
I'm wondering about a couple of things...
- Should SS_ISDISCONNECTING be here, as well, or will accepted
TCP sockets go directly from SS_ISCONNECTED to SS_ISDISCONNECTED?
- Why would SS_ISDISCONNECTED be here? Can a socket go from
SS_ISDISCONNECTED back to SS_ISCONNECTED?
If not, the only reason I can think of is so that it will get closed by
svc_vc_destroy_common(), but then why not just soclose() it here?
Thanks for any help with this, rick