From geniusj@fbsd.ods.org  Sun Dec  3 01:51:53 2000
Return-Path: <geniusj@fbsd.ods.org>
Received: from fbsd.ods.org (fbsd.ods.org [64.50.162.3])
	by hub.freebsd.org (Postfix) with SMTP id 3ACF737B400
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  3 Dec 2000 01:51:53 -0800 (PST)
Received: (qmail 6315 invoked by uid 1000); 3 Dec 2000 09:51:32 -0000
Message-Id: <20001203095132.6314.qmail@fbsd.ods.org>
Date: 3 Dec 2000 09:51:32 -0000
From: geniusj@ods.org
Sender: geniusj@fbsd.ods.org
Reply-To: geniusj@ods.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: Steady memory leaks in 4.2-RELEASE.
X-Send-Pr-Version: 3.2

>Number:         23247
>Category:       kern
>Synopsis:       FreeBSD 4.2 Active memory usage climbs even when idle. process table cannot make up for it.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 03 02:00:01 PST 2000
>Closed-Date:    Tue Jul 10 10:33:14 PDT 2001
>Last-Modified:  Tue Jul 10 10:55:17 PDT 2001
>Originator:     Systems Administrator
>Release:        FreeBSD 4.2-RELEASE i386
>Organization:
Open Domain Server
>Environment:

FreeBSD update.ods.org 4.2-RELEASE FreeBSD 4.2-RELEASE #0: Mon Nov 20 13:02:55 GMT 2000     jkh@bento.FreeBSD.org:/usr/src/sys/compile/GENERIC  i386

CPU: AMD Athlon(tm) Processor (756.75-MHz 686-class CPU)
  Origin = "AuthenticAMD"  Id = 0x642  Stepping = 2
  Features=0x183f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PA
T,PSE36,MMX,FXSR>
  AMD Features=0xc0440000<<b18>,AMIE,DSP,3DNow!>
real memory  = 268353536 (262064K bytes)
avail memory = 256999424 (250976K bytes)
Preloaded elf kernel "kernel" at 0xc0436000.
Pentium Pro MTRR support enabled
md0: Malloc disk
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <Host to PCI bridge> on motherboard
pci0: <PCI bus> on pcib0
pcib2: <PCI to PCI bridge (vendor=1106 device=8305)> at device 1.0 on pci0
pci1: <PCI bus> on pcib2
pci1: <NVidia Riva TNT graphics accelerator> at 0.0 irq 11
isab0: <VIA 82C686 PCI-ISA bridge> at device 4.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <VIA 82C686 ATA66 controller> port 0xd800-0xd80f at device 4.1 on pci0
ata1: at 0x170 irq 15 on atapci0
uhci0: <VIA 83C572 USB controller> port 0xd400-0xd41f irq 12 at device 4.2 on pci0
usb0: <VIA 83C572 USB controller> on uhci0
usb0: USB revision 1.0
uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1: <VIA 83C572 USB controller> port 0xd000-0xd01f irq 12 at device 4.3 on pc
i0
usb1: <VIA 83C572 USB controller> on uhci1
usb1: USB revision 1.0
uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhub2: ALCOR Generic USB Hub, class 9/0, rev 1.10/1.00, addr 2
uhub2: 4 ports with 4 removable, self powered
vx0: <3COM 3C595 Fast Etherlink III PCI> port 0xa400-0xa41f irq 10 at device 11.
0 on pci0
utp/tx[*utp*]: disable 'auto select' with DOS util! address 00:a0:24:38:67:4c
vx0: driver is using old-style compatability shims
atapci1: <Promise ATA100 controller> port 0x8800-0x883f,0x9000-0x9003,0x9400-0x9
407,0x9800-0x9803,0xa000-0xa007 mem 0xe0800000-0xe081ffff irq 10 at device 17.0
on pci0
ata2: at 0xa000 on atapci1
ata3: at 0x9400 on atapci1
pcib1: <Host to PCI bridge> on motherboard
pci2: <PCI bus> on pcib1
fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
fdc0: FIFO enabled, 8 bytes threshold
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A
sio1 at port 0x2f8-0x2ff irq 3 on isa0
sio1: type 16550A
ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/8 bytes threshold
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
ata3-slave: ata_command: timeout waiting for intr
ata3-slave: identify failed
ata3-master: ata_command: timeout waiting for intr
ata3-master: identify failed
ad4: 29314MB <IBM-DTLA-307030> [59560/16/63] at ata2-master UDMA100
ad5: 29314MB <IBM-DTLA-307030> [59560/16/63] at ata2-slave UDMA100
acd0: CDROM <CREATIVE CD5233E> at ata1-master using PIO4

	

