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: Out of MBUF panic


On Mon, Dec 11, 2000 at 05:11:17PM +0000, Colin Ford wrote:

> > I'm testing an eCos system using the GoAhead web server, and
> > after fetching 5 or 6 modes pages, I always get an "out of
> > mbuf" panic.  This is with eCos 1.3.1 and net 1.0b1 (with some
> > patches to fix mbuf corruption race conditions), with default
> > settings for everything.
>
> I'm using the GoAhead web server on a MIPS R3000 with the
> latest CVS version of eCos and net. I had a problem with memory
> getting corrupted because of a select in the function
> socketSelect in the file sockGen.c
> 
> Basically the memory for the file descriptors was way to small
> so I made sure it was the size of the fd_set (32). Now it works
> a treat.

I'm assuming you did something like this at the beginning of
socketSelect:

    readFds = balloc(B_L, sizeof(fd_set));
	memset(readFds, 0,  sizeof(fd_set));
	writeFds = balloc(B_L,  sizeof(fd_set));
	memset(writeFds, 0,  sizeof(fd_set));
	exceptFds = balloc(B_L,  sizeof(fd_set));
	memset(exceptFds, 0,  sizeof(fd_set));

That fix improved things a bit.  Now I can fetch the page about
30 times before I get an out of MBUFs panic.

I'm still trying to build with current CVS, but the Ethernet
driver architecture has changed, and that's going to take some
work to get running.  :(

-- 
Grant Edwards
grante@visi.com

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