Re: sockstat: struct xtcpcb size mismatch

Previous thread: BETA4 installer doesn't attach my HDD controller; BETA3 did by Todd Wasson on Thursday, December 6, 2007 - 7:46 am. (6 messages)

Next thread: unionfs over cd9660 - solved (?) by Ivan Voras on Thursday, December 6, 2007 - 5:35 pm. (1 message)
From: Boris Samorodov
Date: Thursday, December 6, 2007 - 2:09 pm

Hello List,


is it a known problem, my unfortune update or kernel options (the box
updated a couple of hours ago 7-BETA2 -> 8-CURRENT):
-----
tinderbox# uname -a                                                            
FreeBSD tinderbox.i386.ipt.ru 8.0-CURRENT FreeBSD 8.0-CURRENT #1: Thu Dec  6 23:01:37 MSK 2007     root@tinderbox.i386.ipt.ru:/usr/obj/usr/src/sys/GENERIC+LP  i386
tinderbox# 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      
tinderbox# 
-----

The kernel config:
-----
tinderbox# cd /sys/i386/conf/
tinderbox# diff -u GENERIC GENERIC+LP 
--- GENERIC     2007-12-06 22:50:43.000000000 +0300
+++ GENERIC+LP  2007-12-07 00:12:37.000000000 +0300
@@ -67,10 +67,10 @@
 options        KDB                     # Enable kernel debugger support.
 options        DDB                     # Support DDB.
 options        GDB                     # Support remote GDB.
-options        INVARIANTS              # Enable calls of extra sanity checking
-options        INVARIANT_SUPPORT       # Extra sanity checks of internal structures, required by INVARIANTS
-options        WITNESS                 # Enable checks to detect deadlocks and cycles
-options        WITNESS_SKIPSPIN        # Don't run witness on spinlocks for speed
+#options       INVARIANTS              # Enable calls of extra sanity checking
+#options       INVARIANT_SUPPORT       # Extra sanity checks of internal structures, required by INVARIANTS
+#options       WITNESS                 # Enable checks to detect deadlocks and cycles
+#options       WITNESS_SKIPSPIN        # Don't run witness on spinlocks for speed
 
 # To make an SMP kernel, the next two lines are needed
 options        SMP                     # Symmetric MultiProcessor Kernel
@@ -323,3 +323,5 @@
 device         fwip            # IP over FireWire (RFC 2734,3146)
 ...
From: Attilio Rao
Date: Friday, December 7, 2007 - 12:09 am

LOCK_PROFILING conditional ABI changes break this.

Attilio

-- 
Peace can only be achieved by understanding - A. Einstein
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
From: Boris Samorodov
Date: Friday, December 7, 2007 - 6:06 am

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:
-----
Active UNIX domain sockets
Address  Type   Recv-Q Send-Q    Inode     Conn     Refs  Nextref Addr
       0 #0     786433      0        0 ffffff0073eec940        0        0 E
       0 #0     524289      0        0 ffffff005a4a6a68        0        0
       0 #0     786433      0        0 ffffff00472aca68        0        0 E
       0 #0     524289      0        0 ffffff007cb77250        0        0
       0 #0          1      0        0 ffffff002e9cf378        0        0
-----


WBR
-- 
Boris Samorodov (bsam)
Research Engineer, http://www.ipt.ru Telephone & Internet SP
FreeBSD committer, http://www.FreeBSD.org The Power To Serve
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
From: Josh Carroll
Date: Saturday, December 8, 2007 - 3:13 pm

Your world and kernel are out of sync. I would recommend a
buildworld/installworld and building a new kernel. That should do the
trick.

Josh
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
From: Boris Samorodov
Date: Sunday, December 9, 2007 - 3:19 pm

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:
-----
bb% uname -a
FreeBSD bb.ipt.ru 7.0-BETA4 FreeBSD 7.0-BETA4 #15: Mon Dec 10 00:24:50 MSK 2007     root@bb.ipt.ru:/usr/obj/usr/src/sys/BB  i386
bb% netstat -a | head
Active UNIX domain sockets
Address  Type   Recv-Q Send-Q    Inode     Conn     Refs  Nextref Addr
       0 #0          1      0        0 8aee8d00        0        0
       0 #0          1      0        0 8aee8c30        0        0
       0 #0          1      0        0 8aee9000        0        0 
       0 #0          1      0        0 8aee8ea0        0        0
       0 #0          1      0        0 88636410        0        0 
       0 #0          1      0        0 88636340        0        0
       0 #0          1      0        0 880d5a90        0        0 
       0 #0          1      0        0 880d59c0        0        0
bb% sysctl debug.lock.prof
debug.lock.prof.stats: No locking recorded
debug.lock.prof.collisions: 0
debug.lock.prof.hashsize: 4096
debug.lock.prof.rejected: 0
debug.lock.prof.maxrecords: 4096
debug.lock.prof.records: 0
debug.lock.prof.acquisitions: 0
debug.lock.prof.enable: 0
bb% cat /sys/i386/conf/GENERIC-BB.diff 
--- GENERIC     2007-10-11 10:20:26.000000000 +0400
+++ BB  2007-12-09 23:09:39.000000000 +0300
@@ -21,14 +21,14 @@
 cpu            I486_CPU
 cpu            I586_CPU
 cpu            I686_CPU
-ident          GENERIC
+ident          BB
 
 # To statically compile in device wiring instead of /boot/device.hints
 #hints         "GENERIC.hints"         # Default places to look for devices.
 
 makeoptions    DEBUG=-g                # Build kernel with gdb(1) debug symbols
 
-options        SCHED_4BSD              # 4BSD scheduler
+options         SCHED_ULE
 options        PREEMPTION              ...
From: Robert Watson
Date: Monday, December 10, 2007 - 10:19 am

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 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.

Robert N M Watson
Computer Laboratory
University of Cambridge
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
From: Boris Samorodov
Date: Monday, December 10, 2007 - 10:54 am

Yes, I managed to build sockstat and netstat by adding a line
"CFLAGS+=-DLOCK_PROFILING" to apropriate Makefiles, then make clean,

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
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
Previous thread: BETA4 installer doesn't attach my HDD controller; BETA3 did by Todd Wasson on Thursday, December 6, 2007 - 7:46 am. (6 messages)

Next thread: unionfs over cd9660 - solved (?) by Ivan Voras on Thursday, December 6, 2007 - 5:35 pm. (1 message)