[ECOS] ASSERT: cyg_callout_reset() We didn't pick the smallest delta!

Kevin Hilman khilman@equator.com
Wed Nov 27 15:24:00 GMT 2002


Gary Thomas <gthomas@ecoscentric.com> writes:

> On Wed, 2002-11-27 at 15:46, Kevin Hilman wrote:
> > Gary Thomas <gthomas@ecoscentric.com> writes:
> > 
> > > On Wed, 2002-11-27 at 12:05, Kevin Hilman wrote:
> > > > Hello,
> > > > 
> > > > I've recently added the FreeBSD networking stack to our port of eCos.
> > > > Our device has a PCI interface and I'm using the i82559 driver for an
> > > > Intel EtherExpress Pro.
> > > > 
> > > > Most of the network tests are running OK, but a few trigger some
> > > > asserts in the timeout code.  Since I'm kind of a TCP novice, I'm
> > > > wondering if anyone here can give me some insight into what may be
> > > > going on here, and where to start digging.
> > > > 
> > > > The first assert I saw was the at the end of cyg_callout_reset() in
> > > > net/bsd_tcpip/current/src/ecos/timeout.c:
> > > > 
> > > >   CYG_ASSERT( delta == last_delta, "We didn't pick the smallest delta!" );
> > > > 
> > > 
> > > This problem was fixed on Nov 12.  Have you updated your sources since
> > > then?
> > 
> > Nope, my last update was Nov 6.  However, now I've merged the latest
> > CVS, and this assert goes away.  Now I'm consistently hitting the
> > assert below, the "delta is right now" one.
> > 
> > > > thinking that the trace messages (in buffer mode) may be causing too
> > > > much time lag, I disabled tracing.
> > > > 
> > > > That seemed to get rid of the problem for the ftp_test, and the
> > > > ftp_test now passes,  but for the nc_test_slave it changed a little
> > > > but still asserts.  Sometimes it asserts at the same place, but it
> > > > also sometimes asserts at the beginning of cyg_callout_reset() at:
> > > > 
> > > >   CYG_ASSERT( 0 < delta, "delta is right now, or even sooner!" );
> > > > 
> 
> Harrumph!  I've never seen that one.  Maybe you could detect this case
> and print some data so we can analyze the failure (asserts are nice, but
> sometimes one needs more).  Something like this:
>   if (delta <= 0) {
>      diag_printf("Bad delta: %d, callout: %p, fun: %p(%x)\n", delta, c, f, p);
>   }
> 
> Or at least you could run this under GDB, set a breakpoint at 
> 'cyg_assert_fail' and et a backtrace when it happens.

I'll start adding some more diagnostics.  Unfortunately, I haven't
done the gdb work yet for this port, so I can't use gdb yet.  Only
diag_printf() 

Kev

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



More information about the Ecos-discuss mailing list