Subject: Re: Memory leaks
To: None <port-sparc@NetBSD.org>
From: Christian Corti <corti@informatik.uni-stuttgart.de>
List: port-sparc
Date: 11/18/2004 10:46:50
On Tue, 16 Nov 2004, Havard Eidnes wrote:
> It would probably/hopefully help if you logged this as a formal
> problem report.

Before logging this as a formal problem report I'd like to know if others 
have similar problems or if this only happens to my machine.

> Please make sure to include in the problem report the output from
> "vmstat -m" on a fresh boot and after a day's operation.

# uptime
10:25AM  up 1 day,  6:19, 1 user, load averages: 0.21, 0.25, 0.24

# vmstat -m
vmstat: Kmem statistics are not being gathered by the kernel.
Memory resource pool statistics
Name        Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
phpool        40     1136    0      157    10     0    10    10     0   inf    0
pcgpool      144      446    0      430     1     0     1     1     0   inf    0
vmsppl       232    97937    0    97899     6     1     5     5     0   inf    2
vmmpepl       96  4082701    0  4081689    66    24    42    48     0   inf   17
vmmpekpl      96   162164    0   162151     3     2     1     2     0   inf    0
uaoeltpl      88        7    0        5     1     0     1     1     0   inf    0
aobjpl        56        1    0        0     1     0     1     1     0   inf    0
pvtable       16 21480652    0 21473478   109    66    43    60     3   inf   14
pmappl      2968      183    0      116   117    49    68    82     0   inf    1
segmap       512   514449   18   514335    43    21    22    32     0   inf    7
L1 pagetable 1024     366    0      232    48    12    36    42     0   inf    0
L2/L3 pagetable 256 1984278 93  1983765   130    24   106   125     0   inf   73
amappl        40  1275596    0  1275144    12     4     8     9     0   inf    2
bufpl        128   115656  257    91891   771     3   768   768     0   inf    1
buf1k       1024    24781    0     4854   318     0   318   318     1     1    0
buf2k       2048      747    0      472    11     1    10    11     1     1    0
buf4k       4096      224    0      170     7     0     7     7     1     1    0
buf8k       8192     7996    0     4487   473    34   439   452     1     1    0
mbpl         256     1106    0      978    16     7     9     9     1   inf    1
mclpl       2048      187    0      141    84    57    27    29     4   128    4
kqueuepl     296        9    0        8     1     0     1     1     0   inf    0
knotepl       80       16    0        8     1     0     1     1     0   inf    0
sockpl       200   239116    0   238967    21     5    16    16     0   inf    7
ttypl        264       65    0        0     5     0     5     5     0   inf    0
rndsample    528     5641    0     5638     1     0     1     1     0   inf    0
procpl       400    98242    0    98199    13     5     8     9     0   inf    3
lwppl        136    98242    0    98199     3     0     3     3     0   inf    1
pgrppl        16     4772    0     4757     1     0     1     1     0   inf    0
pcredpl       24    98242    0    98199     1     0     1     1     0   inf    0
plimitpl     160     4205    0     4198     1     0     1     1     0   inf    0
pstatspl     224    98242    0    98199     6     1     5     5     0   inf    2
rusgepl       72    98199    0    98199     2     1     1     1     0   inf    1
ptimerpl     128     8071    0     8046     2     0     2     2     0   inf    1
filepl        56  1356021    0  1355775    11     2     9     9     0   inf    3
cwdipl        16    98237    0    98199     1     0     1     1     0   inf    0
fdescpl      280    98237    0    98199    10     4     6     6     0   inf    3
pnbufpl     1024      228    0      223     3     1     2     2     0   inf    0
vnodepl      168    41871    0    21944   892     0   892   892     0   inf    0
ncachepl      88   468477    0   448554   465     0   465   465     0   inf    0
sdpcpool     128    33085    0    33085     4     1     3     3     0   inf    3
pagedeppl     72    48311    0    48301     3     2     1     2     0   inf    0
inodedeppl    88    44547    0    44540     8     5     3     5     0   inf    2
newblkpl      40    41284    0    41284     4     3     1     1     0   inf    1
bmsafemappl   40    23747    0    23747     3     2     1     1     0   inf    1
allocdirectpl 80    34119    0    34119     4     2     2     2     0   inf    2
indirdeppl    32     1540    0     1540     4     3     1     1     0   inf    1
allocindirpl  72     7165    0     7165    35    12    23    23     0   inf   23
freefragpl    40     7809    0     7809     5     4     1     1     0   inf    1
freeblkspl   176    21889    0    21887     8     5     3     4     0   inf    2
freefilepl    40    21927    0    21925     3     2     1     1     0   inf    0
diraddpl      40    48981    0    48981     3     2     1     2     0   inf    1
mkdirpl       32        4    0        4     1     1     0     1     0   inf    0
dirrempl      40    49082    0    49077     3     2     1     2     0   inf    0
newdirblkpl   24        3    0        3     1     1     0     1     0   inf    0
ffsinopl     192   514929    0   495006  1019     0  1019  1019     0   inf    0
dino1pl      128   514929    0   495006   690     0   690   690     0   inf    0
extent        24  1531798 1557  1530205    84    60    24    84     0   inf    0
ncr53c9x_ecb  56   360894    0   360894     1     0     1     1     1   inf    1
scxspl       152   360908    0   360908    10     3     7     7     2   inf    7
rtentpl      136       16    0        3     1     0     1     1     0   inf    0
inpcbpl      112   155858    0   155835     5     2     3     3     0   inf    2
inmltpl       32        2    0        0     1     0     1     1     0   inf    0
tcpcbpl      320    30553    0    30535    11     4     7     7     0   inf    5
tcpipqepl     48    25676    0    25676     7     6     1     1     0   inf    1
synpl        176    11527    0    11527     6     5     1     1     0   inf    1
sigapl      2056    98237    0    98199   122    54    68    82     0   inf   30
pipepl       144   137716    0   137708     5     3     2     3     0   inf    1

In use 64097K, total allocated 67280K; utilization 95.3%


After reboot and running for a few minutes with all services, i.e. mainly 
mail traffic:


# vmstat -m
vmstat: Kmem statistics are not being gathered by the kernel.
Memory resource pool statistics
Name        Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
phpool        40      136    0        0     2     0     2     2     0   inf    0
pcgpool      144        5    0        0     1     0     1     1     0   inf    0
vmsppl       232      278    0      238     3     0     3     3     0   inf    0
vmmpepl       96    10319    0     9251    30     0    30    30     0   inf    1
vmmpekpl      96       86    0       83     1     0     1     1     0   inf    0
aobjpl        56        1    0        0     1     0     1     1     0   inf    0
pvtable       16    55062    0    47535    37     0    37    37     3   inf    3
pmappl      2968       46    0        0    46     0    46    46     0   inf    0
segmap       512     1087    0      967    18     0    18    18     0   inf    1
L1 pagetable 1024      92    0        0    23     0    23    23     0   inf    0
L2/L3 pagetable 256  4547    0     4017    38     0    38    38     0   inf    1
amappl        40     3050    0     2570     6     0     6     6     0   inf    0
bufpl        128     1820    0     1387    15     0    15    15     0   inf    1
buf1k       1024      150    0        0     3     0     3     3     1     1    0
buf2k       2048       15    0        0     1     0     1     1     1     1    0
buf4k       4096        5    0        0     1     0     1     1     1     1    0
buf8k       8192      263    0        0    33     0    33    33     1     1    0
mbpl         256       25    0        0     3     0     3     3     1   inf    1
mclpl       2048       16    0        0    12     0    12    12     4   128    4
kqueuepl     296        1    0        0     1     0     1     1     0   inf    0
knotepl       80        8    0        0     1     0     1     1     0   inf    0
sockpl       200      436    0      305     9     0     9     9     0   inf    1
ttypl        264       65    0        0     5     0     5     5     0   inf    0
rndsample    528       38    0       35     1     0     1     1     0   inf    0
procpl       400      283    0      238     6     0     6     6     0   inf    1
lwppl        136      283    0      238     2     0     2     2     0   inf    0
pgrppl        16       21    0        6     1     0     1     1     0   inf    0
pcredpl       24      283    0      238     1     0     1     1     0   inf    0
plimitpl     160        7    0        2     1     0     1     1     0   inf    0
pstatspl     224      283    0      238     3     0     3     3     0   inf    0
rusgepl       72      238    0      238     1     0     1     1     0   inf    1
ptimerpl     128       34    0        7     1     0     1     1     0   inf    0
filepl        56     3374    0     3174     4     0     4     4     0   inf    0
cwdipl        16      278    0      238     1     0     1     1     0   inf    0
fdescpl      280      278    0      238     4     0     4     4     0   inf    0
pnbufpl     1024        4    0        0     1     0     1     1     0   inf    0
vnodepl      168     6621    0       82   273     0   273   273     0   inf    0
ncachepl      88     6690    0      151   143     0   143   143     0   inf    0
sdpcpool     128       56    0       56     1     0     1     1     0   inf    1
pagedeppl     72       80    0       80     1     0     1     1     0   inf    1
inodedeppl    88      175    0      175     3     0     3     3     0   inf    3
newblkpl      40       57    0       57     1     0     1     1     0   inf    1
bmsafemappl   40       42    0       42     1     0     1     1     0   inf    1
allocdirectpl 80       56    0       56     1     0     1     1     0   inf    1
indirdeppl    32        1    0        1     1     0     1     1     0   inf    1
allocindirpl  72        1    0        1     1     0     1     1     0   inf    1
freefragpl    40        1    0        1     1     0     1     1     0   inf    1
freeblkspl   176       42    0       42     2     0     2     2     0   inf    2
freefilepl    40       67    0       67     1     0     1     1     0   inf    1
diraddpl      40      141    0      141     1     0     1     1     0   inf    1
dirrempl      40      135    0      135     1     0     1     1     0   inf    1
ffsinopl     192     6615    0       81   312     0   312   312     0   inf    0
dino1pl      128     6615    0       81   211     0   211   211     0   inf    0
extent        24     9276    0     9273     1     0     1     1     0   inf    0
ncr53c9x_ecb  56     2281    0     2281     1     0     1     1     1   inf    1
scxspl       152     2295    0     2295     3     0     3     3     2   inf    3
rtentpl      136        8    0        0     1     0     1     1     0   inf    0
inpcbpl      112      169    0      148     1     0     1     1     0   inf    0
inmltpl       32        2    0        0     1     0     1     1     0   inf    0
tcpcbpl      320       46    0       31     2     0     2     2     0   inf    0
tcpipqepl     48        1    0        1     1     0     1     1     0   inf    1
synpl        176        5    0        5     1     0     1     1     0   inf    1
sigapl      2056      278    0      238    46     0    46    46     0   inf    6
pipepl       144       88    0       80     1     0     1     1     0   inf    0

