Re: Known memory leaks in 2.0.31-pre-10-2.1 ?

Rogier Wolff (R.E.Wolff@BitWizard.nl)
Wed, 15 Oct 1997 11:31:08 +0200 (MET DST)


ADAM Sulmicki wrote:
>
>
> ->> Oct 14 17:15:38 eax kernel: Networking buffers in use : 172504
>
> ->So right now you have 172,504 network buffers - thats at least 17Mbytes
> ->of them. I guess thats what is leaking. Now does 2.0.29 leak on the same
> ->configuration ?
>
> That's bit little, my estimates are that I'm missing at least 40-60mb of
> ram [hard to say w/out going into single user mode]

Oct 15 11:20:38 cave kernel: Networking buffers in use : 2
Oct 15 11:20:38 cave kernel: Network buffers locked by drivers : 0
Oct 15 11:20:38 cave kernel: Total network buffer allocations : 74700
Oct 15 11:20:38 cave kernel: Total failed network buffer allocs : 0
Oct 15 11:20:38 cave kernel: Total free while locked events : 0
Oct 15 11:20:38 cave kernel: IP fragment buffer size : 0
Oct 15 11:20:39 cave kernel:

This is "normal" for a networked machine. Just a few buffers in use.

While writing a network device driver the last few weeks, I also
encountered such a case where I was loosing memory fast. This was
caused in my case by buffers remaining locked by the driver. (i.e. a
higher number on the second line.)

> As to answer your question. It never ran 2.0.29 since it is pretty new box
> so the latest it would run is the 2.0.30 .. it had the motherboard replace
> once since the last one was flaky, but since then It runs perfectly [well
> except the memory gone south], so I don't think that there are any
> hardware problems right now.
>
> Also, if anyone wants me to do any extra debugging now, I would prefer it
> the sooner the better since I was thinking to reboot it soon since it
> swaps pretty heaviliy, and is harly usable [and it has got 64mb ram].
>
> For shake of completenes as I have mentioned in my first messages it would
> use ppp, plip and eth drivers, the ethernet cards are 3c503 and 3c590.

If you're very knowledgeable about pointers, the kernel, network
drivers and gdb, you could probably dive into the running kernel, and
find out what device is listed as the device that holds the buffers.
I myself wouldn't try this unless absolutely necessary.....

As to debugging, I suggest you reboot the machine, but bring up the
interfaces one at a time, and check when the "networking buffers in
use" number starts going up.

Ethernet devices can have around 100 buffers queued for them. ppp not
much different (actually I thought only 20, but whatever). So 172000
buffers is unreasonable. Wherever they went, they are not "queued for
transmission". Do you use masquerading?

By the way, my Xserver just quit on me while I was pressing
"shift-scrollock" in a VC. Anybody know a possible cause?

Roger.

--
** R.E.Wolff@BitWizard.nl ** +31-15-2137555 ** http://www.BitWizard.nl/ **
Florida -- A 39 year old construction worker woke up this morning when a
109-car freight train drove over him. According to the police the man was 
drunk. The man himself claims he slipped while walking the dog. 080897