From owner-freebsd-current Tue Jun 11 9:27:45 2002 Delivered-To: freebsd-current@freebsd.org Received: from cvsup.no.freebsd.org (c2h5oh.idi.ntnu.no [129.241.103.69]) by hub.freebsd.org (Postfix) with ESMTP id 03EBF37B406; Tue, 11 Jun 2002 09:27:35 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by cvsup.no.freebsd.org (8.11.6/8.11.6) with ESMTP id g5BGRX378029; Tue, 11 Jun 2002 16:27:33 GMT (envelope-from tegge@cvsup.no.freebsd.org) To: killer@lothlorien.no, hsu@freebsd.org Cc: current@freebsd.org Subject: Re: Crash after world/kernel upgrade From: Tor.Egge@cvsup.no.freebsd.org In-Reply-To: <1023807519.376.46.camel@vampire.lothlorien.no> References: <1023807519.376.46.camel@vampire.lothlorien.no> X-Mailer: Mew version 1.94.2 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Tue_Jun_11_16:26:55_2002_809)--" Content-Transfer-Encoding: 7bit Message-Id: <20020611162732B.tegge@cvsup.no.freebsd.org> Date: Tue, 11 Jun 2002 16:27:32 GMT X-Dispatcher: imput version 20000228(IM140) Lines: 59 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ----Next_Part(Tue_Jun_11_16:26:55_2002_809)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit > System crashed after updating today. > During the start of system services, in specific > at the start of sendmail the system crashes with > the new kernel. :/ There are some problems with the inpcb locking: - attempts to destroy held lock in in_pcbdetach. - typo in unlocking (causing recursive lock instead) - lack of inet6 support for inpcb locking, e.g. no handling of locks in in6_pcbdetach. I had to comment out INET6 from my kernel config file and apply the enclosed patch to get my machine to boot today. - Tor Egge ----Next_Part(Tue_Jun_11_16:26:55_2002_809)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=netinetfix Index: sys/netinet/in_pcb.c =================================================================== RCS file: /home/ncvs/src/sys/netinet/in_pcb.c,v retrieving revision 1.106 diff -u -r1.106 in_pcb.c --- sys/netinet/in_pcb.c 10 Jun 2002 20:05:36 -0000 1.106 +++ sys/netinet/in_pcb.c 11 Jun 2002 16:13:29 -0000 @@ -573,6 +573,11 @@ rtfree(inp->inp_route.ro_rt); ip_freemoptions(inp->inp_moptions); inp->inp_vflag = 0; + /* XXX: Kludge: Unlock inp before crashing */ + if (mtx_owned(&inp->inp_mtx)) { + printf("Warning: INP_LOCK held in in_pcbdetach\n"); + INP_UNLOCK(inp); + } INP_LOCK_DESTROY(inp); uma_zfree(ipi->ipi_zone, inp); } @@ -741,7 +746,7 @@ } INP_UNLOCK(inp); } - INP_INFO_RLOCK(pcbinfo); + INP_INFO_RUNLOCK(pcbinfo); } /* ----Next_Part(Tue_Jun_11_16:26:55_2002_809)---- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message