>Description:

While machine is on (obviously) and idle, memory gradually rises..  I used to think it might have to do with disk access, and this is still a possibility, however i'm not sure.  

Example:

Mem: 164M Active, 24M Inact, 50M Wired, 10M Cache, 35M Buf, 656K Free
Swap: 1000M Total, 288K Used, 1000M Free
USER       PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED      TIME COMMAND
root     40460  0.0  0.1   440  188  p2  R+    4:48AM   0:00.00 ps aux
root         1  0.0  0.1   528  128  ??  ILs   9:43AM   0:00.05 /sbin/init --
root         2  0.0  0.0     0    0  ??  DL    9:43AM   0:00.61  (pagedaemon)
root         3  0.0  0.0     0    0  ??  DL    9:43AM   0:00.00  (vmdaemon)
root         4  0.0  0.0     0    0  ??  DL    9:43AM   0:00.63  (bufdaemon)
root         5  0.1  0.0     0    0  ??  DL    9:43AM   0:25.30  (syncer)
root        78  0.0  0.2   916  464  ??  Ss    9:43AM   0:01.14 syslogd -s
root        99  0.0  0.1   960  304  ??  Is    9:43AM   0:00.05 cron
root       106  0.0  0.3  2404  780  ??  Is    9:43AM   0:00.90 /usr/sbin/sshd
root       142  0.0  0.2  1332  460  v0  Is    9:43AM   0:00.04 -csh (csh)
root       143  0.0  0.2  1332  460  v1  Is    9:43AM   0:00.03 -csh (csh)
root       145  0.0  0.0   924   48  v3  Is+   9:43AM   0:00.00 /usr/libexec/ge
root       146  0.0  0.0   924   48  v4  Is+   9:43AM   0:00.00 /usr/libexec/ge
root       147  0.0  0.0   924   48  v5  Is+   9:43AM   0:00.00 /usr/libexec/ge
root       148  0.0  0.0   924   48  v6  Is+   9:43AM   0:00.00 /usr/libexec/ge
root       149  0.0  0.0   924   48  v7  Is+   9:43AM   0:00.00 /usr/libexec/ge
root       180  0.0  0.2  2344  428  v0  I+    9:44AM   0:01.93 ssh -l doofoo o
root       248  0.0  0.0   612   28  ??  DLs   9:49AM   0:00.00 vinum: vinum da
root       266  0.0  0.2  2344  388  v1  I+    9:51AM   0:00.03 ssh -l doofoo o
root       686  0.0  0.4  2784  924  ??  I     2:46AM   0:00.33 sshd: androsyn@
androsyn   687  0.0  0.1  1020  132  p0  Is    2:46AM   0:00.02 -bash (bash)
root       690  0.0  0.3  1340  804  p0  I     2:46AM   0:00.03 _su (csh)
root       694  0.0  0.1  1020  320  p0  I+    2:46AM   0:00.02 bash
root       830  0.0  0.4  2784 1140  ??  I     2:48AM   0:04.75 sshd: androsyn@
androsyn   831  0.0  0.2  1024  596  p1  Is    2:48AM   0:00.08 -bash (bash)
root       977  0.0  0.4  2476  900  ??  S     2:50AM   0:00.78 sshd: geniusj@t
geniusj    978  0.0  0.3  1332  816  p2  Is    2:50AM   0:00.04 -tcsh (tcsh)
pgsql    21430  0.0  0.1   628  244  p1  I     3:08AM   0:00.00 /bin/sh /usr/lo
pgsql    21431  0.0  0.6  4096 1528  p1  I     3:08AM   0:00.10 /usr/local/pgsq
root     35363  0.0  0.3  1312  836  p1  I     3:24AM   0:00.05 _su (csh)
root     35799  0.0  0.3  1064  720  p1  I+    3:25AM   0:00.60 bash
root     35936  0.0  0.3  1332  824  v2  Is+   3:29AM   0:00.08 -csh (csh)
root     37003  0.0  0.3  1340  840  p2  S     3:42AM   0:00.23 _su (csh)
root     40326  0.0  0.5  1988 1196  ??  Is    4:15AM   0:00.00 sqlr-connection
pgsql    40327  0.0  0.9  4500 2356  p1  I     4:15AM   0:00.01 /usr/local/pgsq
root     40330  0.0  0.5  1988 1196  ??  Is    4:15AM   0:00.00 sqlr-connection
pgsql    40331  0.0  0.9  4500 2356  p1  I     4:15AM   0:00.01 /usr/local/pgsq
root     40334  0.0  0.5  1988 1196  ??  Is    4:15AM   0:00.00 sqlr-connection
pgsql    40335  0.0  0.9  4500 2356  p1  I     4:15AM   0:00.01 /usr/local/pgsq
root     40338  0.0  0.5  1988 1196  ??  Is    4:15AM   0:00.00 sqlr-connection
pgsql    40339  0.0  0.9  4500 2356  p1  I     4:15AM   0:00.01 /usr/local/pgsq
root     40342  0.0  0.5  1988 1196  ??  Is    4:15AM   0:00.00 sqlr-connection
pgsql    40343  0.0  0.9  4500 2356  p1  I     4:15AM   0:00.01 /usr/local/pgsq
root     40346  0.0  0.4  1808 1056  ??  Is    4:15AM   0:00.00 sqlr-listener -
root     40349  0.0  0.4  1796 1032  ??  Is    4:15AM   0:00.00 sqlr-scaler -id
root     40356  0.0  0.3  1284  668  ??  Ss    4:15AM   0:00.01 sqlr-cachemanag
root     40419  0.0  0.2   768  580  p2  DL    4:29AM   0:12.60 cp -Rp usr/X11R
root         0  0.0  0.0     0    0  ??  DLs   9:43AM   0:00.01  (swapper)

