Brian Candler
2004-Nov-20 07:55 UTC
netstat -finet not working after upgrading to 5.3-STABLE
I started with a fresh 5.3-RELEASE install and then upgraded the kernel source to 5.3-STABLE before installing a new kernel. I now find that netstat fails to show any Internet sockets ('netstat -finet' and 'netstat -ptcp' give nothing, 'netstat' shows only Unix domain sockets) I didn't do a buildworld/installworld, but I've tried a make / make install on netstat itself, and also on the libraries it depend on (libkvm, libipx libnetgraph, libutil) but it still doesn't work. It also depends on libc, but I've not rebuilt that on the basis that nothing significant seems to have changed recently: # cd /usr/src/lib/libc # find . -type f -mtime -28 | xargs ls -l -rw-r--r-- 1 root wheel 2818 Oct 30 01:07 ./amd64/sys/brk.S -rw-r--r-- 1 root wheel 507 Nov 18 13:32 ./ia64/gen/Makefile.inc -rw-r--r-- 1 root wheel 2154 Nov 9 03:44 ./ia64/gen/_mcount.S -rw-r--r-- 1 root wheel 6034 Nov 18 13:33 ./net/addr2ascii.3 -rw-r--r-- 1 root wheel 5128 Nov 20 15:18 ./string/strerror.3 -rw-r--r-- 1 root wheel 5487 Nov 18 13:33 ./sys/mlock.2 -rw-r--r-- 1 root wheel 6509 Nov 18 13:33 ./sys/read.2 -rw-r--r-- 1 root wheel 6699 Nov 18 13:33 ./sys/sendfile.2 -rw-r--r-- 1 root wheel 6984 Nov 18 13:33 ./sys/write.2 # Another machine which I have, running 5.3-RELEASE, has a working netstat, and that's also compiled without INET6. My kernel does have 'device mem' in it (I only removed INET6 and unnecessary device drivers), and a search on Gnats, and FreeBSD-current/questions doesn't turn up any answers. I see nothing recent in /usr/src/UPDATING. # sysctl -o net.inet.tcp.pcblist net.inet.tcp.pcblist: Format:S,xtcpcb Length:3840 Dump:0x18000000060000001005000000000000... 'ktrace netstat -finet -n' shows: ... 3058 netstat CALL open(0x2808e5a5,0,0) 3058 netstat NAMI "/dev/mem" 3058 netstat RET open 3 3058 netstat CALL fstat(0x3,0xbfbfe900) 3058 netstat RET fstat 0 3058 netstat CALL fcntl(0x3,0x2,0x1) 3058 netstat RET fcntl 0 3058 netstat CALL open(0x2808e5b8,0,0x1) 3058 netstat NAMI "/dev/kmem" 3058 netstat RET open 4 3058 netstat CALL fcntl(0x4,0x2,0x1) 3058 netstat RET fcntl 0 3058 netstat CALL getgid 3058 netstat RET getgid 0 3058 netstat CALL setgid(0) 3058 netstat RET setgid 0 3058 netstat CALL kldsym(0,0x1,0xbfbfe9a0) 3058 netstat RET kldsym 0 3058 netstat CALL kldsym(0,0x1,0xbfbfe9a0) 3058 netstat RET kldsym 0 3058 netstat CALL kldsym(0,0x1,0xbfbfe9a0) 3058 netstat RET kldsym 0 3058 netstat CALL kldsym(0,0x1,0xbfbfe9a0) 3058 netstat RET kldsym -1 errno 2 No such file or directory 3058 netstat CALL kldsym(0,0x1,0xbfbfe9a0) 3058 netstat RET kldsym -1 errno 2 No such file or directory 3058 netstat CALL kldsym(0,0x1,0xbfbfe9a0) 3058 netstat RET kldsym -1 errno 2 No such file or directory ... snip more of these 3058 netstat RET kldsym 0 3058 netstat CALL kldsym(0,0x1,0xbfbfe9a0) 3058 netstat RET kldsym -1 errno 2 No such file or directory 3058 netstat CALL kldsym(0,0x1,0xbfbfe9a0) 3058 netstat RET kldsym -1 errno 2 No such file or directory 3058 netstat CALL __sysctl(0xbfbfe8c8,0x2,0xbfbfe8d0,0xbfbfe8c4,0x8057634,0x14) 3058 netstat RET __sysctl 0 3058 netstat CALL __sysctl(0xbfbfe8d0,0x4,0,0xbfbfe99c,0,0) 3058 netstat RET __sysctl 0 3058 netstat CALL break(0x8077000) 3058 netstat RET break 0 3058 netstat CALL __sysctl(0xbfbfe8c8,0x2,0xbfbfe8d0,0xbfbfe8c4,0x8057634,0x14) 3058 netstat RET __sysctl 0 3058 netstat CALL __sysctl(0xbfbfe8d0,0x4,0x8076000,0xbfbfe99c,0,0) 3058 netstat RET __sysctl 0 3058 netstat CALL __sysctl(0xbfbfe8c8,0x2,0xbfbfe8d0,0xbfbfe8c4,0x8057649,0x ... snip more of these 3058 netstat CALL __sysctl(0xbfbfe8c8,0x2,0xbfbfe8d0,0xbfbfe8c4,0x805765e,0x14) 3058 netstat RET __sysctl 0 3058 netstat CALL __sysctl(0xbfbfe8d0,0x4,0,0xbfbfe99c,0,0) 3058 netstat RET __sysctl 0 3058 netstat CALL __sysctl(0xbfbfe8c8,0x2,0xbfbfe8d0,0xbfbfe8c4,0x805765e,0x14) 3058 netstat RET __sysctl 0 3058 netstat CALL __sysctl(0xbfbfe8d0,0x4,0x8076000,0xbfbfe99c,0,0) 3058 netstat RET __sysctl 0 3058 netstat CALL exit(0) Any other suggestions where I can look to fix this? Do I really have to do a buildworld? Thanks, Brian Candler.
Brian Candler
2004-Nov-20 08:12 UTC
netstat -finet not working after upgrading to 5.3-STABLE
On Sat, Nov 20, 2004 at 03:55:11PM +0000, Brian Candler wrote:> I started with a fresh 5.3-RELEASE install and then upgraded the kernel > source to 5.3-STABLESorry, I meant to say 5-STABLE. The release tag is RELENG_5 (I just used /usr/share/examples/cvsup/stable-supfile) Cheers, Brian.