From owner-freebsd-questions@FreeBSD.ORG Wed May 21 13:04:50 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9513137B401 for ; Wed, 21 May 2003 13:04:50 -0700 (PDT) Received: from morpheus.mind.net (morpheus.mind.net [69.9.130.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id D844943F75 for ; Wed, 21 May 2003 13:04:47 -0700 (PDT) (envelope-from jfox@morpheus.mind.net) Received: from morpheus.mind.net (localhost [127.0.0.1]) by morpheus.mind.net (8.12.6/8.12.6) with ESMTP id h4LJtwCj050775 for ; Wed, 21 May 2003 12:55:59 -0700 (PDT) (envelope-from jfox@morpheus.mind.net) Received: (from jfox@localhost) by morpheus.mind.net (8.12.6/8.12.6/Submit) id h4LJtwxN050774 for freebsd-questions@freebsd.org; Wed, 21 May 2003 12:55:58 -0700 (PDT) Date: Wed, 21 May 2003 12:55:57 -0700 From: John Fox To: freebsd-questions@freebsd.org Message-ID: <20030521195557.GZ94908@mind.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Subject: funny sockstat behavior in 4.5-R X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 May 2003 20:04:51 -0000 Hello, I've got a rather strange thing occurring on my RADIUS server. For all I know it could have been happening for some time, because I have only recently begun the behavior that brought this problem into the light. In short, sockstat is behaving rather strangely. Most of the time, there is no problem, but it on occassion exits, printing only 'close(fstat):'. I have more specific details below: Uname data: =========== > FreeBSD ego.xxxxx.net 4.5-STABLE FreeBSD 4.5-STABLE #0 Usual behavior: =============== > [ego:/home/jjf/src/nagios/nsca/radiusd]# sockstat |grep radiusd > root radiusd 72559 10 udp4 *:1646 *:* > root radiusd 72559 16 udp4 *:1648 *:* > root radiusd 72558 9 udp4 *:1645 *:* > root radiusd 72558 10 udp4 *:1646 *:* > root radiusd 72558 13 udp4 *:1647 *:* > root radiusd 72558 16 udp4 *:1648 *:* > root radiusd 72555 9 udp4 *:1645 *:* > root radiusd 72555 13 udp4 *:1647 *:* Strange behavior: ================= > [ego:/home/jjf/src/nagios/nsca/radiusd]# sockstat |grep radiusd > close(fstat): dmesg output: ============= > pid 47410 (fstat), uid 0: exited on signal 10 > < SNIP > > pid 12421 (fstat), uid 0: exited on signal 10 snapshot from 'top': ==================== > last pid: 25314; load averages: 3.57, 4.30, 5.35 up 57+14:06:15 12:30:49 > 208 processes: 9 running, 198 sleeping, 1 zombie > CPU states: 48.6% user, 0.0% nice, 48.1% system, 1.6% interrupt, 1.8% idle > Mem: 303M Active, 70M Inact, 88M Wired, 22M Cache, 61M Buf, 18M Free > Swap: 1024M Total, 30M Used, 993M Free, 2% Inuse I've verified to myself that the fstat errors are related to the strange sockstat behavior; I ran the 'sockstat' grep shown above again and again (about five times) until I got the error condition. I then checked dmesg, and confirmed that new fstat errors had been appeneded to it. I just ran sockstat 100 times in a row -- throwing away its STDOUT, and got the following results: > # for num in `jot 100 1 100`;do sockstat >/dev/null;done > fstat: can't read mount table at 0x1800945 > close(fstat): > close(fstat): > close(fstat): > close(fstat): > close(fstat): > close(fstat): > Use of uninitialized value at /usr/bin/sockstat line 78, chunk 486. > Use of uninitialized value at /usr/bin/sockstat line 79, chunk 486. > Use of uninitialized value at /usr/bin/sockstat line 79, chunk 486. > close(fstat): > fstat: can't read mount table at 0x1800945 Those 'unitialized value' lines clued me in that sockstat is a Perl script. Perhaps my problem is related to Perl? I have searched the listing of open bug reports for 'sockstat', but to no avail. Any advice or suggestions would be most welcome. Thank you, John -- +---------------------------------------------------------------------------+ | John Fox | System Administrator | InfoStructure | +---------------------------------------------------------------------------+ | "The people and friends that we have lost, the dreams that have faded... | | never forget them." -- Yuna, Final Fantasy X | +---------------------------------------------------------------------------+