This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: MBUF leak


From: "Andrew Lunn" <andrew.lunn@ascom.ch>
To: "eCos Disuss" <ecos-discuss@sourceware.cygnus.com>
Sent: Friday, October 05, 2001 7:36 AM
Subject: [ECOS] MBUF leak


> Re: the mbuf/cluster leak message...
> 
> If you look at the trace, you see that both the number of mbufs and
> the number of clusters slowly decreases. You happen to run out of
> clusters first, but thats because there are less of them. Your real
> problem is an mbuf leak. An mbuf is used to hold part of a packet. If
> it has to hold more than about 100 bytes, a cluster is attached to the
> mbuf, which can hold up to 2K bytes. If you loose an mbuf, you also
> loose the cluster thats attached.
> 
> My experience is that the basic IP stack is OK. Leaks happen in either
> the ethernet device driver or the eth_drv.c layer. Thats where i would
> start looking. Try to use a UDP test program. Fire UDP packets at the
> target and see if it leaks. If so its the receive path that has the
> problem. If not, try sending UDP packets from the target. If that
> leaks you know its the TX path that has a problem. Again from
> experience problems happen during some sort of overload
> condition. Check what happens when the RX or TX ring buffer overflows
> in the device driver etc.
> 
>    Andrew
> 

Thanks Andrew. I'll try to get some tests with UDP sockets.

Last night, I increased the memory for the network to 5M.
The system ran for about 9Hours. It looks like that the 
stack leak "mbufs" very quickly for 2 minutes. After that,
some kind of "timer" kicks in, and stabilizes it. This morning
the system was frozen. In the "logs",  after the first 2 minutes the leaks
where a extremely slow speed ( 10 mbufs per hour ).

Rosimildo.




 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]