Subject: port-sparc/25846: vmstat -m reports garbage
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <bsieker@rvs.uni-bielefeld.de>
List: netbsd-bugs
Date: 06/06/2004 16:00:37
>Number:         25846
>Category:       port-sparc
>Synopsis:       vmstat -m reports garbage
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-sparc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 06 16:01:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Bernd Sieker
>Release:        NetBSD-2.0_BETA (2004-05-05)
>Organization:
>Environment:
NetBSD portier.home.loc 2.0_BETA NetBSD 2.0_BETA (PORTIER.MP) #4: Sat Jun  5 14:32:37 CEST 2004  bernd@boa.home.loc:/usr/source/2.0/src/sys/arch/sparc/compile/obj/PORTIER.MP sparc

>Description:
The output of vmstat -m is completely messed up.

In particular the Memory resource pool statistics always look like this:

Memory resource pool statistics
Name        Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
phpool        40     4056    0        0     0     0     2     0     0   inf  158
pcgpool      144     4056    0        0     0     0     1     0     0   inf   29
vmsppl       344     4056    0        0     0     0     3     0     0   inf  291
vmmpepl       96     4056    0        0     0     0    21     0     0   inf 22815
vmmpekpl      96     4056    0        0     0     0     1     0     0   inf  234
uaoeltpl      88     4056    0        0     0     0     0     0     0   inf    0
aobjpl        80     4056    0        0     0     0     1     0     0   inf    1
...
sigapl      2056     4056    0        0     0     0    32     0     0   inf  291
siginfo      128     4056    0        0     0     0     0     0     0   inf    0
ksiginfo      48     4056    0        0     0     0     0     0     0   inf    0
swp vnx       24     4056    0        0     0     0     0     0     0   inf    0
swp vnd      160     4056    0        0     0     0     0     0     0   inf    0
pipepl       208     4056    0        0     0     0     1     0     0   inf   88

In use 59889K, total allocated 2600K; utilization 2303.4%

i. e. the number of requests given for _each_ pool is always exactly 4056, and the number of failures is 0.

The total allocated size reports a sensible number (which may or
may not be correct), but the "in use" size is definitely much too big,
reporting a meaningless percentage.

The system appears to run stable otherwise, and after about 2 days
uptime, both the in-use and the total-allocated values are reported
as 0, and percentage is (consequently) "nan".

Userland and kernel have been built from the same source tree.

I have only seen this on my sparc (SPARCstation-20MP) machine,
I tried different combinations of disabling/enabling ALTQ, and
single/multiprocessor support, but the problem is always there.

I have not seen this problem on sparc64 (Ultra 1 with 64bit kernel
and userland) or i386 built from the same sources.

The dmesg output of the affected system:

NetBSD 2.0_BETA (PORTIER.MP) #6: Sun Jun  6 10:01:58 CEST 2004
        bernd@boa.home.loc:/usr/source/2.0/src/sys/arch/sparc/compile/obj/PORTIER.MP
total memory = 64816 KB
avail memory = 59916 KB
bootpath: /iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@1,0
mainbus0 (root): SUNW,SPARCstation-20: hostid 7271bfaf
cpu0 at mainbus0: mid 8: TMS390Z50 v0 or TMS390Z55 @ 75 MHz, on-chip FPU
cpu0: physical 20K instruction (64 b/l), 16K data (32 b/l), 1024K external (32 b/l): cache enabled
cpu1 at mainbus0: mid 10: TMS390Z50 v0 or TMS390Z55 @ 75 MHz, on-chip FPU
cpu1: physical 20K instruction (64 b/l), 16K data (32 b/l), 1024K external (32 b/l): cache enabled
obio0 at mainbus0
clock0 at obio0 slot 0 offset 0x200000: mk48t08
timer0 at obio0 slot 0 offset 0x300000: delay constant 35
zs0 at obio0 slot 0 offset 0x100000 level 12 softpri 6
zstty0 at zs0 channel 0 (console i/o)
zstty1 at zs0 channel 1
zs at obio0 slot 0 offset 0x0 level 12 not configured
fdc0 at obio0 slot 0 offset 0x700000 level 11 softpri 4: chip 82077
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
auxreg0 at obio0 slot 0 offset 0x800000
power0 at obio0 slot 0 offset 0xa01000 level 2
iommu0 at mainbus0 ioaddr 0xe0000000: version 0x3/0x1, page-size 4096, range 64MB
sbus0 at iommu0: clock = 25 MHz
dma0 at sbus0 slot 15 offset 0x400000: DMA rev 2
esp0 at dma0 slot 15 offset 0x800000 level 4: ESP200, 40MHz, SCSI ID 7
scsibus0 at esp0: 8 targets, 8 luns per target
ledma0 at sbus0 slot 15 offset 0x400010: DMA rev 2
le0 at ledma0 slot 15 offset 0xc00000 level 6: address 08:00:20:71:bf:af
le0: 8 receive buffers, 2 transmit buffers
bpp0 at sbus0 slot 15 offset 0x4800000 level 2 (ipl 3): DMA rev 2
bpp: hcr 0 ocr 200a tcr 8 or 0
SUNW,DBRIe at sbus0 slot 14 offset 0x10000 level 9 not configured
hme0 at sbus0 slot 2 offset 0x8c00000 level 4 (ipl 7): Sun Happy Meal Ethernet (SUNW,hme)
hme0: Ethernet address 08:00:20:71:bf:af
nsphy0 at hme0 phy 1: DP83840 10/100 media interface, rev. 1
nsphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
eccmemctl0 at mainbus0 ioaddr 0x0: version 0x0/0x2
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 1 lun 0: <WDIGTL, ENTERPRISE, 1.91> disk fixed
sd0: 4157 MB, 5720 cyl, 8 head, 186 sec, 512 bytes/sect x 8515173 sectors
sd0: sync (100.00ns offset 15), 8-bit (10.000MB/s) transfers, tagged queueing
cd0 at scsibus0 target 6 lun 0: <TOSHIBA, XM-4101TASUNSLCD, 3424> cdrom removable
cd0: async, 8-bit transfers
root on sd0a dumps on sd0b
mountroot: trying nfs...
mountroot: trying ffs...
root file system type: ffs
cpu0: booting secondary processors: cpu1
init: copying out path `/sbin/init' 11

>How-To-Repeat:
Install a recent 2.0_BETA on a SPARCstation 20 (possibly other sparc
machines) and give a "vmstat -m" command to see the messed-up output.

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted: