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]
Other format: [Raw text]

Re: DEBUG: Circular MBUF


>> On Fri, 2004-06-25 at 10:38, Kevin S. Martin wrote:

I have a application that opens a TCP/IP socket connection and then at 1Hz writes a bunch of data out on that connection. If "bunch" is < 1000 bytes (approx) then everything works fine however when "bunch" > 1000 (i.e. 2000 or 8000+ bytes) then very quickly I get a series of messages on the console like:

DEBUG: Circular MBUF 0x004c7e80!
DEBUG: Circular MBUF 0x004c8500!
DEBUG: Circular MBUF 0x004c7e00!
DEBUG: Circular MBUF 0x004c7c80!

After I get these messages I assume that the network thread is in an infinite loop because all threads with lower priority never run again and all networking to/from the target stops.

I'm using a i386 PCMB target with a fairly recent version of eCos (April 2004) from the CVS repository. Also, I'm using the FreeBSD networking stack. I've tried increasing the amount of memory designated for networking buffers but this didn't help.


My guess is that you have stack overflow. Where is the buffer (that contains 'bunch' of data)?


If this isn't [obviously] the problem try running with asserts enabled
and see if it helps debug the failure.

--
Gary Thomas <gary@mlbassoc.com>
MLB Associates

I've finally been able to get back to working on this problem. I looked into Gary Thomas's suggestion that it might be a stack problem. My send buffer isn't a stack variable rather it is a statically defined global. I increased the size of this buffer as well as the size of my thread's stack quite a bit (to 65K) to rule out buffer/stack overflows. This didn't help. I have also turned on asserts and tracing but this did not help either. No asserts get hit.


Is it possible that the Network thread's stack is overflowing? If so how does one increase it's size?

Any other ideas?

Thanks,
Kevin

--
Kevin S. Martin
Fermi National Accelerator Laboratory
Accelerator Division, EE Support Department
630.840.2983
ksmartin@fnal.gov


-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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