[OpenAFS-devel] Re: OpenAFS Master Repository branch, master, updated.
BP--openafs-stable-1_6_x-32-g2ea508e
Matt W. Benjamin
matt@linuxbox.com
Wed, 25 Aug 2010 20:16:05 -0400 (EDT)
Hi Ben,
I have tested both unmounting /afs, and rebooting with AFS mounted. I haven't attempted to load and start AFS again after unmounting. So I don't think this could be a regression.
More importantly, consider two points. First, the race between osi_NetReceive and osi_StopListener with immediate soclose typically results in the osi_NetReceive thread attempting illegal accesses to various objects associated with rx_socket. Second, we perform we can only perform one legitimate soclose on rx_socket, and we do perform it, conditionally, after the wait. The conditionally part may point to an issue--I don't actually remember who introduced the notion of making soclose conditional on so_is_disconn--if in fact we do omit to soclose, I'd suggest removing the condition (and supporting macro).
Matt
----- "Benjamin Kaduk" <kaduk@mit.edu> wrote:
> On Wed, 25 Aug 2010, Gerrit Code Review wrote:
>
> > The following commit has been merged in the master branch:
> > commit 2ea508ea0f320ca17de6df3526aa7237b998c7be
> > Author: Matt Benjamin <matt@linuxbox.com>
> > Date: Wed Aug 25 16:19:18 2010 -0400
> >
> > FBSD: give osi_NetReceive time to shutdown, reprise
> >
> > The delay logic needs to follow soshutdown, and precede
> > soclose. The thread in osi_NetReceive is racing to do
> > another soreceive. That thread needs to win the race
> > and notice the socket is shut down before rx_socket is
> > torn down.
> >
> > Change-Id: Id8424dcfa2498550a190d277017b7ea15fc11023
> > Reviewed-on: http://gerrit.openafs.org/2613
> > Reviewed-by: Derrick Brashear <shadow@dementia.org>
> > Tested-by: Derrick Brashear <shadow@dementia.org>
> >
> > src/rx/FBSD/rx_knet.c | 4 ++--
> > 1 files changed, 2 insertions(+), 2 deletions(-)
>
> Hi Matt,
>
> It looks like I added the soclose call that you remove, here; I'm
> pretty
> sure that I did so because otherwise I couldn't stop and restart the
> client (i.e. the socket was still open).
>
> Can you unmount /afs (un/reload the kernel module) and remount it
> after
> this change?
>
> Thanks,
>
> Ben
--
Matt Benjamin
The Linux Box
206 South Fifth Ave. Suite 150
Ann Arbor, MI 48104
http://linuxbox.com
tel. 734-761-4689
fax. 734-769-8938
cel. 734-216-5309