[ECOS] Re: ASSERT: cyg_callout_reset() We didn't pick the smallestdelta!

Dan Jakubiec dan@systech.com
Tue Dec 10 12:12:00 GMT 2002


I've also been running into the "delta is right now, or even sooner!" assert
message.  I am running the Linux synthetic target w/ I/O enabled (got all
latest source as of Dec 10th).  I get this ASSERT whenever I shutdown a TCP
connection.

As you recommended, I changed the CYG_ASSERT in timeout.c:317 from:

	CYG_ASSERT( 0 < delta, ...)

to:

	CYG_ASSERT( 0 <= delta, ...)


which made the ASSERT go away.  So, is this the correct solution to the
problem or is it a stopgap?

Thanks,

Dan Jakubiec
Systech



On Wed, 2002-11-27 at 17:52, Kevin Hilman wrote:
> Gary Thomas <gthomas@ecoscentric.com> writes:
> 
> > On Wed, 2002-11-27 at 17:23, Kevin Hilman wrote:
> > > Gary Thomas <gthomas@ecoscentric.com> writes:
> > > 
> > > > On Wed, 2002-11-27 at 16:37, Kevin Hilman wrote:
> > > > > Gary Thomas <gthomas@ecoscentric.com> writes:
> > > > > 
> > > > > > > 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.
> > > > > > > 
> > > > > > 
> > > > > > 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);
> > > > > 
> > > > > This run shows a failure with your suggested diag_printf().  I've
also
> > > > > included some relevant parts of 'nm'
> > > > > 
> > > > 
> > > > I'm still not sure why this fails.  Two more things to try:
> > > >   * Change the 'assert' to be CYG_ASSERT(0 <= delta, ...)
> > > >   * Print one more piece (using the previos setup/test)
> > > >     diag_printf("Called from %p\n", __builtin_return_address(0));
> > > 
> > > OK, changing the assert to <= makes it run happily for quite a while
> > > longer but eventually runs into problems running out of mbufs and then
> > > packets out of sequence and then some different timeout error (see
> > > output below).  The caller is the same every time and is
> > > cyg_tcp_input().
> > > 
> > 
> > Actually, the "errors" you are seeing are quite normal, especially if
> > one end of your test is faster than the other.  This part of the test
> > is trying to do major amounts of UDP traffic which has no flow control
> > and is guaranteed to drop packets.  The test should eventually recover
> > (it may take a little while - a few tens of seconds I would think) and
> > then carry or.
> 
> OK, should I consider this a "passed" test then?
> 
> I'd assumed it failed somehow because the host program (on x86 linux)
> ends up looping,  unable to contact the target again:
> 

It really should continue after this.  Maybe try to change the code
to be something like this:
  if (delta <= 0) {
     ... whatever prints you have now
     delta = 1;
  }

Also, how many times do you see this [delta == 0] occur?

-- 
------------------------------------------------------------
Gary Thomas                  |
eCosCentric, Ltd.            |  
+1 (970) 229-1963            |  eCos & RedBoot experts
gthomas@ecoscentric.com      |
<http://www.ecoscentric.com/>  |
------------------------------------------------------------




--
Dan Jakubiec
Systech Corporation
dan@systech.com


-- 
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