From owner-freebsd-current Wed Aug 23 16: 7:45 2000 Delivered-To: freebsd-current@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id F1DED37B422 for ; Wed, 23 Aug 2000 16:07:35 -0700 (PDT) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e7NN7YZ21149; Wed, 23 Aug 2000 16:07:34 -0700 (PDT) Date: Wed, 23 Aug 2000 16:07:33 -0700 From: Alfred Perlstein To: John Polstra Cc: current@freebsd.org Subject: Re: panic: reducing sbsize: lost count, uid = 1001 Message-ID: <20000823160733.N4854@fw.wintelcom.net> References: <20000823152424.K4854@fw.wintelcom.net> <200008232238.PAA23896@vashon.polstra.com> <20000823155215.M4854@fw.wintelcom.net> <200008232255.PAA23949@vashon.polstra.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <200008232255.PAA23949@vashon.polstra.com>; from jdp@polstra.com on Wed, Aug 23, 2000 at 03:55:10PM -0700 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * John Polstra [000823 15:55] wrote: > In article <20000823155215.M4854@fw.wintelcom.net>, > Alfred Perlstein wrote: > > > Nope, that doesn't fix it. I got the same panic on the very first > > > try. > > > > hmm, when does it happen? During the transfer or at the end of the > > transfer? > > The first time I reported the problem it had happened during the > transfer. This time (with your patch) the transfer actually completed > from the peer's point of view before the panic occurred. That's not > many data points, so it could be coincidence. I'll keep you posted > if I can make it happen again. more paranioa: Index: uipc_socket.c =================================================================== RCS file: /home/ncvs/src/sys/kern/uipc_socket.c,v retrieving revision 1.80 diff -u -u -r1.80 uipc_socket.c --- uipc_socket.c 2000/08/07 17:52:08 1.80 +++ uipc_socket.c 2000/08/23 23:06:13 @@ -187,8 +187,10 @@ sodealloc(so) struct socket *so; { + int s; so->so_gencnt = ++so_gencnt; + s = splnet(); /* protect against interrupts messing with sbsize */ if (so->so_rcv.sb_hiwat) (void)chgsbsize(so->so_cred->cr_uid, -(rlim_t)so->so_rcv.sb_hiwat, RLIM_INFINITY); @@ -204,6 +206,7 @@ FREE(so->so_accf->so_accept_filter_str, M_ACCF); FREE(so->so_accf, M_ACCF); } + splx(s); crfree(so->so_cred); zfreei(so->so_zone, so); } -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message