From owner-freebsd-current@FreeBSD.ORG Fri Aug 11 21:05:35 2006 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 81C0216A4DD; Fri, 11 Aug 2006 21:05:35 +0000 (UTC) (envelope-from gkozyrev@ukr.net) Received: from computer.ukrsat.com (computer.ukrsat.com [212.35.160.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA6A143D46; Fri, 11 Aug 2006 21:05:34 +0000 (GMT) (envelope-from gkozyrev@ukr.net) Received: from gleb.kozyrev.name (juli.slnet.kiev.ua [195.49.149.86]) by computer.ukrsat.com (8.12.8/8.12.8) with SMTP id k7BLnJsb010972; Sat, 12 Aug 2006 00:49:23 +0300 Received: from Gleb ([127.0.0.1]) by Gleb (10.8.33.3) with smtp ; Sat, 12 Aug 2006 00:05:32 +0300 Message-ID: <000001c6bd89$e00ceaf0$0321080a@Gleb> From: "Gleb Kozyrev" To: "Robert Watson" References: <000301c6bc58$d678e930$0321080a@Gleb><20060810113709.P45647@fledge.watson.org><003201c6bc9a$f42c0970$0321080a@Gleb><000901c6bd22$0316a030$0321080a@Gleb> <20060811102701.X45647@fledge.watson.org> Date: Sat, 12 Aug 2006 00:05:28 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-u" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 FL-Build: Fidolook 2002 (SL) 6.0.2800.94 - 5/4/2005 11:39:16 Cc: freebsd-current@FreeBSD.org, bug-followup@FreeBSD.org Subject: Re: kern/101763: [panic] sodealloc(): so_count 1 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Aug 2006 21:05:35 -0000 Robert Watson wrote to "Gleb Kozyrev" on Fri, 11 Aug 2006 10:29:01 +0100 (BST): > GK>> Here you are: kern/101763 >> >> I'm sorry for misleading you. >> You see, for some reasons I forgot that there's a little jail on >> that machine. ;) >> It is ipfw in jail that triggers the panic invoked from >> /etc/periodic/security/500.ipfwdenied RW> Try this minor tweak: RW> Index: uipc_socket.c RW> =================================================================== RW> RCS file: /data/fbsd-cvs/ncvs/src/sys/kern/uipc_socket.c,v RW> retrieving revision 1.277 RW> diff -u -r1.277 uipc_socket.c RW> --- uipc_socket.c 2 Aug 2006 00:45:27 -0000 1.277 RW> +++ uipc_socket.c 11 Aug 2006 09:27:52 -0000 RW> @@ -367,6 +367,9 @@ RW> so->so_count = 1; RW> error = (*prp->pr_usrreqs->pru_attach)(so, proto, td); RW> if (error) { RW> + KASSERT(so->so_count == 1, ("socreate: so_count %d", RW> + so->so_count)); RW> + so->so_count = 0; RW> sodealloc(so); RW> return (error); RW> } RW> Looks like I made a logic error in my change to move to sodealloc() here: RW> the refcount is never reduced back from when it is initially set to 1, RW> and sodealloc() has a "no references" assertion (possibly that I added). It works fine now, thank you. -- With best regards, Gleb Kozyrev.