NetBSD Problem Report #9792
Received: (qmail 5581 invoked from network); 5 Apr 2000 20:18:14 -0000
Message-Id: <200004052016.VAA01807@shark1.cambridge.arm.com>
Date: Wed, 5 Apr 2000 21:16:00 +0100 (BST)
From: Richard Earnshaw <rearnsha@cambridge.arm.com>
Reply-To: rearnsha@cambridge.arm.com
To: gnats-bugs@gnats.netbsd.org
Subject: Kernel leaking buffers?
X-Send-Pr-Version: 3.95
>Number: 9792
>Category: kern
>Synopsis: Kernel leaking buffers?
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: chs
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Apr 05 20:19:00 +0000 2000
>Closed-Date: Sun Apr 16 21:45:20 +0000 2000
>Last-Modified: Sun Apr 16 21:45:20 +0000 2000
>Originator: Richard Earnshaw
>Release: NetBSD-current 2000/03/27<NetBSD-current source date>
>Organization:
ARM
--
>Environment:
System: NetBSD shark1 1.4X NetBSD 1.4X (SHARK) #52: Mon Mar 27 17:55:21 BST 2000 rearnsha@shark1:/usr/src/sys/arch/arm32/compile/SHARK arm32
shark1:testsuite [537] $ df -k
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/wd0a 194983 37479 147754 20% /
/dev/wd0e 2028219 460698 1466110 23% /usr
mfs:49 198183 22 188251 0% /tmp
/dev/wd0f 2028219 573062 1353746 29% /usr/build
/dev/wd0g 2028219 1583868 342940 82% /work
/dev/wd0h 2925218 834382 1944575 30% /xx
(/usr/build and /xx are mounted with soft-update enabled; all others
are non-soft-update)
>Description:
Sorry this report is about a kernel that is a week old, but it takes
that long before the problem starts to manifest itself :-(
Since I started using a kernel with soft-updates and trickle sync all
my kernels have started to thrash the disk horribly after about a week
of uptime. I can't be entirely sure where the failure is (hints of
what information you require would be appreciated), but "systat vmstat"
is showing that the sys-cache hit ratio has dropped off alarmingly
(when the system first comes up I'm typically seeing 98->99% hits on
approx 5k->10k calls; after a while this drops dramatically to about
50% hits on 500->2k calls). In addition, the disk seems to start
making a very large number of head movements (I can hear it).
I'm not sure if this is directly related to the soft-updates code
or trickle syncing (or either unrealated). But it still occurs
even if accessing only discs that aren't mounted with soft-updates.
I haven't tried a kernel built without soft-updates.
Final note: the machine only has 32M of memory, so I guess that if it
is a buffer problem, I'm likely to start seeing problems sooner than
folks with massive amounts of RAM (and hence system buffers of various
types).
>How-To-Repeat:
Leave a machine running for a week or so.
>Fix:
No idea.
>Release-Note:
>Audit-Trail:
From: Richard Earnshaw <rearnsha@arm.com>
To: gnats-bugs@gnats.netbsd.org
Cc: rearnsha@arm.com
Subject: Re: kern/9792: Kernel leaking buffers?
Date: Thu, 06 Apr 2000 11:45:40 +0100
Some additional probing leads me to suspect that this is related to the
vnode pool becoming significantly larger than the namei pool. Running
vmstat -m shows that the machine has more than twice as many vnodepl
buffers allocated than ncachepl entries; which means (if I understand the
interworking of these two correctly) that even if an entry is already in a
vnode buffer, there is only a 50% chance of the name cache being able to
hold a reference to it.
sysctl shows that maxvnodes is 778 and that the ncachepl has maxed out at
this, but that vnodepl has continued to grow. Using sysctl to forcibly
increase the maximum number of buffers solves the thrashing problem, but I
guess that if things really are leaking, it will only be for a period of
time.
Memory resource pool statistics
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg
Maxpg Idle
vnodepl 208 1566 0 0 83 0 83 83 0
inf 0
ncachepl 72 778 0 0 14 0 14 14 0
inf 0
State-Changed-From-To: open->closed
State-Changed-By: chs
State-Changed-When: Sun Apr 16 14:44:22 PDT 2000
State-Changed-Why:
fixed in rev 1.23 of vfs_cache.c
Responsible-Changed-From-To: kern-bug-people->chs
Responsible-Changed-By: chs
Responsible-Changed-When: Sun Apr 16 14:44:22 PDT 2000
Responsible-Changed-Why:
I looked at this.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.