Scott,

 I also got the error in the same routine. The error surfaces when the
traffic increases a lot. Probably in that case it becomes difficult to
handle the increased number of timers.

If I change it to resched (as someone had suggested), then I start
getting segmentation fault.

If you come across some solution, please update me as well.

Tarun
http://bansal.tarun.googlepages.com/

On 2/17/07, Scott Ricketts <[EMAIL PROTECTED]> wrote:
>
> I am having the same problem (ns-2.30). The bad timer in my case is
> mhCS_, the carrier sense timer. It throws the error during the
> following call in SMAC::checkToSend() ...
>
> mhCS_.sched(CLKTICK2SEC(difs_) + cw);
>
> ...
>
> Tarun, can you investigate your code and try to find out when your
> error is getting thrown?
>
> Perhaps the author of this code might have some better intuition about
> the problem. Is it a bug in smac.cc, or am I doing something wrong? My
> code works fine when I replace Mac/SMAC with Mac for my MAC protocol
> -- but obviously I would prefer to use S-MAC.
>
> Thanks,
> Scott
>
> On 1/23/07, Tarun Bansal <[EMAIL PROTECTED]> wrote:
> >
> > I tried doing that...The error is coming from SMAC protocol.
> > (I am simulating mobile wireless network with SMAC protocol using NS 2.29)
> >
> > SMAC is setting timer somewhere using sched and that gives the error.
> > The error comes when timer is already scheduled and SMAC reschedules
> > that.
> >
> > Anyone, who has faced this before?
> > I would not like to play with SMAC code
> >
> > Regards
> > Tarun
> >
> >
> > On 1/23/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > >
> > > >This query has been posted in past also but my search for the
> > > >solutions was unsuccessful:
> > > >
> > > >When I run my NS script with heavy traffic, the execution sometimes
> > > >stop in between giving the error as "Couldn't schedule timer". I am
> > > >also using my own timer for acknowledgement timeout.
> > > >
> > > >Does this refer to the internal timer or my own defined timer?
> > >
> > > It seems that this is the internal timer (common/timer-handler.cc), 
> > > unless you fprint the same text with your own timer. Make sure by e.g. 
> > > editing the line
> > >
> > >                 fprintf(stderr,"Couldn't schedule timer");
> > >
> > > in common/timer-handler.cc to
> > >
> > >                 fprintf(stderr,"Couldn't schedule timer from 
> > > timer-handler.cc");
> > >
> > > Then recompile ns-2, reinstall it, and run your tcl script. If the text 
> > > that ns-2 prints out matches your changes in common/timer-handler.cc, 
> > > then you know which timer this text refers to.
> > >
> > > >How can I avoid this error?
> > >
> > > It seems that your ns-2 sets the timer to idle state somewhere. Try to 
> > > check where it does it.
> > >
> > > >Tarun
> > >
> > > Regards,
> > > Filip
> > >
> >
> >
>
>

Reply via email to