In use 6942K, total allocated 7604K; utilization 91.3%


> Please also include the dmesg from your system.

# dmesg
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
     The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
     The Regents of the University of California.  All rights reserved.

NetBSD 2.0_RC4 (TICKO.MP) #1: Tue Nov  9 16:48:18 CET 2004
         toor@ticko:/usr/src/sys/arch/sparc/compile/TICKO.MP
total memory = 319 MB
avail memory = 308 MB
bootpath: 
/iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@3,0
mainbus0 (root): SUNW,SPARCstation-10: hostid 72604865
cpu0 at mainbus0: mid 8: TMS390Z50 v1 @ 40.300 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 v1 @ 40.300 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 18
zs0 at obio0 slot 0 offset 0x100000 level 12 softpri 6
zstty0 at zs0 channel 0
zstty1 at zs0 channel 1
zs1 at obio0 slot 0 offset 0x0 level 12 softpri 6
kbd0 at zs1 channel 0: baud rate 1200 (console input)
ms0 at zs1 channel 1: baud rate 1200
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 0x1/0x0, page-size 4096, range 64MB
sbus0 at iommu0: clock = 20 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:12:26:d8
le0: 8 receive buffers, 2 transmit buffers
bpp0 at sbus0 slot 15 offset 0x4800000 level 2 (ipl 3): DMA rev 2
SUNW,DBRIe at sbus0 slot 15 offset 0x8010000 level 9 not configured
isp0 at sbus0 slot 1 offset 0x10000 level 3 (ipl 5) for ptisp
scsibus1 at isp0: 16 targets, 8 luns per target
cgsix0 at sbus0 slot 2 offset 0x0 level 9: SUNW,501-1672, 1152 x 900, rev 8 (console)
cgsix0: attached to /dev/fb
hme0 at sbus0 slot 3 offset 0x8c00000 level 4 (ipl 7): Sun Happy Meal Ethernet (SUNW,hme)
hme0: Ethernet address 08:00:20:12:26:d8
nsphy0 at hme0 phy 1: DP83840 10/100 media interface, rev. 0
nsphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
eccmemctl0 at mainbus0 ioaddr 0x0: version 0x0/0x1
scsibus0: waiting 2 seconds for devices to settle...
scsibus1: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 3 lun 0: <SEAGATE, ST15150N, 0020> disk fixed
sd0: 4095 MB, 3712 cyl, 21 head, 107 sec, 512 bytes/sect x 8388315 sectors
sd0: sync (100.00ns offset 15), 8-bit (10.000MB/s) transfers
root on sd0a dumps on sd0b
root file system type: ffs
cpu0: booting secondary processors: cpu1


Hope that helps.

Christian Corti