Date: Mon, 10 Dec 2007 20:54:52 +0300 From: Boris Samorodov <bsam@ipt.ru> To: Robert Watson <rwatson@FreeBSD.org> Cc: josh.carroll@gmail.com, Attilio Rao <attilio@freebsd.org>, freebsd-current@freebsd.org Subject: Re: sockstat: struct xtcpcb size mismatch Message-ID: <95868243@bb.ipt.ru> In-Reply-To: <20071210171726.V52506@fledge.watson.org> (Robert Watson's message of "Mon\, 10 Dec 2007 17\:19\:51 %2B0000 \(GMT\)") References: <97676449@bb.ipt.ru> <3bbf2fe10712062309j7c49aef7g9a5cfa6e2a52158c@mail.gmail.com> <53021179@bb.ipt.ru> <8cb6106e0712081413uc58f836w611b99ab0a536a4a@mail.gmail.com> <31551976@bs1.sp34.ru> <20071210171726.V52506@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 10 Dec 2007 17:19:51 +0000 (GMT) Robert Watson wrote: > On Mon, 10 Dec 2007, Boris Samorodov wrote: > > On Sat, 8 Dec 2007 17:13:14 -0500 Josh Carroll wrote: > > > >>> Thanks for the answer. And sorry, I can't understand what to do > >>> further. Is it by design and should stay so or should it be fixed? > >>> > >>> BTW, RELENG_7 behaves the same way. And "netstat -a" is broken: > > > >> Your world and kernel are out of sync. I would recommend a > >> buildworld/installworld and building a new kernel. That should do > >> the trick. > > > > I wish you were right. > > > > Fresh cvsup to RELENG_7, buildworld (after make clean twice), make > > kernel, install world, mergemaster. The kernel config (diff from > > GENERIC shown later) doesn't work. If "options LOCK_PROFILING" is > > removed and the kernel is rebuilt, all goes well. The bad case: Robert, thank you for the answer. Now I (hope) understand the case. > This is currently an accepted failure mode -- lock profiling > significantly swells the overhead of various data structures and > operations, so is not compiled in by default, and when compiled in, > does modify the ABI for the monitoring interfaces. You may be able to > "fix" the user tools to match the kernel ABI by recompiling them but > adding -DLOCK_PROFILING (or something along these lines). It turns Yes, I managed to build sockstat and netstat by adding a line "CFLAGS+=-DLOCK_PROFILING" to apropriate Makefiles, then make clean, make and make install did the trick. > out that the interfaces that export TCP information directly export > kernel data structures to user space -- this was presumably easy at > the time for whoever did the work, but is a Bad Idea. I've looked at > fixing this before, but it's quite involved. I hope that we will fix > it for 8.0. Meanwhile may be it's the right thing to mention this workaround at LOCK_PROFILING(9) man page? WBR -- Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone & Internet SP FreeBSD committer, http://www.FreeBSD.org The Power To Serve
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?95868243>