If you look at that table, that doesn't come anywhere close to 160M usage, and the usage gradually rises, occasionally dropping back down to something normal.. However it does this quite frequently, I dont remember it doing this before, therefore I am reporting this as a bug.  If you need more information from me, feel free to contact me the email address provided.
	

>How-To-Repeat:
Not sure, again, I think this might be related to disk access, but I haven't accurately traced it to that.
	

>Fix:
I wish I knew :(	
	


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: jedgar 
Responsible-Changed-When: Sun Dec 3 10:06:52 PST 2000 
Responsible-Changed-Why:  
Misfiled PR 

http://www.freebsd.org/cgi/query-pr.cgi?pr=23247 
State-Changed-From-To: open->closed 
State-Changed-By: iedowse 
State-Changed-When: Tue Jul 10 10:33:14 PDT 2001 
State-Changed-Why:  

FreeBSD's memory system is quite complex, so there isn't a direct 
relationship between the memory used by all processes and the count 
of "active" memory. The active memory simply refers to pages that 
are currently on the "active" page queue, and pages can be there 
for a variety of reasons (I don't know the details). This question 
appears every now and again; you might find a better answer if you 
search the mailing list archives. 

Unless you are seeing the system actually run out of memory 
unexpectedly, this is almost certainly not a leak. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=23247 
>Unformatted:
