From owner-freebsd-stable@FreeBSD.ORG Mon Dec 10 20:44:27 2007 Return-Path: Delivered-To: freebsd-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3784916A41A for ; Mon, 10 Dec 2007 20:44:27 +0000 (UTC) (envelope-from skip@menantico.com) Received: from vms173001pub.verizon.net (vms173001pub.verizon.net [206.46.173.1]) by mx1.freebsd.org (Postfix) with ESMTP id 14E2B13C447 for ; Mon, 10 Dec 2007 20:44:26 +0000 (UTC) (envelope-from skip@menantico.com) Received: from mx.menantico.com ([71.188.11.206]) by vms173001.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JSU00410MDRNBG1@vms173001.mailsrvcs.net> for freebsd-stable@FreeBSD.org; Mon, 10 Dec 2007 13:34:40 -0600 (CST) Date: Mon, 10 Dec 2007 14:43:53 -0500 From: Skip Ford In-reply-to: <74426321@bb.ipt.ru> To: Boris Samorodov Mail-followup-to: Boris Samorodov , freebsd-stable@FreeBSD.org Message-id: <20071210194353.GB1117@menantico.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline References: <86910657@bb.ipt.ru> <20071210112201.GA1117@menantico.com> <74426321@bb.ipt.ru> User-Agent: Mutt/1.4.2.3i Cc: freebsd-stable@FreeBSD.org Subject: Re: RELENG_7: GENERIC and options LOCK_PROFILING are breaking sockstat and netstat -a X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2007 20:44:27 -0000 Boris Samorodov wrote: > On Mon, 10 Dec 2007 06:22:01 -0500 Skip Ford wrote: > > Boris Samorodov wrote: > > > The system updated a couple of hours ago (RELENG_7), the kernel config > > > is GENERIC with "options LOCK_PROFILING", default /etc/make.conf, i386 > > > (I have this problem at current-amd64 as well): > > > ----- > > > bb% uname -a > > > FreeBSD bb.ipt.ru 7.0-BETA4 FreeBSD 7.0-BETA4 #1: Mon Dec 10 10:12:24 MSK 2007 root@bb.ipt.ru:/usr/obj/usr/src/sys/GENERIC i386 > > > bb% sockstat > > > sockstat: struct xtcpcb size mismatch > > > sockstat: struct xinpcb size mismatch > > > sockstat: struct xunpcb size mismatch > > > sockstat: struct xunpcb size mismatch > > > USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS > > > bb% netstat -a | head > > > Active UNIX domain sockets > > > Address Type Recv-Q Send-Q Inode Conn Refs Nextref Addr > > > 0 #0 131073 0 ca5c6580 0 0 0 > > > 0 #0 1 0 0 d36bda90 0 0 > > > 0 #0 1 0 0 d2e11750 0 0 > > > 0 #0 1 0 0 d36bdd00 0 0 > > > 0 #0 1 0 0 d2e120d0 0 0 > > > 0 #0 1 0 0 d2e128f0 0 0 > > > 0 #0 1 0 0 d2e12820 0 0 > > > 0 #0 262145 0 0 d2e12a90 0 0 > > > > That error occurs when your kernel and world are out of sync. You need to > > rebuild netstat(1) and sockstat(1) with LOCK_PROFILING defined to match your > > kernel, or rebuild your kernel without the option LOCK_PROFILING to match > > your world. > > Ah, that's it! The world is also affected by this option. It's not > clear from LOCK_PROFILING(9): > ----- > NOTES > The LOCK_PROFILING option increases the size of struct lock_object, so a > kernel built with that option will not work with modules built without > it. > ----- > > I've read it as if only kernel (i.e. modules) should be at sync... I think the reason it doesn't go into detail about userland tools is because a LOCK_PROFILING kernel is expected to be booted and run for very brief periods of time to test, and during that testing sockstat(1) and netstat(1) probably aren't needed. So, the man page just assumes one will have broken userland utilities while the ABI is temporarily broken. -- Skip